From 290dcb26aec583eb00be611b7b69e3f3f9667781 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 15 Jan 2021 16:43:57 -0500 Subject: [PATCH] mesa: fix alpha channel of ETC2_SRGB8 decompression for !bgra If software decompression is used for ETC2, the alpha channel for sRGB8 textures would be set only if BGRA is true. Fixes: e5604ef78bd "st/mesa/i965: Allow decompressing ETC2 to GL_RGBA" Reviewed-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Adam Jackson Part-of: --- src/mesa/main/texcompress_etc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/texcompress_etc.c b/src/mesa/main/texcompress_etc.c index 32464f3..f14b167 100644 --- a/src/mesa/main/texcompress_etc.c +++ b/src/mesa/main/texcompress_etc.c @@ -750,8 +750,8 @@ etc2_unpack_srgb8(uint8_t *dst_row, tmp = dst[0]; dst[0] = dst[2]; dst[2] = tmp; - dst[3] = 255; } + dst[3] = 255; dst += comps; } -- 2.7.4