summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_render.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-02-27 00:37:01 +0100
committerMarek Olšák <[email protected]>2010-02-27 18:39:35 +0100
commit93da1522098145f0e7ff9d4188050728b075b4a1 (patch)
treea7641f180354d4fe08192daaf81ff5ef857ff67e /src/gallium/drivers/r300/r300_render.c
parentdba7ad895333b9b0988239266a217edeebe6a3b3 (diff)
r300g: always emit the correct max vertex index to avoid DRM errors
Fixing bizarre reports that a vertex buffer is not large enough.
Diffstat (limited to 'src/gallium/drivers/r300/r300_render.c')
-rw-r--r--src/gallium/drivers/r300/r300_render.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c
index d604bfb7d75..e4f7615368d 100644
--- a/src/gallium/drivers/r300/r300_render.c
+++ b/src/gallium/drivers/r300/r300_render.c
@@ -452,8 +452,11 @@ void r300_draw_elements(struct pipe_context* pipe,
unsigned indexSize, unsigned mode,
unsigned start, unsigned count)
{
- pipe->draw_range_elements(pipe, indexBuffer, indexSize, 0, ~0,
- mode, start, count);
+ struct r300_context *r300 = r300_context(pipe);
+
+ pipe->draw_range_elements(pipe, indexBuffer, indexSize, 0,
+ r300->vertex_buffer_max_index,
+ mode, start, count);
}
void r300_draw_arrays(struct pipe_context* pipe, unsigned mode,