summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2021-01-15 16:43:57 -0500
committerDylan Baker <dylan.c.baker@intel.com>2021-01-20 09:22:16 -0800
commit1d2827379d518b974af906cc2ac8cfe59df83ecc (patch)
tree7d4b0252ce1fb8f27d8a8edacbf7c5af9b03aae0
parentd64870e8740c7224dc64a6f831ccf7df40350cae (diff)
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 <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 290dcb26aec583eb00be611b7b69e3f3f9667781)
-rw-r--r--.pick_status.json2
-rw-r--r--src/mesa/main/texcompress_etc.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/.pick_status.json b/.pick_status.json
index 1121d23fd7b..186a935f687 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -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"
},
diff --git a/src/mesa/main/texcompress_etc.c b/src/mesa/main/texcompress_etc.c
index 32464f3ca9e..f14b1670728 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;
}