From d61e37649768ffea12d43d21e71df9e0ce060b1f Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 19 May 2023 09:20:42 +0200 Subject: [PATCH] radv: disable IMAGE_USAGE_STORAGE with depth-only and stencil-only formats This shouldn't have been enabled at all. Depth-stencil formats were accidentally disabled but not depth-only or stencil-only formats. This doesn't seem allowed by DX12 and both AMD/NVIDIA don't enable it. Cc: mesa-stable Signed-off-by: Samuel Pitoiset Part-of: (cherry picked from commit dda7400c0ba46a6259355216d1352a206450cfb1) --- .pick_status.json | 2 +- src/amd/vulkan/radv_formats.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index e0822a4e368..817bc8c959a 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -805,7 +805,7 @@ "description": "radv: disable IMAGE_USAGE_STORAGE with depth-only and stencil-only formats", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c index 96e71d366a7..63e4ad5fb2c 100644 --- a/src/amd/vulkan/radv_formats.c +++ b/src/amd/vulkan/radv_formats.c @@ -540,6 +540,9 @@ radv_is_storage_image_format_supported(struct radv_physical_device *physical_dev if (format == VK_FORMAT_UNDEFINED) return false; + if (vk_format_is_depth_or_stencil(format)) + return false; + data_format = radv_translate_tex_dataformat(format, desc, vk_format_get_first_non_void_channel(format)); num_format =