From 558c15995f486d72b959ad19c914a38adbcbe5f7 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sun, 14 Feb 2010 21:58:00 +0100 Subject: r300: add half_float_vertex support --- src/gallium/drivers/r300/r300_reg.h | 3 +++ src/gallium/drivers/r300/r300_state_inlines.h | 8 ++++++++ 2 files changed, 11 insertions(+) (limited to 'src/gallium/drivers') diff --git a/src/gallium/drivers/r300/r300_reg.h b/src/gallium/drivers/r300/r300_reg.h index 361813891f..a049da69e2 100644 --- a/src/gallium/drivers/r300/r300_reg.h +++ b/src/gallium/drivers/r300/r300_reg.h @@ -244,6 +244,9 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. # define R300_DATA_TYPE_SHORT_4 7 # define R300_DATA_TYPE_VECTOR_3_TTT 8 # define R300_DATA_TYPE_VECTOR_3_EET 9 +# define R300_DATA_TYPE_FLOAT_8 10 +# define R300_DATA_TYPE_FLT16_2 11 +# define R300_DATA_TYPE_FLT16_4 12 # define R300_SKIP_DWORDS_SHIFT 4 # define R300_DST_VEC_LOC_SHIFT 8 # define R300_LAST_VEC (1 << 13) diff --git a/src/gallium/drivers/r300/r300_state_inlines.h b/src/gallium/drivers/r300/r300_state_inlines.h index b7676e1715..6ee6cd0e3f 100644 --- a/src/gallium/drivers/r300/r300_state_inlines.h +++ b/src/gallium/drivers/r300/r300_state_inlines.h @@ -507,6 +507,14 @@ r300_translate_vertex_data_type(enum pipe_format format) { /* Half-floats, floats, doubles */ case UTIL_FORMAT_TYPE_FLOAT: switch (util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_RGB, 0)) { + case 16: + /* XXX Supported only on RV350 and later. */ + if (components > 2) { + result = R300_DATA_TYPE_FLT16_4; + } else { + result = R300_DATA_TYPE_FLT16_2; + } + break; case 32: result = R300_DATA_TYPE_FLOAT_1 + (components - 1); break; -- cgit v1.2.3