diff options
author | Axel Davy <axel.davy@ens.fr> | 2014-12-07 18:11:40 +0100 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2015-01-22 22:16:19 +0000 |
commit | 77f0ecf9cead20ee6f61149f66663258cebd6179 (patch) | |
tree | b87d10f97b2e0c662581f7a3de4db3bb6b289bc9 /src/gallium/state_trackers/nine/basetexture9.c | |
parent | b0b5430322406a521b8a75468452ac5d4ce86750 (diff) | |
download | external_mesa3d-77f0ecf9cead20ee6f61149f66663258cebd6179.zip external_mesa3d-77f0ecf9cead20ee6f61149f66663258cebd6179.tar.gz external_mesa3d-77f0ecf9cead20ee6f61149f66663258cebd6179.tar.bz2 |
st/nine: Add ATI1 and ATI2 support
Adds ATI1 and ATI2 support to nine.
They map to PIPE_FORMAT_RGTC1_UNORM and PIPE_FORMAT_RGTC2_UNORM,
but need special handling.
Reviewed-by: David Heidelberg <david@ixit.cz>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Xavier Bouchoux <xavierb@gmail.com>
Cc: "10.4" <mesa-stable@lists.freedesktop.org>
Diffstat (limited to 'src/gallium/state_trackers/nine/basetexture9.c')
-rw-r--r-- | src/gallium/state_trackers/nine/basetexture9.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/nine/basetexture9.c b/src/gallium/state_trackers/nine/basetexture9.c index c09d443..5134de2 100644 --- a/src/gallium/state_trackers/nine/basetexture9.c +++ b/src/gallium/state_trackers/nine/basetexture9.c @@ -492,9 +492,12 @@ NineBaseTexture9_UpdateSamplerView( struct NineBaseTexture9 *This, swizzle[2] = PIPE_SWIZZLE_RED; swizzle[3] = PIPE_SWIZZLE_RED; } - } else if (resource->format != PIPE_FORMAT_A8_UNORM) { - /* A8 is the only exception that should have 0.0 as default values - * for RGB. It is already what gallium does. All the other ones + } else if (resource->format != PIPE_FORMAT_A8_UNORM && + resource->format != PIPE_FORMAT_RGTC1_UNORM) { + /* exceptions: + * A8 should have 0.0 as default values for RGB. + * ATI1/RGTC1 should be r 0 0 1 (tested on windows). + * It is already what gallium does. All the other ones * should have 1.0 for non-defined values */ for (i = 0; i < 4; i++) { if (SWIZZLE_TO_REPLACE(desc->swizzle[i])) |