r600g: use new RGBX formats
authorMarek Olšák <maraeo@gmail.com>
Fri, 25 Jan 2013 23:28:00 +0000 (00:28 +0100)
committerMarek Olšák <maraeo@gmail.com>
Wed, 6 Feb 2013 23:20:24 +0000 (00:20 +0100)
src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/r600_state.c

index 5dd8b130e9e01cacb9540aeddc6ed9db00d7d038..f076fcaa156e390dd272fe87c0de933545f94d45 100644 (file)
@@ -322,6 +322,10 @@ static uint32_t r600_translate_colorswap(enum pipe_format format)
        case PIPE_FORMAT_R8G8B8A8_SINT:
        case PIPE_FORMAT_R8G8B8A8_UINT:
        case PIPE_FORMAT_R8G8B8X8_UNORM:
+       case PIPE_FORMAT_R8G8B8X8_SNORM:
+       case PIPE_FORMAT_R8G8B8X8_SRGB:
+       case PIPE_FORMAT_R8G8B8X8_UINT:
+       case PIPE_FORMAT_R8G8B8X8_SINT:
                return V_028C70_SWAP_STD;
 
        case PIPE_FORMAT_A8B8G8R8_UNORM:
@@ -344,6 +348,7 @@ static uint32_t r600_translate_colorswap(enum pipe_format format)
 
        case PIPE_FORMAT_B10G10R10A2_UNORM:
        case PIPE_FORMAT_B10G10R10A2_UINT:
+       case PIPE_FORMAT_B10G10R10X2_UNORM:
                return V_028C70_SWAP_ALT;
 
        case PIPE_FORMAT_R11G11B10_FLOAT:
@@ -367,6 +372,11 @@ static uint32_t r600_translate_colorswap(enum pipe_format format)
        case PIPE_FORMAT_R16G16B16A16_UINT:
        case PIPE_FORMAT_R16G16B16A16_SINT:
        case PIPE_FORMAT_R16G16B16A16_FLOAT:
+       case PIPE_FORMAT_R16G16B16X16_UNORM:
+       case PIPE_FORMAT_R16G16B16X16_SNORM:
+       case PIPE_FORMAT_R16G16B16X16_FLOAT:
+       case PIPE_FORMAT_R16G16B16X16_UINT:
+       case PIPE_FORMAT_R16G16B16X16_SINT:
        case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
 
        /* 128-bit buffers. */
@@ -375,6 +385,9 @@ static uint32_t r600_translate_colorswap(enum pipe_format format)
        case PIPE_FORMAT_R32G32B32A32_UNORM:
        case PIPE_FORMAT_R32G32B32A32_SINT:
        case PIPE_FORMAT_R32G32B32A32_UINT:
+       case PIPE_FORMAT_R32G32B32X32_FLOAT:
+       case PIPE_FORMAT_R32G32B32X32_UINT:
+       case PIPE_FORMAT_R32G32B32X32_SINT:
                return V_028C70_SWAP_STD;
        default:
                R600_ERR("unsupported colorswap format %d\n", format);
@@ -466,6 +479,10 @@ static uint32_t r600_translate_colorformat(enum pipe_format format)
        case PIPE_FORMAT_R8G8B8A8_SNORM:
        case PIPE_FORMAT_R8G8B8A8_UNORM:
        case PIPE_FORMAT_R8G8B8X8_UNORM:
+       case PIPE_FORMAT_R8G8B8X8_SNORM:
+       case PIPE_FORMAT_R8G8B8X8_SRGB:
+       case PIPE_FORMAT_R8G8B8X8_UINT:
+       case PIPE_FORMAT_R8G8B8X8_SINT:
        case PIPE_FORMAT_R8SG8SB8UX8U_NORM:
        case PIPE_FORMAT_X8B8G8R8_UNORM:
        case PIPE_FORMAT_X8R8G8B8_UNORM:
@@ -478,6 +495,7 @@ static uint32_t r600_translate_colorformat(enum pipe_format format)
        case PIPE_FORMAT_R10G10B10X2_SNORM:
        case PIPE_FORMAT_B10G10R10A2_UNORM:
        case PIPE_FORMAT_B10G10R10A2_UINT:
+       case PIPE_FORMAT_B10G10R10X2_UNORM:
        case PIPE_FORMAT_R10SG10SB10SA2U_NORM:
                return V_028C70_COLOR_2_10_10_10;
 
@@ -531,9 +549,14 @@ static uint32_t r600_translate_colorformat(enum pipe_format format)
        case PIPE_FORMAT_R16G16B16A16_SINT:
        case PIPE_FORMAT_R16G16B16A16_UNORM:
        case PIPE_FORMAT_R16G16B16A16_SNORM:
+       case PIPE_FORMAT_R16G16B16X16_UNORM:
+       case PIPE_FORMAT_R16G16B16X16_SNORM:
+       case PIPE_FORMAT_R16G16B16X16_UINT:
+       case PIPE_FORMAT_R16G16B16X16_SINT:
                return V_028C70_COLOR_16_16_16_16;
 
        case PIPE_FORMAT_R16G16B16A16_FLOAT:
+       case PIPE_FORMAT_R16G16B16X16_FLOAT:
                return V_028C70_COLOR_16_16_16_16_FLOAT;
 
        case PIPE_FORMAT_R32G32_FLOAT:
@@ -551,8 +574,11 @@ static uint32_t r600_translate_colorformat(enum pipe_format format)
        case PIPE_FORMAT_R32G32B32A32_UNORM:
        case PIPE_FORMAT_R32G32B32A32_SINT:
        case PIPE_FORMAT_R32G32B32A32_UINT:
+       case PIPE_FORMAT_R32G32B32X32_UINT:
+       case PIPE_FORMAT_R32G32B32X32_SINT:
                return V_028C70_COLOR_32_32_32_32;
        case PIPE_FORMAT_R32G32B32A32_FLOAT:
+       case PIPE_FORMAT_R32G32B32X32_FLOAT:
                return V_028C70_COLOR_32_32_32_32_FLOAT;
 
        /* YUV buffers. */
index 44cd00ead8ac68e38b525e75e08ef3901ae5cf33..1e2f2dd6a73af24bc6ac2b03c143628e6297f084 100644 (file)
@@ -253,6 +253,10 @@ static uint32_t r600_translate_colorswap(enum pipe_format format)
        case PIPE_FORMAT_R8G8B8A8_SNORM:
        case PIPE_FORMAT_R8G8B8A8_UNORM:
        case PIPE_FORMAT_R8G8B8X8_UNORM:
+       case PIPE_FORMAT_R8G8B8X8_SNORM:
+       case PIPE_FORMAT_R8G8B8X8_SRGB:
+       case PIPE_FORMAT_R8G8B8X8_UINT:
+       case PIPE_FORMAT_R8G8B8X8_SINT:
        case PIPE_FORMAT_R8G8B8A8_SINT:
        case PIPE_FORMAT_R8G8B8A8_UINT:
                return V_0280A0_SWAP_STD;
@@ -277,6 +281,7 @@ static uint32_t r600_translate_colorswap(enum pipe_format format)
 
        case PIPE_FORMAT_B10G10R10A2_UNORM:
        case PIPE_FORMAT_B10G10R10A2_UINT:
+       case PIPE_FORMAT_B10G10R10X2_UNORM:
                return V_0280A0_SWAP_ALT;
 
        case PIPE_FORMAT_R11G11B10_FLOAT:
@@ -300,6 +305,11 @@ static uint32_t r600_translate_colorswap(enum pipe_format format)
        case PIPE_FORMAT_R16G16B16A16_UINT:
        case PIPE_FORMAT_R16G16B16A16_SINT:
        case PIPE_FORMAT_R16G16B16A16_FLOAT:
+       case PIPE_FORMAT_R16G16B16X16_UNORM:
+       case PIPE_FORMAT_R16G16B16X16_SNORM:
+       case PIPE_FORMAT_R16G16B16X16_FLOAT:
+       case PIPE_FORMAT_R16G16B16X16_UINT:
+       case PIPE_FORMAT_R16G16B16X16_SINT:
        case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
 
        /* 128-bit buffers. */
@@ -308,6 +318,9 @@ static uint32_t r600_translate_colorswap(enum pipe_format format)
        case PIPE_FORMAT_R32G32B32A32_UNORM:
        case PIPE_FORMAT_R32G32B32A32_SINT:
        case PIPE_FORMAT_R32G32B32A32_UINT:
+       case PIPE_FORMAT_R32G32B32X32_FLOAT:
+       case PIPE_FORMAT_R32G32B32X32_UINT:
+       case PIPE_FORMAT_R32G32B32X32_SINT:
                return V_0280A0_SWAP_STD;
        default:
                R600_ERR("unsupported colorswap format %d\n", format);
@@ -404,6 +417,10 @@ static uint32_t r600_translate_colorformat(enum pipe_format format)
        case PIPE_FORMAT_R8G8B8A8_SNORM:
        case PIPE_FORMAT_R8G8B8A8_UNORM:
        case PIPE_FORMAT_R8G8B8X8_UNORM:
+       case PIPE_FORMAT_R8G8B8X8_SNORM:
+       case PIPE_FORMAT_R8G8B8X8_SRGB:
+       case PIPE_FORMAT_R8G8B8X8_UINT:
+       case PIPE_FORMAT_R8G8B8X8_SINT:
        case PIPE_FORMAT_R8SG8SB8UX8U_NORM:
        case PIPE_FORMAT_X8B8G8R8_UNORM:
        case PIPE_FORMAT_X8R8G8B8_UNORM:
@@ -415,6 +432,7 @@ static uint32_t r600_translate_colorformat(enum pipe_format format)
        case PIPE_FORMAT_R10G10B10X2_SNORM:
        case PIPE_FORMAT_B10G10R10A2_UNORM:
        case PIPE_FORMAT_B10G10R10A2_UINT:
+       case PIPE_FORMAT_B10G10R10X2_UNORM:
        case PIPE_FORMAT_R10SG10SB10SA2U_NORM:
                return V_0280A0_COLOR_2_10_10_10;
 
@@ -468,9 +486,14 @@ static uint32_t r600_translate_colorformat(enum pipe_format format)
        case PIPE_FORMAT_R16G16B16A16_SINT:
        case PIPE_FORMAT_R16G16B16A16_UNORM:
        case PIPE_FORMAT_R16G16B16A16_SNORM:
+       case PIPE_FORMAT_R16G16B16X16_UNORM:
+       case PIPE_FORMAT_R16G16B16X16_SNORM:
+       case PIPE_FORMAT_R16G16B16X16_UINT:
+       case PIPE_FORMAT_R16G16B16X16_SINT:
                return V_0280A0_COLOR_16_16_16_16;
 
        case PIPE_FORMAT_R16G16B16A16_FLOAT:
+       case PIPE_FORMAT_R16G16B16X16_FLOAT:
                return V_0280A0_COLOR_16_16_16_16_FLOAT;
 
        case PIPE_FORMAT_R32G32_FLOAT:
@@ -485,11 +508,14 @@ static uint32_t r600_translate_colorformat(enum pipe_format format)
 
        /* 128-bit buffers. */
        case PIPE_FORMAT_R32G32B32A32_FLOAT:
+       case PIPE_FORMAT_R32G32B32X32_FLOAT:
                return V_0280A0_COLOR_32_32_32_32_FLOAT;
        case PIPE_FORMAT_R32G32B32A32_SNORM:
        case PIPE_FORMAT_R32G32B32A32_UNORM:
        case PIPE_FORMAT_R32G32B32A32_SINT:
        case PIPE_FORMAT_R32G32B32A32_UINT:
+       case PIPE_FORMAT_R32G32B32X32_UINT:
+       case PIPE_FORMAT_R32G32B32X32_SINT:
                return V_0280A0_COLOR_32_32_32_32;
 
        /* YUV buffers. */