i965/gen7: Fix feedback for flat-shaded tristrips versus provoking vertex.
authorEric Anholt <eric@anholt.net>
Fri, 23 Dec 2011 00:23:46 +0000 (16:23 -0800)
committerEric Anholt <eric@anholt.net>
Sat, 24 Dec 2011 06:07:20 +0000 (22:07 -0800)
Fixes piglit tesselation triangle_strip flat_last.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v1)
Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/mesa/drivers/dri/i965/gen7_sol_state.c

index 3b6fc8ecb167a6ac25b7fd08f973c1fc00c2cee7..734686617b4c396f6d08a2680b3662d6f5f385d0 100644 (file)
@@ -187,6 +187,10 @@ upload_3dstate_streamout(struct brw_context *brw, bool active,
       dw1 |= SO_FUNCTION_ENABLE;
       dw1 |= SO_STATISTICS_ENABLE;
 
+      /* _NEW_LIGHT */
+      if (ctx->Light.ProvokingVertex != GL_FIRST_VERTEX_CONVENTION)
+        dw1 |= SO_REORDER_TRAILING;
+
       for (i = 0; i < 4; i++) {
         if (xfb_obj->Buffers[i]) {
            dw1 |= SO_BUFFER_ENABLE(i);
@@ -240,6 +244,7 @@ upload_sol_state(struct brw_context *brw)
 const struct brw_tracked_state gen7_sol_state = {
    .dirty = {
       .mesa  = (_NEW_RASTERIZER_DISCARD |
+               _NEW_LIGHT |
                _NEW_TRANSFORM_FEEDBACK |
                _NEW_TRANSFORM),
       .brw   = (BRW_NEW_BATCH |