Module: Mesa
Branch: staging/23.1
Commit: a36cfc17a96619cf2792a86d4e529800eb9265a7
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a36cfc17a96619cf2792a86d4e529800eb9265a7

Author: Rhys Perry <[email protected]>
Date:   Fri Jul 28 20:59:07 2023 +0100

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 <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Fixes: 01bd012edd20 ("amd: fix 64-bit integer color image clears")
(cherry picked from commit 405f3bf9903f8a8b65da113adc9ef32e02b84fa2)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24748>

---

 src/amd/vulkan/radv_formats.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c
index 0760c45f86e..0df99671407 100644
--- a/src/amd/vulkan/radv_formats.c
+++ b/src/amd/vulkan/radv_formats.c
@@ -795,7 +795,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) {
@@ -834,6 +834,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;
    }

Reply via email to