i965: Use the brw_depthbuffer atom on all gens
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 5 May 2018 05:41:19 +0000 (22:41 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 8 May 2018 15:27:44 +0000 (08:27 -0700)
The only reason why we had two atoms was that the one we used for gen7+
depended on _NEW_DEPTH and _NEW_STENCIL as well as _NEW_BUFFERS.  Since
this is no longer true, we can combine them into one atom.  We do add a
dependence on BRW_NEW_AUX_STATE but that should never get set on gen4-5
so adding it is a no-op for those platforms.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_misc_state.c
src/mesa/drivers/dri/i965/brw_state.h
src/mesa/drivers/dri/i965/gen7_misc_state.c
src/mesa/drivers/dri/i965/genX_state_upload.c

index 05517ebf5878b8892a3341f6bb827e9b4e1e3d96..0ab1f1280118b519c7f21122a8addf4f04a7f804 100644 (file)
@@ -410,7 +410,8 @@ brw_emit_depth_stencil_hiz(struct brw_context *brw,
 const struct brw_tracked_state brw_depthbuffer = {
    .dirty = {
       .mesa = _NEW_BUFFERS,
-      .brw = BRW_NEW_BATCH |
+      .brw = BRW_NEW_AUX_STATE |
+             BRW_NEW_BATCH |
              BRW_NEW_BLORP,
    },
    .emit = brw_emit_depthbuffer,
index 0417cc2aae00a470aa39f1a4ec57bd7c50ad15f2..f89182a00170ab58a1db931f9de435d8309c3015 100644 (file)
@@ -89,7 +89,6 @@ extern const struct brw_tracked_state gen6_sampler_state;
 extern const struct brw_tracked_state gen6_sol_surface;
 extern const struct brw_tracked_state gen6_sf_vp;
 extern const struct brw_tracked_state gen6_urb;
-extern const struct brw_tracked_state gen7_depthbuffer;
 extern const struct brw_tracked_state gen7_l3_state;
 extern const struct brw_tracked_state gen7_push_constant_space;
 extern const struct brw_tracked_state gen7_urb;
index 42ab271e6ae7d2c74b5362454026a3d01e6ccb72..5c88cf55fa0b96f3db24dedb83cdfb7d16cbfbdb 100644 (file)
@@ -186,16 +186,3 @@ gen7_emit_depth_stencil_hiz(struct brw_context *brw,
 
    brw->no_depth_or_stencil = !mt;
 }
-
-/**
- * \see brw_context.state.depth_region
- */
-const struct brw_tracked_state gen7_depthbuffer = {
-   .dirty = {
-      .mesa = _NEW_BUFFERS,
-      .brw = BRW_NEW_AUX_STATE |
-             BRW_NEW_BATCH |
-             BRW_NEW_BLORP,
-   },
-   .emit = brw_emit_depthbuffer,
-};
index b1867c1a1ccaf2650be29003cabeb994762eea91..091e4137aa190280900bbde0307b2fc6f0f52887 100644 (file)
@@ -5603,7 +5603,7 @@ genX(init_atoms)(struct brw_context *brw)
 
       &genX(scissor_state),
 
-      &gen7_depthbuffer,
+      &brw_depthbuffer,
 
       &genX(polygon_stipple),
       &genX(polygon_stipple_offset),
@@ -5694,7 +5694,7 @@ genX(init_atoms)(struct brw_context *brw)
 
       &genX(scissor_state),
 
-      &gen7_depthbuffer,
+      &brw_depthbuffer,
 
       &genX(polygon_stipple),
       &genX(polygon_stipple_offset),