aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/svga/svga_shader.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_shader.c b/src/gallium/drivers/svga/svga_shader.c
index 9e2b65771cd..c9cc0f739a3 100644
--- a/src/gallium/drivers/svga/svga_shader.c
+++ b/src/gallium/drivers/svga/svga_shader.c
@@ -234,6 +234,10 @@ svga_init_shader_key_common(const struct svga_context *svga,
svga_texture_device_format_has_alpha(view->texture)) ?
set_alpha : copy_alpha;
+ if (view->texture->format == PIPE_FORMAT_DXT1_RGB ||
+ view->texture->format == PIPE_FORMAT_DXT1_SRGB)
+ swizzle_tab = set_alpha;
+
key->tex[i].swizzle_r = swizzle_tab[view->swizzle_r];
key->tex[i].swizzle_g = swizzle_tab[view->swizzle_g];
key->tex[i].swizzle_b = swizzle_tab[view->swizzle_b];