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

index 6e508323429d2cefda8d2972e5402d1fa0906ecd..7c0db6247f7d8011cfd8f16d67ec5396211c0c12 100644 (file)
@@ -754,6 +754,10 @@ static uint32_t si_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:
@@ -768,6 +772,7 @@ static uint32_t si_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;
 
@@ -811,6 +816,11 @@ static uint32_t si_translate_colorformat(enum pipe_format format)
        case PIPE_FORMAT_R16G16B16A16_UNORM:
        case PIPE_FORMAT_R16G16B16A16_SNORM:
        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:
                return V_028C70_COLOR_16_16_16_16;
 
        case PIPE_FORMAT_L32A32_FLOAT:
@@ -831,6 +841,9 @@ static uint32_t si_translate_colorformat(enum pipe_format format)
        case PIPE_FORMAT_R32G32B32A32_SINT:
        case PIPE_FORMAT_R32G32B32A32_UINT:
        case PIPE_FORMAT_R32G32B32A32_FLOAT:
+       case PIPE_FORMAT_R32G32B32X32_FLOAT:
+       case PIPE_FORMAT_R32G32B32X32_UINT:
+       case PIPE_FORMAT_R32G32B32X32_SINT:
                return V_028C70_COLOR_32_32_32_32;
 
        /* YUV buffers. */
@@ -941,6 +954,10 @@ static uint32_t si_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:
@@ -963,6 +980,7 @@ static uint32_t si_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:
@@ -998,6 +1016,11 @@ static uint32_t si_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:
                return V_028C70_SWAP_STD;
 
@@ -1014,6 +1037,9 @@ static uint32_t si_translate_colorswap(enum pipe_format format)
        case PIPE_FORMAT_R32G32B32A32_USCALED:
        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);