anv: fix incorrect aspect flag for depth/stencil formats

We're asking if compression is supported and
anv_formats_ccs_e_compatible() is assuming color aspect.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 0317c44872 ("anv: add VK_EXT_host_image_copy support")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12155
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
(cherry picked from commit 431f353bfe)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32261>
This commit is contained in:
Lionel Landwerlin
2024-11-15 09:08:04 +02:00
committed by Dylan Baker
parent a3a064b92c
commit d857c4a418
2 changed files with 5 additions and 4 deletions

View File

@@ -394,7 +394,7 @@
"description": "anv: fix incorrect aspect flag for depth/stencil formats",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "0317c448727b2558a3748b7d621d6006de5ba51b",
"notes": null

View File

@@ -478,6 +478,7 @@ storage_image_format_supports_atomic(const struct intel_device_info *devinfo,
static bool
formats_ccs_e_compatible(const struct intel_device_info *devinfo,
VkImageCreateFlags create_flags,
VkImageAspectFlagBits aspect,
enum isl_format format, VkImageTiling vk_tiling,
const VkImageFormatListCreateInfo *fmt_list)
{
@@ -500,7 +501,7 @@ formats_ccs_e_compatible(const struct intel_device_info *devinfo,
enum isl_format view_format =
anv_get_isl_format(devinfo, fmt_list->pViewFormats[i],
VK_IMAGE_ASPECT_COLOR_BIT, vk_tiling);
aspect, vk_tiling);
if (!isl_formats_are_ccs_e_compatible(devinfo, format, view_format))
return false;
@@ -534,8 +535,8 @@ anv_formats_ccs_e_compatible(const struct intel_device_info *devinfo,
enum isl_format format =
anv_get_isl_format(devinfo, vk_format, aspect, vk_tiling);
if (!formats_ccs_e_compatible(devinfo, create_flags, format, vk_tiling,
fmt_list))
if (!formats_ccs_e_compatible(devinfo, create_flags, aspect,
format, vk_tiling, fmt_list))
return false;
if (vk_usage & VK_IMAGE_USAGE_STORAGE_BIT) {