diff options
author | Axel Davy <[email protected]> | 2015-05-16 22:41:26 +0200 |
---|---|---|
committer | Axel Davy <[email protected]> | 2015-08-21 22:21:45 +0200 |
commit | 74de849bd44ee4a99d36d4d0c43d2a82a6ec07c2 (patch) | |
tree | 2947a3642369f6035d05eff7976c6b357f1fbe32 /src/gallium | |
parent | cb2d680232d64d614db93e2d011bb446e863e384 (diff) |
st/nine: Fix Swizzle for ATI2 format
We had red and green in the wrong channels
for the ATI2 format (RGTC2).
Found thanks to wine tests.
Signed-off-by: Axel Davy <[email protected]>
Reviewed-by: David Heidelberg <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/state_trackers/nine/basetexture9.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/nine/basetexture9.c b/src/gallium/state_trackers/nine/basetexture9.c index 17a8f448ee6..eabf32bd68a 100644 --- a/src/gallium/state_trackers/nine/basetexture9.c +++ b/src/gallium/state_trackers/nine/basetexture9.c @@ -530,6 +530,11 @@ NineBaseTexture9_UpdateSamplerView( struct NineBaseTexture9 *This, swizzle[2] = PIPE_SWIZZLE_RED; swizzle[3] = PIPE_SWIZZLE_RED; } + } else if (resource->format == PIPE_FORMAT_RGTC2_UNORM) { + swizzle[0] = PIPE_SWIZZLE_GREEN; + swizzle[1] = PIPE_SWIZZLE_RED; + swizzle[2] = PIPE_SWIZZLE_ONE; + swizzle[3] = PIPE_SWIZZLE_ONE; } else if (resource->format != PIPE_FORMAT_A8_UNORM && resource->format != PIPE_FORMAT_RGTC1_UNORM) { /* exceptions: |