summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-11-25 22:09:30 -0800
committerEmil Velikov <emil.l.velikov@gmail.com>2016-12-14 19:03:10 +0000
commit8b9f8d306244f1977b0d1bb255ce84709e4b6cf4 (patch)
tree363e5c20ee3c7985f0114a0c297fc3248dd7eef9
parent59be849daf78b04b62f4962aa6eb8c2615d51370 (diff)
downloadexternal_mesa3d-8b9f8d306244f1977b0d1bb255ce84709e4b6cf4.zip
external_mesa3d-8b9f8d306244f1977b0d1bb255ce84709e4b6cf4.tar.gz
external_mesa3d-8b9f8d306244f1977b0d1bb255ce84709e4b6cf4.tar.bz2
anv/cmd_buffer: Remove the 1-D case from the HiZ QPitch calculation
The 1-D special case doesn't actually apply to depth or HiZ. I discovered this while converting BLORP over to genxml and ISL. The reason is that the 1-D special case only applies to the new Sky Lake 1-D layout which is only used for LINEAR 1-D images. For tiled 1-D images, such as depth buffers, the old gen4 2-D layout is used and the QPitch should be in rows. Reviewed-by: Nanley Chery <nanley.g.chery@intel.com> Cc: "13.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit f469235a6e0c239166ba803e121994063b47ddd3)
-rw-r--r--src/intel/vulkan/genX_cmd_buffer.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index 0b44abb..4e92cca 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -1812,11 +1812,14 @@ cmd_buffer_emit_depth_stencil(struct anv_cmd_buffer *cmd_buffer)
* - SURFTYPE_1D: distance in pixels between array slices
* - SURFTYPE_2D/CUBE: distance in rows between array slices
* - SURFTYPE_3D: distance in rows between R - slices
+ *
+ * Unfortunately, the docs aren't 100% accurate here. They fail to
+ * mention that the 1-D rule only applies to linear 1-D images.
+ * Since depth and HiZ buffers are always tiled, they are treated as
+ * 2-D images. Prior to Sky Lake, this field is always in rows.
*/
hdb.SurfaceQPitch =
- image->aux_surface.isl.dim == ISL_SURF_DIM_1D ?
- isl_surf_get_array_pitch_el(&image->aux_surface.isl) >> 2 :
- isl_surf_get_array_pitch_el_rows(&image->aux_surface.isl) >> 2;
+ isl_surf_get_array_pitch_el_rows(&image->aux_surface.isl) >> 2;
#endif
}
} else {