diff options
Diffstat (limited to 'src/gallium/drivers/r600/eg_state_inlines.h')
-rw-r--r-- | src/gallium/drivers/r600/eg_state_inlines.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/eg_state_inlines.h b/src/gallium/drivers/r600/eg_state_inlines.h index 0a42abcdf2b..d9897e020ec 100644 --- a/src/gallium/drivers/r600/eg_state_inlines.h +++ b/src/gallium/drivers/r600/eg_state_inlines.h @@ -400,7 +400,18 @@ static INLINE uint32_t r600_translate_colorformat(enum pipe_format format) case PIPE_FORMAT_R32_FLOAT: return V_028C70_COLOR_32_FLOAT; + case PIPE_FORMAT_R16G16_FLOAT: + return V_028C70_COLOR_16_16_FLOAT; + + case PIPE_FORMAT_R16G16_SSCALED: + return V_028C70_COLOR_16_16; + + case PIPE_FORMAT_R16G16B16_FLOAT: + return V_028C70_COLOR_16_16_16_16_FLOAT; + /* 64-bit buffers. */ + case PIPE_FORMAT_R16G16B16A16_SSCALED: + case PIPE_FORMAT_R16G16B16_SSCALED: case PIPE_FORMAT_R16G16B16A16_UNORM: case PIPE_FORMAT_R16G16B16A16_SNORM: return V_028C70_COLOR_16_16_16_16; @@ -409,6 +420,9 @@ static INLINE uint32_t r600_translate_colorformat(enum pipe_format format) case PIPE_FORMAT_R32G32_FLOAT: return V_028C70_COLOR_32_32_FLOAT; + case PIPE_FORMAT_R32G32_SSCALED: + return V_028C70_COLOR_32_32; + /* 128-bit buffers. */ case PIPE_FORMAT_R32G32B32_FLOAT: return V_028C70_COLOR_32_32_32_FLOAT; @@ -424,6 +438,25 @@ static INLINE uint32_t r600_translate_colorformat(enum pipe_format format) } } +static INLINE void r600_translate_vertex_num_format(enum pipe_format format, uint32_t *num_format_p, + uint32_t *format_comp_p) +{ + uint32_t num_format = 0, format_comp = 0; + switch (format) { + case PIPE_FORMAT_R16G16B16A16_SSCALED: + case PIPE_FORMAT_R16G16B16_SSCALED: + case PIPE_FORMAT_R16G16_SSCALED: + case PIPE_FORMAT_R32G32_SSCALED: + num_format = V_030008_SQ_NUM_FORMAT_SCALED; + format_comp = 1; + break; + default: + break; + } + *num_format_p = num_format; + *format_comp_p = format_comp; +} + static INLINE boolean r600_is_sampler_format_supported(enum pipe_format format) { return r600_translate_texformat(format, NULL, NULL, NULL) != ~0; |