i965/hiz/gen6: Stop setting false qpitch
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Wed, 11 Jan 2017 08:26:32 +0000 (10:26 +0200)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Fri, 27 Jan 2017 06:57:26 +0000 (08:57 +0200)
which is not applicable for "all slices at each lod". Current
logic makes one to believe it has some purpose. When miptree
layout is calculated brw_miptree_layout_texture_array() sets
the qpitch unconditionally but later on ignores it altogether
for ALL_SLICES_AT_EACH_LOD.

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

index 53dac330ef6c5191abe6d845ef6d79e1dd96bfd3..31049b3f4aca579cf053f135754c06b8a075162a 100644 (file)
@@ -1904,7 +1904,13 @@ intel_hiz_miptree_buf_create(struct brw_context *brw,
    buf->aux_base.bo = buf->mt->bo;
    buf->aux_base.size = buf->mt->total_height * buf->mt->pitch;
    buf->aux_base.pitch = buf->mt->pitch;
-   buf->aux_base.qpitch = buf->mt->qpitch;
+
+   /* On gen6 hiz is unconditionally laid out packing all slices
+    * at each level-of-detail (LOD). This means there is no valid qpitch
+    * setting. In fact, this is ignored when hardware is setup - there is no
+    * hardware qpitch setting of hiz on gen6.
+    */
+   buf->aux_base.qpitch = 0;
 
    return buf;
 }