From 83fd284484e7f0ee59f923041b4faafb1fa7296d Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Fri, 28 Jul 2023 20:59:07 +0100 Subject: [PATCH] radv: disable 64-bit color attachments These work in some circumstances (dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_float_16_to_64.scalar9_tessc), but I'm not sure if they work in all, blending certainly doesn't work and this probably wasn't intended in the first place. Signed-off-by: Rhys Perry Reviewed-by: Bas Nieuwenhuizen Fixes: 01bd012edd20 ("amd: fix 64-bit integer color image clears") Part-of: (cherry picked from commit 405f3bf9903f8a8b65da113adc9ef32e02b84fa2) --- .pick_status.json | 2 +- src/amd/vulkan/radv_formats.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 7a60a6693ba..916b50ebad9 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -7104,7 +7104,7 @@ "description": "radv: disable 64-bit color attachments", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "01bd012edd20927a4eb7f791dc6e6ac94089c144", "notes": null diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c index 1133cd3e432..f6c69504c5c 100644 --- a/src/amd/vulkan/radv_formats.c +++ b/src/amd/vulkan/radv_formats.c @@ -736,7 +736,7 @@ radv_physical_device_get_format_properties(struct radv_physical_device *physical linear &= ~VK_FORMAT_FEATURE_2_BLIT_SRC_BIT; } } - if (radv_is_colorbuffer_format_supported(physical_device, format, &blendable)) { + if (radv_is_colorbuffer_format_supported(physical_device, format, &blendable) && desc->channel[0].size != 64) { linear |= VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT | VK_FORMAT_FEATURE_2_BLIT_DST_BIT; tiled |= VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT | VK_FORMAT_FEATURE_2_BLIT_DST_BIT; if (blendable) { @@ -774,6 +774,12 @@ radv_physical_device_get_format_properties(struct radv_physical_device *physical linear = 0; tiled = 0; break; + case VK_FORMAT_R64_UINT: + case VK_FORMAT_R64_SINT: + case VK_FORMAT_R64_SFLOAT: + tiled |= VK_FORMAT_FEATURE_2_TRANSFER_SRC_BIT | VK_FORMAT_FEATURE_2_TRANSFER_DST_BIT; + linear |= VK_FORMAT_FEATURE_2_TRANSFER_SRC_BIT | VK_FORMAT_FEATURE_2_TRANSFER_DST_BIT; + break; default: break; }