mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 03:50:13 +01:00
svga: Adjust alpha for S3TC_DXT1_EXT RGB formats
According to spec, S3TC_DXT1_EXT RGB formats are supposed to be opaque. Correspoding svga formats are not handling it so explicitly setting it to 1.0. This fixes piglit test spec@ext_texture_compression_s3tc@s3tc-targeted Note: This test is testcase for freedesktop bug 100925 Tested with mtt-piglit and mtt-glretrace on 8,9,10,11 and 15 Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
6a7d1ca2c4
commit
d4a5e14fae
1 changed files with 4 additions and 0 deletions
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue