diff options
| author | xsacha <xsacha@gmail.com> | 2010-06-25 19:31:26 +0000 |
|---|---|---|
| committer | xsacha <xsacha@gmail.com> | 2010-06-25 19:31:26 +0000 |
| commit | 434e6b1198edd76a7fb99dbc030e55a04cb62699 (patch) | |
| tree | df0250833a02126f6d79d8adb08b75e44abae3ca /Data/User/OpenCL/TextureDecoder.cl | |
| parent | 5abc698000bfd653619bfe2850c0eea851329ee9 (diff) | |
Small update to fix some cmpr alpha issues with games that use linear filtering. Apparently the colour values matter even though alpha = 0.
Also, remove redundant ANDs.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5787 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Data/User/OpenCL/TextureDecoder.cl')
| -rw-r--r-- | Data/User/OpenCL/TextureDecoder.cl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Data/User/OpenCL/TextureDecoder.cl b/Data/User/OpenCL/TextureDecoder.cl index 93f3f2aa23..183ef87553 100644 --- a/Data/User/OpenCL/TextureDecoder.cl +++ b/Data/User/OpenCL/TextureDecoder.cl @@ -279,10 +279,11 @@ kernel void decodeCMPRBlock(global uchar *dst, bitselect(colorb565, colorb565 >> (uchar2)5, (uchar2)7), (uchar2)0xFF); - ushort4 frac2 = convert_ushort4(color32.even & (uchar4)0xFF) - convert_ushort4(color32.odd & (uchar4)0xFF); + ushort4 frac2 = convert_ushort4(color32.even) - convert_ushort4(color32.odd); uchar4 frac = convert_uchar4((frac2 * (ushort4)3) / (ushort4)8); - ushort4 colorAlpha = upsample((uchar4)0, rhadd(color32.odd, color32.even)); + ushort4 colorAlpha = upsample((uchar4)(color32.even.s0,color32.even.s1,color32.even.s2,0), + rhadd(color32.odd, color32.even)); colorAlpha.s3 = 0xFF; ushort4 colorNoAlpha = upsample(color32.odd + frac, color32.even - frac); @@ -324,10 +325,11 @@ kernel void decodeCMPRBlock_RGBA(global uchar *dst, bitselect(colora565 << (uchar2)3, colora565 >> (uchar2)2, (uchar2)7), (uchar2)0xFF); - ushort4 frac2 = convert_ushort4(color32.even & (uchar4)0xFF) - convert_ushort4(color32.odd & (uchar4)0xFF); + ushort4 frac2 = convert_ushort4(color32.even) - convert_ushort4(color32.odd); uchar4 frac = convert_uchar4((frac2 * (ushort4)3) / (ushort4)8); - ushort4 colorAlpha = upsample((uchar4)0, rhadd(color32.odd, color32.even)); + ushort4 colorAlpha = upsample((uchar4)(color32.even.s0,color32.even.s1,color32.even.s2,0), + rhadd(color32.odd, color32.even)); colorAlpha.s3 = 0xFF; ushort4 colorNoAlpha = upsample(color32.odd + frac, color32.even - frac); |
