anv/sparse: we can't do multi-sampled depth/stencil sparse images

Our hardware has more than one layout for multi-sampled images that
use the tiling formats that give us the sparse standard block shapes:
see enum isl_msaa_layout. Only the layout we use for colored images is
compatible with the standard block shapes, so it's the only one we can
expose for multi-sampled sparse.

This change affects a number of dEQP tests, including:
  - dEQP-VK.memory.requirements.create_info.image.sparse_residency_aliased_tiling_optimal

Without this patch, and with sparse multi-sampling enabled, this test
would hit the following assertion:
  anv_sparse.c:866: anv_sparse_calc_image_format_properties: Assertion `is_standard || is_known_nonstandard_format' failed.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27306>
This commit is contained in:
Paulo Zanoni 2024-01-25 15:41:33 -08:00 committed by Marge Bot
parent 6d38801ebd
commit af725a2ccc

View file

@ -1205,6 +1205,13 @@ anv_sparse_image_check_support(struct anv_physical_device *pdevice,
*/
VkImageAspectFlags aspects = vk_format_aspects(vk_format);
if (aspects & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) {
/* For multi-sampled images, the image layouts for color and
* depth/stencil are different, and only the color layout is compatible
* with the standard block shapes.
*/
if (samples != VK_SAMPLE_COUNT_1_BIT)
return VK_ERROR_FORMAT_NOT_SUPPORTED;
/* For 125+, isl_gfx125_filter_tiling() claims 3D is not supported.
* For the previous platforms, isl_gfx6_filter_tiling() says only 2D is
* supported.