summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan
diff options
context:
space:
mode:
authorNanley Chery <[email protected]>2019-04-30 14:49:10 -0700
committerJuan A. Suarez Romero <[email protected]>2019-05-21 08:42:32 +0000
commitf69eb770cd7a5f31c5b84e0f117858e76e5b58e9 (patch)
treee867097e84bf3cce38dee3a5d138dd5f31e2c69e /src/intel/vulkan
parent5bed00cf0fac3d36b397f547d19f136db4843c7c (diff)
anv: Fix some depth buffer sampling cases on ICL+
Don't attempt sampling with HiZ if the sampler lacks support for it. On ICL, the HW docs state that sampling with HiZ is not supported and that instances of AUX_HIZ in the RENDER_SURFACE_STATE object will be interpreted as AUX_NONE. Cc: <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> (cherry picked from commit 629806b55bccd7f3e5b7b753820c4442fdb30bbe)
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r--src/intel/vulkan/anv_private.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index 7db41e23296..2d3abe3961b 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -3201,7 +3201,13 @@ anv_can_sample_with_hiz(const struct gen_device_info * const devinfo,
if (!(image->aspects & VK_IMAGE_ASPECT_DEPTH_BIT))
return false;
- if (devinfo->gen < 8)
+ /* 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
+ * far. Sampling fast-cleared blocks on BDW must also be handled with care
+ * (see depth_stencil_attachment_compute_aux_usage() for more info).
+ */
+ if (devinfo->gen != 8 && !devinfo->has_sample_with_hiz)
return false;
return image->samples == 1;