diff options
author | Marek Olšák <[email protected]> | 2013-01-26 00:27:27 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2013-02-07 00:20:24 +0100 |
commit | 27e216a07501f4d2ade1e1ec8b9a1f709304013b (patch) | |
tree | 3da5d3d8d544a4e8011f7565bb722e4f96dae097 /src/gallium/drivers/r300/r300_texture.c | |
parent | 3c351b7c3321b2d331b1b80e4b2e067399a18b35 (diff) |
r300g: use new RGBX formats
Diffstat (limited to 'src/gallium/drivers/r300/r300_texture.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_texture.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c index b33c2f37a42..e4cb967e9f3 100644 --- a/src/gallium/drivers/r300/r300_texture.c +++ b/src/gallium/drivers/r300/r300_texture.c @@ -449,7 +449,7 @@ static uint32_t r300_translate_colorformat(enum pipe_format format) case PIPE_FORMAT_R8G8B8A8_UNORM: case PIPE_FORMAT_R8G8B8A8_SNORM: case PIPE_FORMAT_R8G8B8X8_UNORM: - /*case PIPE_FORMAT_R8G8B8X8_SNORM:*/ + case PIPE_FORMAT_R8G8B8X8_SNORM: /* These formats work fine with ARGB8888 if US_OUT_FMT is set * correctly. */ case PIPE_FORMAT_R16G16_UNORM: @@ -467,12 +467,16 @@ static uint32_t r300_translate_colorformat(enum pipe_format format) case PIPE_FORMAT_R10G10B10A2_UNORM: case PIPE_FORMAT_R10G10B10X2_SNORM: case PIPE_FORMAT_B10G10R10A2_UNORM: + case PIPE_FORMAT_B10G10R10X2_UNORM: return R500_COLOR_FORMAT_ARGB2101010; /* R5xx-only? */ /* 64-bit buffers. */ 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: /* These formats work fine with ARGB16161616 if US_OUT_FMT is set * correctly. */ case PIPE_FORMAT_R32G32_FLOAT: @@ -481,6 +485,7 @@ static uint32_t r300_translate_colorformat(enum pipe_format format) /* 128-bit buffers. */ case PIPE_FORMAT_R32G32B32A32_FLOAT: + case PIPE_FORMAT_R32G32B32X32_FLOAT: return R300_COLOR_FORMAT_ARGB32323232; /* YUV buffers. */ @@ -648,6 +653,7 @@ static uint32_t r300_translate_out_fmt(enum pipe_format format) case PIPE_FORMAT_B8G8R8X8_UNORM: /*case PIPE_FORMAT_B8G8R8X8_SNORM:*/ case PIPE_FORMAT_B10G10R10A2_UNORM: + case PIPE_FORMAT_B10G10R10X2_UNORM: return modifier | R300_C0_SEL_B | R300_C1_SEL_G | R300_C2_SEL_R | R300_C3_SEL_A; @@ -663,7 +669,7 @@ static uint32_t r300_translate_out_fmt(enum pipe_format format) /* RGBA outputs. */ case PIPE_FORMAT_R8G8B8X8_UNORM: - /*case PIPE_FORMAT_R8G8B8X8_SNORM:*/ + case PIPE_FORMAT_R8G8B8X8_SNORM: case PIPE_FORMAT_R8G8B8A8_UNORM: case PIPE_FORMAT_R8G8B8A8_SNORM: case PIPE_FORMAT_R10G10B10A2_UNORM: @@ -679,6 +685,7 @@ static uint32_t r300_translate_out_fmt(enum pipe_format format) case PIPE_FORMAT_R16G16B16A16_FLOAT: case PIPE_FORMAT_R32_FLOAT: case PIPE_FORMAT_R32G32B32A32_FLOAT: + case PIPE_FORMAT_R32G32B32X32_FLOAT: case PIPE_FORMAT_L16_UNORM: case PIPE_FORMAT_L16_SNORM: case PIPE_FORMAT_L16_FLOAT: @@ -687,6 +694,9 @@ static uint32_t r300_translate_out_fmt(enum pipe_format format) case PIPE_FORMAT_I16_SNORM: case PIPE_FORMAT_I16_FLOAT: case PIPE_FORMAT_I32_FLOAT: + case PIPE_FORMAT_R16G16B16X16_UNORM: + case PIPE_FORMAT_R16G16B16X16_SNORM: + case PIPE_FORMAT_R16G16B16X16_FLOAT: return modifier | R300_C0_SEL_R | R300_C1_SEL_G | R300_C2_SEL_B | R300_C3_SEL_A; @@ -746,6 +756,7 @@ static uint32_t r300_translate_colormask_swizzle(enum pipe_format format) case PIPE_FORMAT_B4G4R4X4_UNORM: case PIPE_FORMAT_B8G8R8X8_UNORM: /*case PIPE_FORMAT_B8G8R8X8_SNORM:*/ + case PIPE_FORMAT_B10G10R10X2_UNORM: return COLORMASK_BGRX; case PIPE_FORMAT_B5G6R5_UNORM: @@ -757,8 +768,13 @@ static uint32_t r300_translate_colormask_swizzle(enum pipe_format format) return COLORMASK_BGRA; case PIPE_FORMAT_R8G8B8X8_UNORM: + /* RGBX_SNORM formats are broken for an unknown reason */ /*case PIPE_FORMAT_R8G8B8X8_SNORM:*/ - case PIPE_FORMAT_R10G10B10X2_SNORM: + /*case PIPE_FORMAT_R10G10B10X2_SNORM:*/ + case PIPE_FORMAT_R16G16B16X16_UNORM: + /*case PIPE_FORMAT_R16G16B16X16_SNORM:*/ + case PIPE_FORMAT_R16G16B16X16_FLOAT: + case PIPE_FORMAT_R32G32B32X32_FLOAT: return COLORMASK_RGBX; case PIPE_FORMAT_R8G8B8A8_UNORM: |