panfrost: Implement sRGB texturing
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 17 Jun 2019 23:16:20 +0000 (16:16 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 18 Jun 2019 16:59:29 +0000 (09:59 -0700)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/pan_context.c

index 954287f4df8c2b3eb13e57ae07ba3d978c95e98c..7f60cfa03d4a59ae4cd6db8b8c11a550da01c095 100644 (file)
@@ -2221,7 +2221,7 @@ panfrost_create_sampler_view(
                         .swizzle = panfrost_translate_swizzle_4(desc->swizzle),
                         .format = format,
 
-                        .srgb = false,
+                        .srgb = desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB,
                         .type = panfrost_translate_texture_type(texture->target),
 
                         .usage2 = usage2_layout