summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r300/r300_state.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 52b89104b99..30f1df7bf66 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -1146,6 +1146,11 @@ static void r300_set_vertex_buffers(struct pipe_context* pipe,
if (vbo->max_index == ~0) {
/* Bogus value from broken state tracker; hax it. */
+ /* TODO - more hax - fixes doom3 from almos on irc */
+ if (!vbo->stride) {
+ fprintf(stderr, "r300: got a VBO with stride 0 fixing up to stide 4\n");
+ vbo->stride = 4;
+ }
vbo->max_index =
(vbo->buffer->width0 - vbo->buffer_offset) / vbo->stride;
}