aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/basetexture9.c
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2014-12-07 18:11:40 +0100
committerEmil Velikov <[email protected]>2015-01-22 22:16:19 +0000
commit77f0ecf9cead20ee6f61149f66663258cebd6179 (patch)
treeb87d10f97b2e0c662581f7a3de4db3bb6b289bc9 /src/gallium/state_trackers/nine/basetexture9.c
parentb0b5430322406a521b8a75468452ac5d4ce86750 (diff)
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 <[email protected]> Signed-off-by: Axel Davy <[email protected]> Signed-off-by: Xavier Bouchoux <[email protected]> Cc: "10.4" <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/basetexture9.c')
-rw-r--r--src/gallium/state_trackers/nine/basetexture9.c9
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 c09d443f2d0..5134de24e23 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]))