diff options
author | Greg Daniel <egdaniel@google.com> | 2018-02-27 14:26:32 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-02-27 20:38:29 +0000 |
commit | f44cb487523c21b3998772458726b958c31f31be (patch) | |
tree | 9f118e781b3ee5b5bdfae4c6d19c84193df38a08 /tests | |
parent | 45a44de0a13511650151ad5efbfd03aa8ae5baa3 (diff) |
Fix unit tests that were causes vulkan unitialized memory warnings in validation
Bug: skia:
Change-Id: Id9df92b76c9f948f41f4108bcecdb2687233f841
Reviewed-on: https://skia-review.googlesource.com/110761
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/PrimitiveProcessorTest.cpp | 3 | ||||
-rw-r--r-- | tests/TessellatingPathRendererTests.cpp | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/PrimitiveProcessorTest.cpp b/tests/PrimitiveProcessorTest.cpp index d402e65f1c..089d6ce1bf 100644 --- a/tests/PrimitiveProcessorTest.cpp +++ b/tests/PrimitiveProcessorTest.cpp @@ -134,6 +134,9 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(VertexAttributeCount, reporter, ctxInfo) { REPORTER_ASSERT(reporter, gpu->stats()->numDraws() == 0); REPORTER_ASSERT(reporter, gpu->stats()->numFailedDraws() == 0); #endif + // Adding discard to appease vulkan validation warning about loading uninitialized data on draw + renderTargetContext->discard(); + GrPaint grPaint; // This one should succeed. renderTargetContext->priv().testingOnly_addDrawOp(Op::Make(attribCnt)); diff --git a/tests/TessellatingPathRendererTests.cpp b/tests/TessellatingPathRendererTests.cpp index e24bf7a516..f6304f5b18 100644 --- a/tests/TessellatingPathRendererTests.cpp +++ b/tests/TessellatingPathRendererTests.cpp @@ -493,6 +493,9 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(TessellatingPathRendererTests, reporter, ctxInfo) { } ctx->flush(); + // Adding discard to appease vulkan validation warning about loading uninitialized data on draw + rtc->discard(); + test_path(ctx, rtc.get(), create_path_0()); test_path(ctx, rtc.get(), create_path_1()); test_path(ctx, rtc.get(), create_path_2()); |