Module: Mesa
Branch: staging/22.3
Commit: 471eb0bd988061f598637b76644abcf06a37eecd
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=471eb0bd988061f598637b76644abcf06a37eecd

Author: Connor Abbott <[email protected]>
Date:   Tue Nov 29 15:56:39 2022 +0100

freedreno/fdl: Set sRGB bit for storage images

This probably wasn't noticed earlier because tests using sRGB storage
images didn't exist, and we didn't know whether this works, but this
fixes dEQP-VK.image.store.without_format.2d.*_srgb which also proves
that the bit works.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20060>
(cherry picked from commit ccef6d1f5fdae95ee8aa5a68e83662e02645b64a)

---

 .pick_status.json            | 2 +-
 src/freedreno/fdl/fd6_view.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index 957c4beba87..cc918a03f6f 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -427,7 +427,7 @@
         "description": "freedreno/fdl: Set sRGB bit for storage images",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/freedreno/fdl/fd6_view.c b/src/freedreno/fdl/fd6_view.c
index 59e9e913d96..456eff57aca 100644
--- a/src/freedreno/fdl/fd6_view.c
+++ b/src/freedreno/fdl/fd6_view.c
@@ -382,6 +382,7 @@ fdl6_view_init(struct fdl6_view *view, const struct 
fdl_layout **layouts,
 
    view->storage_descriptor[0] =
       A6XX_TEX_CONST_0_FMT(storage_format) |
+      COND(util_format_is_srgb(args->format), A6XX_TEX_CONST_0_SRGB) |
       fdl6_texswiz(args, has_z24uint_s8uint) |
       A6XX_TEX_CONST_0_TILE_MODE(tile_mode) |
       A6XX_TEX_CONST_0_SWAP(color_swap);

Reply via email to