anv/sparse: we can support R64 and other atomics emulated formats

We set sparseImageInt64Atomics to false on these formats, so there's
no need for the software detiling. Thus, we can not set the flag,
which will make ISL pick Tile64 for these formats, and things will
work.

Thanks to Lionel for pointing the fix here.

Testcase: dEQP-VK.api.info.image_format_properties.*d.optimal.r64_*int
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Iván Briano <ivan.briano@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35524>
This commit is contained in:
Paulo Zanoni 2025-07-28 14:06:57 -07:00
parent d5da6980d3
commit a1628aba1f
2 changed files with 7 additions and 5 deletions

View file

@ -312,7 +312,13 @@ anv_image_choose_isl_surf_usage(struct anv_physical_device *device,
if (comp_flags & VK_IMAGE_COMPRESSION_DISABLED_EXT)
isl_usage |= ISL_SURF_USAGE_DISABLE_AUX_BIT;
if (anv_is_storage_format_atomics_emulated(devinfo, vk_format)) {
/* We only need software detiling for 64bit atomics and we need to disable
* AUX for software detiling, but we don't support sparseImageInt64Atomics,
* so don't set the flags when using sparse, as they affect which tiling
* format ISL will choose.
*/
if (anv_is_storage_format_atomics_emulated(devinfo, vk_format) &&
(vk_create_flags & VK_IMAGE_CREATE_SPARSE_BINDING_BIT) == 0) {
isl_usage |= ISL_SURF_USAGE_DISABLE_AUX_BIT |
ISL_SURF_USAGE_SOFTWARE_DETILING;
}

View file

@ -1590,10 +1590,6 @@ anv_sparse_image_check_support(struct anv_physical_device *pdevice,
if (anv_is_compressed_format_emulated(pdevice, vk_format))
return VK_ERROR_FORMAT_NOT_SUPPORTED;
/* Avoid emulated formats */
if (anv_is_storage_format_atomics_emulated(&pdevice->info, vk_format))
return VK_ERROR_FORMAT_NOT_SUPPORTED;
/* While the spec itself says linear is not supported (see above), deqp-vk
* tries anyway to create linear sparse images, so we have to check for it.
* This is also said in VUID-VkImageCreateInfo-tiling-04121: