Module: Mesa
Branch: staging/22.2
Commit: 70dcad3214a30e0d9d43164637764a5618474017
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=70dcad3214a30e0d9d43164637764a5618474017

Author: Rhys Perry <[email protected]>
Date:   Fri Jul 29 15:47:13 2022 +0100

radv: remove claimed support for sRGB vertex buffer formats

These probably don't work.

Signed-off-by: Rhys Perry <[email protected]>
Reviewed-by: Samuel Pitoiset <[email protected]>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18225>
(cherry picked from commit 82f9e40851cbff803f2550f37f1d2b863fbc6d88)

---

 .pick_status.json             | 2 +-
 src/amd/vulkan/radv_formats.c | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 1c765b66e7b..115accb6ebc 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -9895,7 +9895,7 @@
         "description": "radv: remove claimed support for sRGB vertex buffer 
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 bef8df6d97a..b8d88dff31a 100644
--- a/src/amd/vulkan/radv_formats.c
+++ b/src/amd/vulkan/radv_formats.c
@@ -747,9 +747,10 @@ radv_physical_device_get_format_properties(struct 
radv_physical_device *physical
    }
 
    if (radv_is_buffer_format_supported(format, &scaled)) {
-      if (format != VK_FORMAT_R64_UINT && format != VK_FORMAT_R64_SINT) {
+      if (format != VK_FORMAT_R64_UINT && format != VK_FORMAT_R64_SINT &&
+          !vk_format_is_srgb(format)) {
          buffer |= VK_FORMAT_FEATURE_2_VERTEX_BUFFER_BIT;
-         if (!scaled && !vk_format_is_srgb(format))
+         if (!scaled)
             buffer |= VK_FORMAT_FEATURE_2_UNIFORM_TEXEL_BUFFER_BIT;
       }
       buffer |= VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_BIT |

Reply via email to