diff options
author | Marek Olšák <[email protected]> | 2011-04-27 16:30:28 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-04-29 11:31:55 +0200 |
commit | 8b558451ad7560a53263f1848b5c826069aa8f51 (patch) | |
tree | 13769a709d462e66f2b20d94590d6fe5e4073fbd /src/gallium/drivers | |
parent | e62530a6c00da71c0f7bf1f4c425fe6c5b452df6 (diff) |
r600g: implement EXT_packed_float
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/r600/eg_state_inlines.h | 4 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_state_inlines.h | 3 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_texture.c | 3 |
3 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/eg_state_inlines.h b/src/gallium/drivers/r600/eg_state_inlines.h index 586b7cf2d11..b780dba3e33 100644 --- a/src/gallium/drivers/r600/eg_state_inlines.h +++ b/src/gallium/drivers/r600/eg_state_inlines.h @@ -367,6 +367,7 @@ static inline uint32_t r600_translate_colorswap(enum pipe_format format) case PIPE_FORMAT_B10G10R10A2_UNORM: return V_028C70_SWAP_ALT; + case PIPE_FORMAT_R11G11B10_FLOAT: case PIPE_FORMAT_R32_FLOAT: case PIPE_FORMAT_R16G16_FLOAT: case PIPE_FORMAT_R16G16_UNORM: @@ -468,6 +469,9 @@ static INLINE uint32_t r600_translate_colorformat(enum pipe_format format) case PIPE_FORMAT_R16G16_UNORM: return V_028C70_COLOR_16_16; + case PIPE_FORMAT_R11G11B10_FLOAT: + return V_028C70_COLOR_10_11_11_FLOAT; + /* 64-bit buffers. */ case PIPE_FORMAT_R16G16B16_USCALED: case PIPE_FORMAT_R16G16B16A16_USCALED: diff --git a/src/gallium/drivers/r600/r600_state_inlines.h b/src/gallium/drivers/r600/r600_state_inlines.h index 09d07f78407..53a649cf8b2 100644 --- a/src/gallium/drivers/r600/r600_state_inlines.h +++ b/src/gallium/drivers/r600/r600_state_inlines.h @@ -361,6 +361,7 @@ static inline uint32_t r600_translate_colorswap(enum pipe_format format) case PIPE_FORMAT_B10G10R10A2_UNORM: return V_0280A0_SWAP_ALT; + case PIPE_FORMAT_R11G11B10_FLOAT: case PIPE_FORMAT_R16G16_UNORM: case PIPE_FORMAT_R16G16_FLOAT: case PIPE_FORMAT_R32_FLOAT: @@ -462,6 +463,8 @@ static INLINE uint32_t r600_translate_colorformat(enum pipe_format format) case PIPE_FORMAT_R16G16_UNORM: return V_0280A0_COLOR_16_16; + case PIPE_FORMAT_R11G11B10_FLOAT: + return V_0280A0_COLOR_10_11_11_FLOAT; /* 64-bit buffers. */ case PIPE_FORMAT_R16G16B16_USCALED: diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c index b22eb7bbdeb..7ffea6961de 100644 --- a/src/gallium/drivers/r600/r600_texture.c +++ b/src/gallium/drivers/r600/r600_texture.c @@ -933,6 +933,9 @@ uint32_t r600_translate_texformat(struct pipe_screen *screen, if (format == PIPE_FORMAT_R9G9B9E5_FLOAT) { result = FMT_5_9_9_9_SHAREDEXP; goto out_word4; + } else if (format == PIPE_FORMAT_R11G11B10_FLOAT) { + result = FMT_10_11_11_FLOAT; + goto out_word4; } |