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: e5604ef78b "st/mesa/i965: Allow decompressing ETC2 to GL_RGBA"

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8529>
(cherry picked from commit 290dcb26ae)
This commit is contained in:
Marek Olšák 2021-01-15 16:43:57 -05:00 committed by Dylan Baker
parent d64870e874
commit 1d2827379d
2 changed files with 2 additions and 2 deletions

View file

@ -130,7 +130,7 @@
"description": "mesa: fix alpha channel of ETC2_SRGB8 decompression for !bgra",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "e5604ef78bd56fc136f00ee39003e3996bf23c80"
},

View file

@ -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;
}