summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_state_derived.c
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_derived.c
parentf2e05acac931889e0820e1cc5d7ea810048a6b5f (diff)
r300g: report vertex format support in is_format_supported
Diffstat (limited to 'src/gallium/drivers/r300/r300_state_derived.c')
-rw-r--r--src/gallium/drivers/r300/r300_state_derived.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_state_derived.c b/src/gallium/drivers/r300/r300_state_derived.c
index 20f24e8b04..cc75fad3bb 100644
--- a/src/gallium/drivers/r300/r300_state_derived.c
+++ b/src/gallium/drivers/r300/r300_state_derived.c
@@ -154,8 +154,15 @@ static void r300_swtcl_vertex_psc(struct r300_context *r300)
format = draw_translate_vinfo_format(vinfo->attrib[i].emit);
/* Obtain the type of data in this attribute. */
- type = r300_translate_vertex_data_type(format) |
- vs_output_tab[i] << R300_DST_VEC_LOC_SHIFT;
+ type = r300_translate_vertex_data_type(format);
+ if (type == R300_INVALID_FORMAT) {
+ fprintf(stderr, "r300: Bad vertex format %s.\n",
+ util_format_short_name(format));
+ assert(0);
+ abort();
+ }
+
+ type |= vs_output_tab[i] << R300_DST_VEC_LOC_SHIFT;
/* Obtain the swizzle for this attribute. Note that the default
* swizzle in the hardware is not XYZW! */