diff options
author | Marek Olšák <[email protected]> | 2013-02-13 18:11:48 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2013-02-14 14:59:36 +0100 |
commit | 34dc4d6b67529cd65e744c4ac487d7700cd633da (patch) | |
tree | 369719f89301198829d5906bc68961a7b220622b /src/gallium | |
parent | ec5376f5d8b588bc3c147189059178f47aed3503 (diff) |
r600g: add support for red-alpha render targets
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/r600/evergreen_state.c | 22 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_state.c | 22 |
2 files changed, 44 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index 4d34d8ba1dd..ad0a62e968a 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -292,6 +292,18 @@ static uint32_t r600_translate_colorswap(enum pipe_format format) case PIPE_FORMAT_L32A32_UINT: case PIPE_FORMAT_L32A32_SINT: case PIPE_FORMAT_L32A32_FLOAT: + case PIPE_FORMAT_R8A8_UNORM: + case PIPE_FORMAT_R8A8_SNORM: + case PIPE_FORMAT_R8A8_UINT: + case PIPE_FORMAT_R8A8_SINT: + case PIPE_FORMAT_R16A16_UNORM: + case PIPE_FORMAT_R16A16_SNORM: + case PIPE_FORMAT_R16A16_UINT: + case PIPE_FORMAT_R16A16_SINT: + case PIPE_FORMAT_R16A16_FLOAT: + case PIPE_FORMAT_R32A32_UINT: + case PIPE_FORMAT_R32A32_SINT: + case PIPE_FORMAT_R32A32_FLOAT: return V_028C70_SWAP_ALT; case PIPE_FORMAT_R8G8_UNORM: case PIPE_FORMAT_R8G8_SNORM: @@ -445,6 +457,10 @@ static uint32_t r600_translate_colorformat(enum pipe_format format) case PIPE_FORMAT_R8G8_SNORM: case PIPE_FORMAT_R8G8_UINT: case PIPE_FORMAT_R8G8_SINT: + case PIPE_FORMAT_R8A8_UNORM: + case PIPE_FORMAT_R8A8_SNORM: + case PIPE_FORMAT_R8A8_UINT: + case PIPE_FORMAT_R8A8_SINT: return V_028C70_COLOR_8_8; case PIPE_FORMAT_R16_UNORM: @@ -531,6 +547,7 @@ static uint32_t r600_translate_colorformat(enum pipe_format format) case PIPE_FORMAT_R16G16_FLOAT: case PIPE_FORMAT_L16A16_FLOAT: + case PIPE_FORMAT_R16A16_FLOAT: return V_028C70_COLOR_16_16_FLOAT; case PIPE_FORMAT_R16G16_UNORM: @@ -541,6 +558,10 @@ static uint32_t r600_translate_colorformat(enum pipe_format format) case PIPE_FORMAT_L16A16_SNORM: case PIPE_FORMAT_L16A16_UINT: case PIPE_FORMAT_L16A16_SINT: + case PIPE_FORMAT_R16A16_UNORM: + case PIPE_FORMAT_R16A16_SNORM: + case PIPE_FORMAT_R16A16_UINT: + case PIPE_FORMAT_R16A16_SINT: return V_028C70_COLOR_16_16; case PIPE_FORMAT_R11G11B10_FLOAT: @@ -563,6 +584,7 @@ static uint32_t r600_translate_colorformat(enum pipe_format format) case PIPE_FORMAT_R32G32_FLOAT: case PIPE_FORMAT_L32A32_FLOAT: + case PIPE_FORMAT_R32A32_FLOAT: return V_028C70_COLOR_32_32_FLOAT; case PIPE_FORMAT_R32G32_SINT: diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c index ec06be6ae46..c6559bbd000 100644 --- a/src/gallium/drivers/r600/r600_state.c +++ b/src/gallium/drivers/r600/r600_state.c @@ -222,6 +222,18 @@ static uint32_t r600_translate_colorswap(enum pipe_format format) case PIPE_FORMAT_L32A32_UINT: case PIPE_FORMAT_L32A32_SINT: case PIPE_FORMAT_L32A32_FLOAT: + case PIPE_FORMAT_R8A8_UNORM: + case PIPE_FORMAT_R8A8_SNORM: + case PIPE_FORMAT_R8A8_UINT: + case PIPE_FORMAT_R8A8_SINT: + case PIPE_FORMAT_R16A16_UNORM: + case PIPE_FORMAT_R16A16_SNORM: + case PIPE_FORMAT_R16A16_UINT: + case PIPE_FORMAT_R16A16_SINT: + case PIPE_FORMAT_R16A16_FLOAT: + case PIPE_FORMAT_R32A32_UINT: + case PIPE_FORMAT_R32A32_SINT: + case PIPE_FORMAT_R32A32_FLOAT: return V_0280A0_SWAP_ALT; case PIPE_FORMAT_R8G8_UNORM: case PIPE_FORMAT_R8G8_SNORM: @@ -377,6 +389,10 @@ static uint32_t r600_translate_colorformat(enum pipe_format format) case PIPE_FORMAT_R8G8_SNORM: case PIPE_FORMAT_R8G8_UINT: case PIPE_FORMAT_R8G8_SINT: + case PIPE_FORMAT_R8A8_UNORM: + case PIPE_FORMAT_R8A8_SNORM: + case PIPE_FORMAT_R8A8_UINT: + case PIPE_FORMAT_R8A8_SINT: return V_0280A0_COLOR_8_8; case PIPE_FORMAT_R16_UNORM: @@ -458,6 +474,7 @@ static uint32_t r600_translate_colorformat(enum pipe_format format) case PIPE_FORMAT_R16G16_FLOAT: case PIPE_FORMAT_L16A16_FLOAT: + case PIPE_FORMAT_R16A16_FLOAT: return V_0280A0_COLOR_16_16_FLOAT; case PIPE_FORMAT_R16G16_UNORM: @@ -468,6 +485,10 @@ static uint32_t r600_translate_colorformat(enum pipe_format format) case PIPE_FORMAT_L16A16_SNORM: case PIPE_FORMAT_L16A16_UINT: case PIPE_FORMAT_L16A16_SINT: + case PIPE_FORMAT_R16A16_UNORM: + case PIPE_FORMAT_R16A16_SNORM: + case PIPE_FORMAT_R16A16_UINT: + case PIPE_FORMAT_R16A16_SINT: return V_0280A0_COLOR_16_16; case PIPE_FORMAT_R11G11B10_FLOAT: @@ -490,6 +511,7 @@ static uint32_t r600_translate_colorformat(enum pipe_format format) case PIPE_FORMAT_R32G32_FLOAT: case PIPE_FORMAT_L32A32_FLOAT: + case PIPE_FORMAT_R32A32_FLOAT: return V_0280A0_COLOR_32_32_FLOAT; case PIPE_FORMAT_R32G32_SINT: |