diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c index e8e47eca9b5..b89dc1b1ef7 100644 --- a/src/intel/vulkan/anv_formats.c +++ b/src/intel/vulkan/anv_formats.c @@ -571,7 +571,7 @@ anv_get_image_format_features2(const struct anv_physical_device *physical_device assert((isl_mod_info != NULL) == (vk_tiling == VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT)); - if (anv_is_format_emulated(physical_device, vk_format)) { + if (anv_is_compressed_format_emulated(physical_device, vk_format)) { assert(isl_format_is_compressed(anv_format->planes[0].isl_format)); /* require optimal tiling so that we can decompress on upload */ @@ -1523,7 +1523,7 @@ anv_get_image_format_properties( /* We don't want emulated formats to gain unexpected usage (storage in * particular) from its compatible view formats. */ - if (anv_is_format_emulated(physical_device, info->format)) + if (anv_is_compressed_format_emulated(physical_device, info->format)) goto unsupported; /* From the Vulkan 1.3.224 spec "43.1.6. Format Compatibility Classes": diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index c8313e3b8e8..fc0ce7df5a5 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -1688,13 +1688,13 @@ anv_image_init(struct anv_device *device, struct anv_image *image, image->disjoint = image->n_planes > 1 && (pCreateInfo->flags & VK_IMAGE_CREATE_DISJOINT_BIT); - if (anv_is_format_emulated(device->physical, pCreateInfo->format)) { + if (anv_is_compressed_format_emulated(device->physical, pCreateInfo->format)) { assert(image->n_planes == 1 && vk_format_is_compressed(image->vk.format)); assert(!(image->vk.create_flags & VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT)); - image->emu_plane_format = - anv_get_emulation_format(device->physical, image->vk.format); + image->emu_plane_format = anv_get_compressed_format_emulation( + device->physical, image->vk.format); /* for fetching the raw copmressed data and storing the decompressed * data diff --git a/src/intel/vulkan/anv_image_view.c b/src/intel/vulkan/anv_image_view.c index bf9e357b15c..33fbff73b10 100644 --- a/src/intel/vulkan/anv_image_view.c +++ b/src/intel/vulkan/anv_image_view.c @@ -265,10 +265,10 @@ anv_image_view_init(struct anv_device *device, anv_aspect_to_plane(iview->vk.aspects, 1UL << iaspect_bit); VkFormat view_format = iview->vk.view_format; - if (anv_is_format_emulated(device->physical, view_format)) { + if (anv_is_compressed_format_emulated(device->physical, view_format)) { assert(image->emu_plane_format != VK_FORMAT_UNDEFINED); view_format = - anv_get_emulation_format(device->physical, view_format); + anv_get_compressed_format_emulation(device->physical, view_format); } const struct anv_format_plane format = anv_get_format_plane( device->physical, view_format, vplane, image->vk.tiling); diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 73f99823756..cdc30d63c60 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -5323,7 +5323,8 @@ extern VkFormat vk_format_from_android(unsigned android_format, unsigned android_usage); static inline VkFormat -anv_get_emulation_format(const struct anv_physical_device *pdevice, VkFormat format) +anv_get_compressed_format_emulation(const struct anv_physical_device *pdevice, + VkFormat format) { if (pdevice->flush_astc_ldr_void_extent_denorms) { const struct util_format_description *desc = @@ -5340,9 +5341,11 @@ anv_get_emulation_format(const struct anv_physical_device *pdevice, VkFormat for } static inline bool -anv_is_format_emulated(const struct anv_physical_device *pdevice, VkFormat format) +anv_is_compressed_format_emulated(const struct anv_physical_device *pdevice, + VkFormat format) { - return anv_get_emulation_format(pdevice, format) != VK_FORMAT_UNDEFINED; + return anv_get_compressed_format_emulation(pdevice, + format) != VK_FORMAT_UNDEFINED; } static inline struct isl_swizzle diff --git a/src/intel/vulkan/anv_sparse.c b/src/intel/vulkan/anv_sparse.c index 251f5979b9a..b12c1a12eab 100644 --- a/src/intel/vulkan/anv_sparse.c +++ b/src/intel/vulkan/anv_sparse.c @@ -1526,7 +1526,7 @@ anv_sparse_image_check_support(struct anv_physical_device *pdevice, * formats due to the additional image plane. It would make the * implementation extremely complicated. */ - if (anv_is_format_emulated(pdevice, vk_format)) + if (anv_is_compressed_format_emulated(pdevice, vk_format)) return VK_ERROR_FORMAT_NOT_SUPPORTED; /* While the spec itself says linear is not supported (see above), deqp-vk