On 01/10/2013 01:57 PM, Eric Anholt wrote:
Brian Paul<[email protected]>  writes:
+       printf("clipflat: Failure for %s(%s),"
+              " glFrontFace(%s), glPolygonMode(%s)\n",
+              d, m, f, p);
+       printf("\ttranslation: %f, %f\n", x, y);
+
+       if (testing_first_pv)
+               printf("\tGL_EXT_provoking_vertex test: "
+                      "GL_FIRST_VERTEX_CONVENTION_EXT mode\n");
+
+       printf("\tExpected color (0, 1, 0) but found (%g, %g, %g)\n",
+              badColor[0], badColor[1], badColor[2]);
+}

We usually print error reports to stderr.

+enum piglit_result
+piglit_display(void)
+{
+       bool pass = true;
+
+       testing_first_pv = false;
+
+       pass = testPrim(GL_TRIANGLES,
+                       (GLfloat *) TriVerts,
+                       ARRAY_SIZE(TriVerts))&&  pass;
+
+       pass = testPrim(GL_TRIANGLE_STRIP,
+                       (GLfloat *) TriStripVerts,
+                       ARRAY_SIZE(TriStripVerts))&&  pass;
+
+       pass = testPrim(GL_TRIANGLE_FAN,
+                       (GLfloat *) TriFanVerts,
+                       ARRAY_SIZE(TriFanVerts))&&  pass;
+
+       pass = testPrim(GL_QUADS,
+                       (GLfloat *) QuadVerts,
+                       ARRAY_SIZE(QuadVerts))&&  pass;
+
+       pass = testPrim(GL_QUAD_STRIP,
+                       (GLfloat *) QuadStripVerts,
+                       ARRAY_SIZE(QuadStripVerts))&&  pass;
+
+       pass = testPrim(GL_POLYGON,
+                       (GLfloat *) PolygonVerts,
+                       ARRAY_SIZE(PolygonVerts))&&  pass;
+
+       if (provoking_vertex_first) {
+               glProvokingVertex(GL_FIRST_VERTEX_CONVENTION_EXT);
+               testing_first_pv = true;
+
+               pass = testPrim(GL_TRIANGLES,
+                               (GLfloat *) TriVertsFirstPV,
+                               ARRAY_SIZE(TriVertsFirstPV))&&  pass;
+
+               pass = testPrim(GL_TRIANGLE_STRIP,
+                               (GLfloat *) TriStripVertsFirstPV,
+                               ARRAY_SIZE(TriStripVertsFirstPV))&&  pass;
+
+               pass = testPrim(GL_TRIANGLE_FAN,
+                               (GLfloat *) TriFanVertsFirstPV,
+                               ARRAY_SIZE(TriFanVertsFirstPV))&&  pass;
+
+               if (quads_follows_pv_convention)
+                       pass = testPrim(GL_QUADS,
+                                       (GLfloat *) QuadVertsFirstPV,
+                                       ARRAY_SIZE(QuadVertsFirstPV))&&  pass;
+               else
+                       pass = testPrim(GL_QUADS,
+                                       (GLfloat *) QuadVerts,
+                                       ARRAY_SIZE(QuadVerts))&&  pass;
+
+               if (quads_follows_pv_convention)
+                       pass = testPrim(GL_QUAD_STRIP,
+                                       (GLfloat *) QuadStripVertsFirstPV,
+                                       ARRAY_SIZE(QuadStripVertsFirstPV))&&  
pass;
+               else
+                       pass = testPrim(GL_QUAD_STRIP,
+                                       (GLfloat *) QuadStripVerts,
+                                       ARRAY_SIZE(QuadStripVerts))&&  pass;
+
+               pass  = testPrim(GL_POLYGON,
+                                (GLfloat *) PolygonVerts,
+                                ARRAY_SIZE(PolygonVerts))&&  pass;
+       }

This looks like a candidate for the subtest report support,

The what?  I'm not familiar with that.


if it's not
going to grow a command-line argument to choose the mode (which of
course is preferred).

I really don't have time for anything fancy. I'm just trying to port tests as-is for now.


Overall, looks good.  I assume glean clipflat will be dropped when this
lands?

Yes.  I'll post a separate patch for that later.

-Brian
_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to