aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Krol <michal@vmware.com>2020-11-10 15:50:39 +0100
committerMichal Krol <michal@vmware.com>2021-01-21 16:49:18 +0100
commitdef4750182b2c976ebd9c2e964f0fbd3159a4a54 (patch)
treec292092d1706bdb33383075785c0065525fe0340
parent1c4bf4178036198aca185a2eb6948b5c5ed91b2e (diff)
downloadpiglit-def4750182b2c976ebd9c2e964f0fbd3159a4a54.tar.gz
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: <https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/409>
-rw-r--r--tests/util/piglit-test-pattern.cpp4
1 files 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);