i965/blorp/gen6: Remove dead code in hiz setup
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Tue, 10 Jan 2017 08:24:26 +0000 (10:24 +0200)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Fri, 27 Jan 2017 06:57:26 +0000 (08:57 +0200)
Such as comment states for intel_miptree_hiz_buffer::mt, hiz_mt
only exists for gen6. In addition, intel_hiz_miptree_buf_create()
uses MIPTREE_LAYOUT_FORCE_ALL_SLICE_AT_LOD unconditionally.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/brw_blorp.c

index f21b41a4e3ba8b4152db2bd5c72816b8dfd3d6b0..52f85ff0677646a36f7294222d8540f138076de0 100644 (file)
@@ -250,15 +250,15 @@ blorp_surf_for_miptree(struct brw_context *brw,
 
          struct intel_mipmap_tree *hiz_mt = mt->hiz_buf->mt;
          if (hiz_mt) {
-            if (brw->gen == 6 &&
-                hiz_mt->array_layout == ALL_SLICES_AT_EACH_LOD) {
-               /* gen6 requires the HiZ buffer to be manually offset to the
-                * right location.  We could fixup the surf but it doesn't
-                * matter since most of those fields don't matter.
-                */
-               apply_gen6_stencil_hiz_offset(aux_surf, hiz_mt, *level,
-                                             &surf->aux_addr.offset);
-            }
+            assert(brw->gen == 6 &&
+                   hiz_mt->array_layout == ALL_SLICES_AT_EACH_LOD);
+
+            /* gen6 requires the HiZ buffer to be manually offset to the
+             * right location.  We could fixup the surf but it doesn't
+             * matter since most of those fields don't matter.
+             */
+            apply_gen6_stencil_hiz_offset(aux_surf, hiz_mt, *level,
+                                          &surf->aux_addr.offset);
             assert(hiz_mt->pitch == aux_surf->row_pitch);
          }
       }