From 9eda61c9311862176d4f3080f838bb22c88da9d5 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 26 Sep 2023 16:48:00 -0700 Subject: [PATCH] vulkan/runtime, radv: remove 1D support from ETC2 emulation The nir code deos not support 1D. There is also no point in supporting 1D ETC2 images. Part-of: --- src/amd/vulkan/radv_formats.c | 2 ++ src/vulkan/runtime/vk_texcompress_etc2.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c index 003e5624227..a7b1d7a8fad 100644 --- a/src/amd/vulkan/radv_formats.c +++ b/src/amd/vulkan/radv_formats.c @@ -1335,6 +1335,8 @@ radv_get_image_format_properties(struct radv_physical_device *physical_device, if (format_feature_flags == 0) goto unsupported; + if (info->type == VK_IMAGE_TYPE_1D && (desc->layout == UTIL_FORMAT_LAYOUT_ETC && physical_device->emulate_etc2)) + goto unsupported; if (info->type != VK_IMAGE_TYPE_2D && vk_format_is_depth_or_stencil(format)) goto unsupported; diff --git a/src/vulkan/runtime/vk_texcompress_etc2.h b/src/vulkan/runtime/vk_texcompress_etc2.h index 87e74bad802..f8e6269ebec 100644 --- a/src/vulkan/runtime/vk_texcompress_etc2.h +++ b/src/vulkan/runtime/vk_texcompress_etc2.h @@ -71,8 +71,6 @@ static inline VkImageViewType vk_texcompress_etc2_image_view_type(VkImageType image_type) { switch (image_type) { - case VK_IMAGE_TYPE_1D: - return VK_IMAGE_VIEW_TYPE_1D_ARRAY; case VK_IMAGE_TYPE_2D: return VK_IMAGE_VIEW_TYPE_2D_ARRAY; case VK_IMAGE_TYPE_3D: