i965: Merge gen7_clip_state atom into gen6_clip_state atom.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 30 Aug 2016 20:16:02 +0000 (13:16 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 31 Aug 2016 19:42:09 +0000 (12:42 -0700)
The original motivation was that gen6_clip_state ignored _NEW_POLYGON
as it didn't care about early culling.  The only other change was that
Gen6 ignored BRW_NEW_TES_PROG_DATA as it doesn't have tessellation
shaders, but listening to this is harmless as it'll never be signalled.

Now that we've added _NEW_POLYGON for is_drawing_lines/points, we can
merge the two as the distinction is meaningless.

This actually fixes a bug, though: Gen8+ was using the gen6_clip_state
atom because it doesn't care about early culling, but it also needs
BRW_NEW_TES_PROG_DATA, which was missing.

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

index 43bab9ebe1ed745d28012f072e98dbd7101f91b5..bfcdf29904eac836e744b6e7048ee7691cb0733f 100644 (file)
@@ -131,7 +131,6 @@ extern const struct brw_tracked_state gen6_vs_state;
 extern const struct brw_tracked_state gen6_wm_push_constants;
 extern const struct brw_tracked_state gen6_wm_state;
 extern const struct brw_tracked_state gen7_depthbuffer;
-extern const struct brw_tracked_state gen7_clip_state;
 extern const struct brw_tracked_state gen7_ds_state;
 extern const struct brw_tracked_state gen7_gs_state;
 extern const struct brw_tracked_state gen7_tcs_push_constants;
index 69acf3b203632ab1adced8dd8129609e6e673709..60f3be66a2c9bd474ec296cac55e8593bd59c735 100644 (file)
@@ -237,7 +237,7 @@ static const struct brw_tracked_state *gen7_render_atoms[] =
    &gen7_ds_state,
    &gen7_gs_state,
    &gen7_sol_state,
-   &gen7_clip_state,
+   &gen6_clip_state,
    &gen7_sbe_state,
    &gen7_sf_state,
    &gen7_wm_state,
index 1c5b9441d5acccdd6744c64ebd617592a5568c18..7dc974043696285989563caeaebbaab29b5161aa 100644 (file)
@@ -255,24 +255,6 @@ upload_clip_state(struct brw_context *brw)
 }
 
 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 |
-               BRW_NEW_FS_PROG_DATA |
-               BRW_NEW_GS_PROG_DATA |
-               BRW_NEW_META_IN_PROGRESS |
-               BRW_NEW_PRIMITIVE |
-               BRW_NEW_RASTERIZER_DISCARD |
-               BRW_NEW_VUE_MAP_GEOM_OUT,
-   },
-   .emit = upload_clip_state,
-};
-
-const struct brw_tracked_state gen7_clip_state = {
    .dirty = {
       .mesa  = _NEW_BUFFERS |
                _NEW_LIGHT |