i965: Remove check for hiz on earlier gens than SNB
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Wed, 28 Dec 2016 15:49:56 +0000 (17:49 +0200)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Fri, 27 Jan 2017 06:57:26 +0000 (08:57 +0200)
Only caller, brw_workaround_depthstencil_alignment(), returns
early for gen6+.

While at it, reduce scope for brw_get_depthstencil_tile_masks() as
well.

Reviewed-by: Samuel Iglesias Gons\341lvez <siglesias@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_misc_state.c

index aa1499a1fe13f70af2f0200db38dddc8bc2e3013..01e651b09f0399897f3b1e0f80ee4cb20ad6ba03 100644 (file)
@@ -1246,12 +1246,6 @@ brw_meta_resolve_color(struct brw_context *brw,
 /*======================================================================
  * brw_misc_state.c
  */
-void brw_get_depthstencil_tile_masks(struct intel_mipmap_tree *depth_mt,
-                                     uint32_t depth_level,
-                                     uint32_t depth_layer,
-                                     struct intel_mipmap_tree *stencil_mt,
-                                     uint32_t *out_tile_mask_x,
-                                     uint32_t *out_tile_mask_y);
 void brw_workaround_depthstencil_alignment(struct brw_context *brw,
                                            GLbitfield clear_mask);
 
index 40a8d07bfb468d03e37e60c632be7868f5d60abe..616c0dff862fd2e971acc92f83a67f5c6c474da5 100644 (file)
@@ -165,7 +165,7 @@ brw_depthbuffer_format(struct brw_context *brw)
  * packet.  If the 3 buffers don't agree on the drawing offset ANDed with this
  * mask, then we're in trouble.
  */
-void
+static void
 brw_get_depthstencil_tile_masks(struct intel_mipmap_tree *depth_mt,
                                 uint32_t depth_level,
                                 uint32_t depth_layer,
@@ -179,21 +179,7 @@ brw_get_depthstencil_tile_masks(struct intel_mipmap_tree *depth_mt,
       intel_get_tile_masks(depth_mt->tiling, depth_mt->tr_mode,
                            depth_mt->cpp,
                            &tile_mask_x, &tile_mask_y);
-
-      if (intel_miptree_level_has_hiz(depth_mt, depth_level)) {
-         uint32_t hiz_tile_mask_x, hiz_tile_mask_y;
-         intel_get_tile_masks(depth_mt->hiz_buf->mt->tiling,
-                              depth_mt->hiz_buf->mt->tr_mode,
-                              depth_mt->hiz_buf->mt->cpp,
-                              &hiz_tile_mask_x,
-                              &hiz_tile_mask_y);
-
-         /* Each HiZ row represents 2 rows of pixels */
-         hiz_tile_mask_y = hiz_tile_mask_y << 1 | 1;
-
-         tile_mask_x |= hiz_tile_mask_x;
-         tile_mask_y |= hiz_tile_mask_y;
-      }
+      assert(!intel_miptree_level_has_hiz(depth_mt, depth_level));
    }
 
    if (stencil_mt) {