[Piglit] [PATCH 08/17] !NOPUSH Verify project results using gluProject
Ian Romanick
idr at freedesktop.org
Tue Sep 22 08:36:33 PDT 2015
From: Ian Romanick <ian.d.romanick at intel.com>
---
tests/spec/gl-1.4/polygon-offset.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/tests/spec/gl-1.4/polygon-offset.c b/tests/spec/gl-1.4/polygon-offset.c
index b1b8262..abf659d 100644
--- a/tests/spec/gl-1.4/polygon-offset.c
+++ b/tests/spec/gl-1.4/polygon-offset.c
@@ -140,6 +140,24 @@ project(double x, double y, double z, const double *modelview,
result[0] = viewport[0] + (viewport[2] * ((vp[0] + 1.0) / 2.0));
result[1] = viewport[1] + (viewport[3] * ((vp[1] + 1.0) / 2.0));
result[2] = (vp[2] + 1.0) / 2.0;
+
+#if 0
+ {
+ double rx, ry, rz;
+
+ gluProject(x, y, z, modelview, projection, viewport,
+ &rx, &ry, &rz);
+
+ if (result[0] != rx || result[1] != ry || result[2] != rz) {
+ fprintf(stderr,
+ "Projection failure. Got (%f, %f, %f) but "
+ "expected (%f, %f, %f).\n",
+ result[0], result[1], result[2],
+ rx, ry, rz);
+ exit(1);
+ }
+ }
+#endif
}
static void
--
2.1.0
More information about the Piglit
mailing list