summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-02-14 21:58:00 +0100
committerMarek Olšák <[email protected]>2010-02-14 21:58:52 +0100
commit558c15995f486d72b959ad19c914a38adbcbe5f7 (patch)
tree31edfb840723fc7c108fd77f7753dda1fc0b8686 /src
parent6e958832afe9544973528bed78dd3a340b8686f3 (diff)
r300: add half_float_vertex support
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r300/r300_reg.h3
-rw-r--r--src/gallium/drivers/r300/r300_state_inlines.h8
2 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_reg.h b/src/gallium/drivers/r300/r300_reg.h
index 361813891fb..a049da69e2e 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 b7676e1715c..6ee6cd0e3f2 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;