summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_state_inlines.h
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2010-05-28 02:53:47 +0200
committerMarek Olšák <maraeo@gmail.com>2010-05-28 03:30:11 +0200
commitebe2b546633a3593c54190bb1f2d372d70de14cd (patch)
treec831d3620ba706c7d9c133f24cf78485ef9ad809 /src/gallium/drivers/r300/r300_state_inlines.h
parentf2e05acac931889e0820e1cc5d7ea810048a6b5f (diff)
downloadexternal_mesa3d-ebe2b546633a3593c54190bb1f2d372d70de14cd.zip
external_mesa3d-ebe2b546633a3593c54190bb1f2d372d70de14cd.tar.gz
external_mesa3d-ebe2b546633a3593c54190bb1f2d372d70de14cd.tar.bz2
r300g: report vertex format support in is_format_supported
Diffstat (limited to 'src/gallium/drivers/r300/r300_state_inlines.h')
-rw-r--r--src/gallium/drivers/r300/r300_state_inlines.h24
1 files changed, 5 insertions, 19 deletions
diff --git a/src/gallium/drivers/r300/r300_state_inlines.h b/src/gallium/drivers/r300/r300_state_inlines.h
index 7156010..d1806da 100644
--- a/src/gallium/drivers/r300/r300_state_inlines.h
+++ b/src/gallium/drivers/r300/r300_state_inlines.h
@@ -371,10 +371,7 @@ r300_translate_vertex_data_type(enum pipe_format format) {
desc = util_format_description(format);
if (desc->layout != UTIL_FORMAT_LAYOUT_PLAIN) {
- fprintf(stderr, "r300: Bad format %s in %s:%d\n", util_format_short_name(format),
- __FUNCTION__, __LINE__);
- assert(0);
- abort();
+ return R300_INVALID_FORMAT;
}
switch (desc->channel[0].type) {
@@ -382,7 +379,7 @@ r300_translate_vertex_data_type(enum pipe_format format) {
case UTIL_FORMAT_TYPE_FLOAT:
switch (desc->channel[0].size) {
case 16:
- /* XXX Supported only on RV350 and later. */
+ /* Supported only on RV350 and later. */
if (desc->nr_channels > 2) {
result = R300_DATA_TYPE_FLT16_4;
} else {
@@ -393,10 +390,7 @@ r300_translate_vertex_data_type(enum pipe_format format) {
result = R300_DATA_TYPE_FLOAT_1 + (desc->nr_channels - 1);
break;
default:
- fprintf(stderr, "r300: Bad format %s in %s:%d\n",
- util_format_short_name(format), __FUNCTION__, __LINE__);
- assert(0);
- abort();
+ return R300_INVALID_FORMAT;
}
break;
/* Unsigned ints */
@@ -415,19 +409,11 @@ r300_translate_vertex_data_type(enum pipe_format format) {
}
break;
default:
- fprintf(stderr, "r300: Bad format %s in %s:%d\n",
- util_format_short_name(format), __FUNCTION__, __LINE__);
- fprintf(stderr, "r300: desc->channel[0].size == %d\n",
- desc->channel[0].size);
- assert(0);
- abort();
+ return R300_INVALID_FORMAT;
}
break;
default:
- fprintf(stderr, "r300: Bad format %s in %s:%d\n",
- util_format_short_name(format), __FUNCTION__, __LINE__);
- assert(0);
- abort();
+ return R300_INVALID_FORMAT;
}
if (desc->channel[0].type == UTIL_FORMAT_TYPE_SIGNED) {