mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-24 16:50:22 +01:00
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 <danylo.piliaiev@globallogic.com>
Reviewed-by: Arcady Goldmints-Orlov <agoldmints@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4409>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4409>
This commit is contained in:
parent
0487130d34
commit
e47bf7dadf
1 changed files with 10 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue