diff options
author | Dave Airlie <airlied@redhat.com> | 2010-08-06 15:21:44 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-08-06 15:21:44 +1000 |
commit | 0a2a6c75bffc56d8dfde9b8a46c40222825630ea (patch) | |
tree | 3a23d1e9660c089eadd68ce8dbd76dd621c8b036 /src/gallium/drivers/r600/r600_state_inlines.h | |
parent | fc47cb9d710c046d34e8238337e009d7b76a3207 (diff) |
r600g: add SRGB support.
This enables GL2.1 and passes glean's texture_srgb test.
Diffstat (limited to 'src/gallium/drivers/r600/r600_state_inlines.h')
-rw-r--r-- | src/gallium/drivers/r600/r600_state_inlines.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_state_inlines.h b/src/gallium/drivers/r600/r600_state_inlines.h index 4a955da1c0..fdc29386ae 100644 --- a/src/gallium/drivers/r600/r600_state_inlines.h +++ b/src/gallium/drivers/r600/r600_state_inlines.h @@ -166,6 +166,12 @@ static uint32_t r600_translate_colorswap(enum pipe_format format) case PIPE_FORMAT_B4G4R4X4_UNORM: return SWAP_ALT; /* 32-bit buffers. */ + + case PIPE_FORMAT_A8B8G8R8_SRGB: + return SWAP_STD_REV; + case PIPE_FORMAT_B8G8R8A8_SRGB: + return SWAP_ALT; + case PIPE_FORMAT_B8G8R8A8_UNORM: case PIPE_FORMAT_B8G8R8X8_UNORM: return SWAP_ALT; @@ -244,6 +250,8 @@ static INLINE uint32_t r600_translate_colorformat(enum pipe_format format) case PIPE_FORMAT_X8B8G8R8_UNORM: case PIPE_FORMAT_R8G8B8X8_UNORM: case PIPE_FORMAT_R8SG8SB8UX8U_NORM: + case PIPE_FORMAT_A8B8G8R8_SRGB: + case PIPE_FORMAT_B8G8R8A8_SRGB: return V_0280A0_COLOR_8_8_8_8; case PIPE_FORMAT_R10G10B10A2_UNORM: |