aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_render.c
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2010-03-12 02:47:44 -0800
committerCorbin Simpson <[email protected]>2010-03-12 02:54:10 -0800
commite42b2f768509b6984c7186805c6a8afdaebf3a06 (patch)
tree56fdcef6c411aadd34ee8d01a81667a26d50216c /src/gallium/drivers/r300/r300_render.c
parent915b3529b9794c0d41f37b33365eeeb9b2152e9d (diff)
r300g: Properly clamp index limits.
Make the kernel even less likely to barf on us.
Diffstat (limited to 'src/gallium/drivers/r300/r300_render.c')
-rw-r--r--src/gallium/drivers/r300/r300_render.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c
index 9c001ae186d..ef1b7510e18 100644
--- a/src/gallium/drivers/r300/r300_render.c
+++ b/src/gallium/drivers/r300/r300_render.c
@@ -280,7 +280,7 @@ static void r300_emit_draw_elements(struct r300_context *r300,
DBG(r300, DBG_DRAW, "r300: Indexbuf of %u indices, min %u max %u\n",
count, minIndex, maxIndex);
- maxIndex = MIN2(maxIndex, r300->vertex_buffer_max_index);
+ maxIndex = MIN3(maxIndex, r300->vertex_buffer_max_index, (1 << 24) - 1);
if (alt_num_verts) {
BEGIN_CS(15);