diff options
author | Christian König <[email protected]> | 2012-03-03 12:48:30 +0100 |
---|---|---|
committer | Christian König <[email protected]> | 2012-03-09 12:43:49 +0100 |
commit | fb016854bc4327151e9eee3b7b08d0499976631a (patch) | |
tree | 6ce25106bd118fc0f9a0cbaf6581e2b22f0343fb /src | |
parent | 461c34c0cb0e23f11fd9390a37a62d9930a1c48e (diff) |
r600g: add support for subsampled rgb formats
v2: r600 formats are msb first!
Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/r600/r600_texture.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c index 923efce59e6..ce66117ed47 100644 --- a/src/gallium/drivers/r600/r600_texture.c +++ b/src/gallium/drivers/r600/r600_texture.c @@ -1135,6 +1135,21 @@ uint32_t r600_translate_texformat(struct pipe_screen *screen, } } + if (desc->layout == UTIL_FORMAT_LAYOUT_SUBSAMPLED) { + switch (format) { + case PIPE_FORMAT_R8G8_B8G8_UNORM: + case PIPE_FORMAT_G8R8_B8R8_UNORM: + result = FMT_GB_GR; + goto out_word4; + case PIPE_FORMAT_G8R8_G8B8_UNORM: + case PIPE_FORMAT_R8G8_R8B8_UNORM: + result = FMT_BG_RG; + goto out_word4; + default: + goto out_unknown; + } + } + if (format == PIPE_FORMAT_R9G9B9E5_FLOAT) { result = FMT_5_9_9_9_SHAREDEXP; goto out_word4; |