From b0227525724c58f9480f60d183949a2874b9de70 Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Tue, 29 Nov 2022 15:56:39 +0100 Subject: [PATCH] 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: (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 8a4411a72c8..344cb37f54d 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -5557,7 +5557,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);