From: Marek Olšák Date: Wed, 13 Feb 2013 17:11:48 +0000 (+0100) Subject: r600g: add support for red-alpha render targets X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=34dc4d6b67529cd65e744c4ac487d7700cd633da;p=mesa.git r600g: add support for red-alpha render targets --- 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: