[Piglit] [PATCH 2/3] draw-vertices-2101010: add support for the SNORM equation 2.3
Marek Olšák
maraeo at gmail.com
Wed Aug 6 15:54:37 PDT 2014
From: Marek Olšák <marek.olsak at amd.com>
---
tests/spec/arb_vertex_type_2_10_10_10_rev/draw-vertices-2101010.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tests/spec/arb_vertex_type_2_10_10_10_rev/draw-vertices-2101010.c b/tests/spec/arb_vertex_type_2_10_10_10_rev/draw-vertices-2101010.c
index fd34ee5..2c47372 100644
--- a/tests/spec/arb_vertex_type_2_10_10_10_rev/draw-vertices-2101010.c
+++ b/tests/spec/arb_vertex_type_2_10_10_10_rev/draw-vertices-2101010.c
@@ -209,6 +209,10 @@ piglit_display(void)
GLboolean pass = GL_TRUE;
unsigned i;
float x = 0, y = 0;
+ /* To know what this is all about, see:
+ * http://lists.freedesktop.org/archives/mesa-dev/2013-August/042680.html
+ */
+ GLboolean snorm_equation_23 = piglit_get_gl_version() >= 42;
glClear(GL_COLOR_BUFFER_BIT);
glEnableClientState(GL_VERTEX_ARRAY);
@@ -217,6 +221,9 @@ piglit_display(void)
for (i = 0; tests[i].test; i++) {
glBindBuffer(GL_ARRAY_BUFFER, 0);
+ if (snorm_equation_23 && fabs(tests[i].expected_color[3] - 0.333) < 0.0001)
+ tests[i].expected_color[3] = 0;
+
printf("%s\n", tests[i].name);
tests[i].test(x, y, x+20, y+20, tests[i].index);
assert(glGetError() == 0);
--
1.9.1
More information about the Piglit
mailing list