Mesa (master): v3d: Fix swizzle in DXT3 and DXT5 formats

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu May 7 12:51:00 UTC 2020


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

Author: Jose Maria Casanova Crespo <jmcasanova at igalia.com>
Date:   Thu May  7 03:37:22 2020 +0200

v3d: Fix swizzle in DXT3 and DXT5 formats

Swizzles were ignoring the W component of the format DXT3_RGBA and
DXT5_RGBA.

This fixes 15 piglit tests:

spec/!opengl 1.1/copyteximage 2d
spec/!opengl 1.2/copyteximage 3d
spec/arb_texture_compression/fbo-generatemipmap-formats/gl_compressed_rgba
spec/arb_texture_compression/fbo-generatemipmap-formats/gl_compressed_rgba npot
spec/arb_texture_compression/texwrap formats bordercolor-swizzled/gl_compressed_rgba, swizzled, border color only
spec/arb_texture_compression/texwrap formats bordercolor/gl_compressed_rgba, border color only
spec/arb_texture_cube_map/copyteximage cube
spec/arb_texture_cube_map/copyteximage cube samples=2
spec/arb_texture_cube_map/copyteximage cube samples=4
spec/arb_texture_rectangle/copyteximage rect
spec/arb_texture_rectangle/copyteximage rect samples=2
spec/arb_texture_rectangle/copyteximage rect samples=4
spec/ext_texture_array/copyteximage 2d_array
spec/ext_texture_array/copyteximage 2d_array samples=2
spec/ext_texture_array/copyteximage 2d_array samples=4

Fixes: 469bbd8387d1 "broadcom/vc5: Move the formats table to per-V3D-version compile."
Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4934>

---

 src/gallium/drivers/v3d/v3dx_format_table.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/v3d/v3dx_format_table.c b/src/gallium/drivers/v3d/v3dx_format_table.c
index dd5648fcd70..535803aabb7 100644
--- a/src/gallium/drivers/v3d/v3dx_format_table.c
+++ b/src/gallium/drivers/v3d/v3dx_format_table.c
@@ -177,8 +177,8 @@ static const struct v3d_format format_table[] = {
         FORMAT(ETC2_RG11_SNORM,   NO,           SIGNED_RG11_EAC, SWIZ_XY01, 16, 0),
 
         FORMAT(DXT1_RGB,          NO,           BC1,         SWIZ_XYZ1, 16, 0),
-        FORMAT(DXT3_RGBA,         NO,           BC2,         SWIZ_XYZ1, 16, 0),
-        FORMAT(DXT5_RGBA,         NO,           BC3,         SWIZ_XYZ1, 16, 0),
+        FORMAT(DXT3_RGBA,         NO,           BC2,         SWIZ_XYZW, 16, 0),
+        FORMAT(DXT5_RGBA,         NO,           BC3,         SWIZ_XYZW, 16, 0),
 };
 
 const struct v3d_format *



More information about the mesa-commit mailing list