aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_private.h
diff options
context:
space:
mode:
authorDanylo Piliaiev <[email protected]>2020-04-01 18:41:03 +0300
committerMarge Bot <[email protected]>2020-04-01 20:12:29 +0000
commite47bf7dadff612694cf61eedbabc7b313766053f (patch)
treef6ef270255e367b3ba1204ebccbda600e32547ae /src/intel/vulkan/anv_private.h
parent0487130d3477c85abee77018e17d0ffe2d136349 (diff)
anv: Do not sample from 3d depth image with HiZ
For Gen8-11, there are some restrictions around sampling from HiZ. The Skylake PRM docs for RENDER_SURFACE_STATE::AuxiliarySurfaceMode say: "If this field is set to AUX_HIZ, Number of Multisamples must be MULTISAMPLECOUNT_1, and Surface Type cannot be SURFTYPE_3D." Fixes: dEQP-VK.geometry.layered.3d.*.readback Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2720 Signed-off-by: Danylo Piliaiev <[email protected]> Reviewed-by: Arcady Goldmints-Orlov <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4409> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4409>
Diffstat (limited to 'src/intel/vulkan/anv_private.h')
-rw-r--r--src/intel/vulkan/anv_private.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index d4e237025d0..d7134101c20 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -3684,6 +3684,16 @@ anv_can_sample_with_hiz(const struct gen_device_info * const devinfo,
if (!(image->aspects & VK_IMAGE_ASPECT_DEPTH_BIT))
return false;
+ /* For Gen8-11, there are some restrictions around sampling from HiZ.
+ * The Skylake PRM docs for RENDER_SURFACE_STATE::AuxiliarySurfaceMode
+ * say:
+ *
+ * "If this field is set to AUX_HIZ, Number of Multisamples must
+ * be MULTISAMPLECOUNT_1, and Surface Type cannot be SURFTYPE_3D."
+ */
+ if (image->type == VK_IMAGE_TYPE_3D)
+ return false;
+
/* Allow this feature on BDW even though it is disabled in the BDW devinfo
* struct. There's documentation which suggests that this feature actually
* reduces performance on BDW, but it has only been observed to help so