Mesa (master): panfrost: Fix GL_EXT_vertex_array_bgra

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 28 00:36:11 UTC 2020


Module: Mesa
Branch: master
Commit: b4cc116339f4eec9ddeba2b2efc9b07f06ae6d40
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b4cc116339f4eec9ddeba2b2efc9b07f06ae6d40

Author: Icecream95 <ixn at keemail.me>
Date:   Sun Apr 26 19:19:23 2020 +1200

panfrost: Fix GL_EXT_vertex_array_bgra

Previously, attributes would always use an RGBA swizzle, even if the
format was BGRA.

Fixes piglit tests bgra-sec-color-pointer and bgra-vert-attrib-pointer.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4752>

---

 src/gallium/drivers/panfrost/pan_context.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index 1a87a7bf014..33fad6208b6 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -512,7 +512,7 @@ panfrost_create_vertex_elements_state(
                 enum pipe_format fmt = elements[i].src_format;
                 const struct util_format_description *desc = util_format_description(fmt);
                 so->hw[i].unknown1 = 0x2;
-                so->hw[i].swizzle = panfrost_get_default_swizzle(desc->nr_channels);
+                so->hw[i].swizzle = panfrost_translate_swizzle_4(desc->swizzle);
 
                 so->hw[i].format = panfrost_find_format(desc);
         }



More information about the mesa-commit mailing list