aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PrimitiveProcessorTest.cpp
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2018-02-27 14:26:32 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-27 20:38:29 +0000
commitf44cb487523c21b3998772458726b958c31f31be (patch)
tree9f118e781b3ee5b5bdfae4c6d19c84193df38a08 /tests/PrimitiveProcessorTest.cpp
parent45a44de0a13511650151ad5efbfd03aa8ae5baa3 (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/PrimitiveProcessorTest.cpp')
-rw-r--r--tests/PrimitiveProcessorTest.cpp3
1 files changed, 3 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));