From def4750182b2c976ebd9c2e964f0fbd3159a4a54 Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Tue, 10 Nov 2020 15:50:39 +0100 Subject: [PATCH] util: Fix draws in ManifestStencil/Depth. We only need four vertices to draw a quad with GL_TRIANGLE_STRIP primitive. Reviewed-by: Eric Anholt eric@anholt.net Part-of: --- tests/util/piglit-test-pattern.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/util/piglit-test-pattern.cpp b/tests/util/piglit-test-pattern.cpp index 12d991846..43d451d6a 100644 --- a/tests/util/piglit-test-pattern.cpp +++ b/tests/util/piglit-test-pattern.cpp @@ -846,7 +846,7 @@ ManifestStencil::run() for (int i = 0; i < 8; ++i) { glStencilFunc(GL_EQUAL, i, 0xff); glUniform4fv(color_loc, 1, colors[i]); - glDrawArrays(GL_TRIANGLE_STRIP, 0, 6); + glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); } glDisable(GL_STENCIL_TEST); @@ -940,7 +940,7 @@ ManifestDepth::run() for (int i = 0; i < 8; ++i) { glUniform4fv(color_loc, 1, colors[i]); glUniform1f(depth_loc, float(7 - 2*i)/8); - glDrawArrays(GL_TRIANGLE_STRIP, 0, 6); + glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); } glDisable(GL_STENCIL_TEST); -- GitLab