i965: Fix missing dirty bits related to is_drawing_points/lines.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 26 Aug 2016 06:00:13 +0000 (23:00 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 31 Aug 2016 18:50:15 +0000 (11:50 -0700)
calculate_attr_overrides() uses is_drawing_points(), which depends
on tessellation and geometry program state, as well as polygon state.

v2: Add missing _NEW_POLYGON as well.  Caught by Iago Toral.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
src/mesa/drivers/dri/i965/gen6_clip_state.c
src/mesa/drivers/dri/i965/gen7_sf_state.c
src/mesa/drivers/dri/i965/gen8_sf_state.c

index 4a3f7f97cf43eecc27d44b74ab3edf0b51b34d25..8a3d05a6a007ab75a05747fe981260d4da820b9a 100644 (file)
@@ -230,6 +230,9 @@ upload_clip_state(struct brw_context *brw)
    else
       enable = GEN6_CLIP_ENABLE;
 
+   /* _NEW_POLYGON,
+    * BRW_NEW_GEOMETRY_PROGRAM | BRW_NEW_TES_PROG_DATA | BRW_NEW_PRIMITIVE
+    */
    if (!brw_is_drawing_points(brw) && !brw_is_drawing_lines(brw))
       dw2 |= GEN6_CLIP_XY_TEST;
 
@@ -255,6 +258,7 @@ const struct brw_tracked_state gen6_clip_state = {
    .dirty = {
       .mesa  = _NEW_BUFFERS |
                _NEW_LIGHT |
+               _NEW_POLYGON |
                _NEW_TRANSFORM,
       .brw   = BRW_NEW_BLORP |
                BRW_NEW_CONTEXT |
@@ -281,6 +285,7 @@ const struct brw_tracked_state gen7_clip_state = {
                BRW_NEW_META_IN_PROGRESS |
                BRW_NEW_PRIMITIVE |
                BRW_NEW_RASTERIZER_DISCARD |
+               BRW_NEW_TES_PROG_DATA |
                BRW_NEW_VUE_MAP_GEOM_OUT,
    },
    .emit = upload_clip_state,
index ba0592a16560b670be79102db47531175e671e18..8727bf86efd887bb659fe16a9de690d77185a42a 100644 (file)
@@ -59,8 +59,10 @@ upload_sbe_state(struct brw_context *brw)
    }
    dw1 |= point_sprite_origin;
 
-   /* BRW_NEW_VUE_MAP_GEOM_OUT | BRW_NEW_FRAGMENT_PROGRAM
-    * _NEW_POINT | _NEW_LIGHT | _NEW_PROGRAM | BRW_NEW_FS_PROG_DATA
+   /* _NEW_POINT | _NEW_LIGHT | _NEW_PROGRAM,
+    * BRW_NEW_FS_PROG_DATA | BRW_NEW_FRAGMENT_PROGRAM |
+    * BRW_NEW_GEOMETRY_PROGRAM | BRW_NEW_PRIMITIVE | BRW_NEW_TES_PROG_DATA |
+    * BRW_NEW_VUE_MAP_GEOM_OUT
     */
    uint32_t urb_entry_read_length;
    uint32_t urb_entry_read_offset;
@@ -90,12 +92,14 @@ const struct brw_tracked_state gen7_sbe_state = {
       .mesa  = _NEW_BUFFERS |
                _NEW_LIGHT |
                _NEW_POINT |
+               _NEW_POLYGON |
                _NEW_PROGRAM,
       .brw   = BRW_NEW_BLORP |
                BRW_NEW_CONTEXT |
                BRW_NEW_FRAGMENT_PROGRAM |
                BRW_NEW_FS_PROG_DATA |
                BRW_NEW_GEOMETRY_PROGRAM |
+               BRW_NEW_TES_PROG_DATA |
                BRW_NEW_PRIMITIVE |
                BRW_NEW_VUE_MAP_GEOM_OUT,
    },
@@ -187,7 +191,9 @@ upload_sf_state(struct brw_context *brw)
       dw2 |= GEN6_SF_CULL_NONE;
    }
 
-   /* _NEW_SCISSOR _NEW_POLYGON BRW_NEW_GEOMETRY_PROGRAM BRW_NEW_PRIMITIVE */
+   /* _NEW_SCISSOR | _NEW_POLYGON,
+    * BRW_NEW_GEOMETRY_PROGRAM | BRW_NEW_PRIMITIVE | BRW_NEW_TES_PROG_DATA
+    */
    if (ctx->Scissor.EnableFlags ||
        brw_is_drawing_points(brw) || brw_is_drawing_lines(brw))
       dw2 |= GEN6_SF_SCISSOR_ENABLE;
@@ -256,7 +262,9 @@ const struct brw_tracked_state gen7_sf_state = {
                _NEW_SCISSOR,
       .brw   = BRW_NEW_BLORP |
                BRW_NEW_CONTEXT |
+               BRW_NEW_GEOMETRY_PROGRAM |
                BRW_NEW_PRIMITIVE |
+               BRW_NEW_TES_PROG_DATA |
                BRW_NEW_VUE_MAP_GEOM_OUT,
    },
    .emit = upload_sf_state,
index 0c4f1df6a8d271ec0b08fc6aa61aac0ef27240b0..93c77f74b697f54f5bb68f37ddb1b4717b3585ba 100644 (file)
@@ -60,8 +60,10 @@ upload_sbe(struct brw_context *brw)
    else
       dw1 |= GEN6_SF_POINT_SPRITE_UPPERLEFT;
 
-   /* BRW_NEW_VUE_MAP_GEOM_OUT | BRW_NEW_FRAGMENT_PROGRAM |
-    * _NEW_POINT | _NEW_LIGHT | _NEW_PROGRAM | BRW_NEW_FS_PROG_DATA
+   /* _NEW_POINT | _NEW_LIGHT | _NEW_PROGRAM,
+    * BRW_NEW_FS_PROG_DATA | BRW_NEW_FRAGMENT_PROGRAM |
+    * BRW_NEW_GEOMETRY_PROGRAM | BRW_NEW_PRIMITIVE | BRW_NEW_TES_PROG_DATA |
+    * BRW_NEW_VUE_MAP_GEOM_OUT
     */
    calculate_attr_overrides(brw, attr_overrides,
                             &point_sprite_enables,
@@ -132,11 +134,14 @@ const struct brw_tracked_state gen8_sbe_state = {
       .mesa  = _NEW_BUFFERS |
                _NEW_LIGHT |
                _NEW_POINT |
+               _NEW_POLYGON |
                _NEW_PROGRAM,
       .brw   = BRW_NEW_BLORP |
                BRW_NEW_CONTEXT |
                BRW_NEW_FRAGMENT_PROGRAM |
                BRW_NEW_FS_PROG_DATA |
+               BRW_NEW_GEOMETRY_PROGRAM |
+               BRW_NEW_TES_PROG_DATA |
                BRW_NEW_VUE_MAP_GEOM_OUT,
    },
    .emit = upload_sbe,