From f44cb487523c21b3998772458726b958c31f31be Mon Sep 17 00:00:00 2001 From: Greg Daniel Date: Tue, 27 Feb 2018 14:26:32 -0500 Subject: 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 Commit-Queue: Greg Daniel --- tests/PrimitiveProcessorTest.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/PrimitiveProcessorTest.cpp') 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)); -- cgit v1.2.3