r600g: Fix RGB10_A2 format handling
authorFabian Bieler <&lt;der.fabe@gmx.net&gt>
Thu, 10 Feb 2011 15:57:34 +0000 (16:57 +0100)
committerAlex Deucher <alexdeucher@gmail.com>
Tue, 15 Feb 2011 17:31:30 +0000 (12:31 -0500)
src/gallium/drivers/r600/eg_state_inlines.h
src/gallium/drivers/r600/r600_state_inlines.h

index 46369cc1e26adbd006f834efb603cde52db23b7f..c2e06c37ed5d49444ad2f5159172302d5c156053 100644 (file)
@@ -352,9 +352,11 @@ static inline uint32_t r600_translate_colorswap(enum pipe_format format)
 
        case PIPE_FORMAT_R10G10B10A2_UNORM:
        case PIPE_FORMAT_R10G10B10X2_SNORM:
-       case PIPE_FORMAT_B10G10R10A2_UNORM:
        case PIPE_FORMAT_R10SG10SB10SA2U_NORM:
-               return V_028C70_SWAP_STD_REV;
+               return V_028C70_SWAP_STD;
+
+       case PIPE_FORMAT_B10G10R10A2_UNORM:
+               return V_028C70_SWAP_ALT;
 
        case PIPE_FORMAT_R16G16_UNORM:
                return V_028C70_SWAP_STD;
@@ -429,7 +431,7 @@ static INLINE uint32_t r600_translate_colorformat(enum pipe_format format)
        case PIPE_FORMAT_R10G10B10X2_SNORM:
        case PIPE_FORMAT_B10G10R10A2_UNORM:
        case PIPE_FORMAT_R10SG10SB10SA2U_NORM:
-               return V_028C70_COLOR_10_10_10_2;
+               return V_028C70_COLOR_2_10_10_10;
 
        case PIPE_FORMAT_Z24X8_UNORM:
        case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
index 81805158966dd480f0ff3d937febc5fada1a0763..fa6c24c2ece37e4a32a9c05bdca9e236c6c3a929 100644 (file)
@@ -345,9 +345,11 @@ static inline uint32_t r600_translate_colorswap(enum pipe_format format)
 
        case PIPE_FORMAT_R10G10B10A2_UNORM:
        case PIPE_FORMAT_R10G10B10X2_SNORM:
-       case PIPE_FORMAT_B10G10R10A2_UNORM:
        case PIPE_FORMAT_R10SG10SB10SA2U_NORM:
-               return V_0280A0_SWAP_STD_REV;
+               return V_0280A0_SWAP_STD;
+
+       case PIPE_FORMAT_B10G10R10A2_UNORM:
+               return V_0280A0_SWAP_ALT;
 
        case PIPE_FORMAT_R16G16_UNORM:
                return V_0280A0_SWAP_STD;
@@ -422,7 +424,7 @@ static INLINE uint32_t r600_translate_colorformat(enum pipe_format format)
        case PIPE_FORMAT_R10G10B10X2_SNORM:
        case PIPE_FORMAT_B10G10R10A2_UNORM:
        case PIPE_FORMAT_R10SG10SB10SA2U_NORM:
-               return V_0280A0_COLOR_10_10_10_2;
+               return V_0280A0_COLOR_2_10_10_10;
 
        case PIPE_FORMAT_Z24X8_UNORM:
        case PIPE_FORMAT_Z24_UNORM_S8_USCALED: