Commit 2764a519 authored by Corbin Simpson's avatar Corbin Simpson
Browse files

r300g: Forcibly sanitize max index.

Not perfect, but the kernel should shut up now.
parent ecfcb146
......@@ -274,14 +274,14 @@ static void r300_emit_draw_elements(struct r300_context *r300,
#endif
CS_LOCALS(r300);
assert((start * indexSize) % 4 == 0);
assert((start * indexSize) % 4 == 0);
assert(count < (1 << 24));
maxIndex = MIN3(maxIndex, r300->vertex_buffer_max_index, count - minIndex);
DBG(r300, DBG_DRAW, "r300: Indexbuf of %u indices, min %u max %u\n",
count, minIndex, maxIndex);
maxIndex = MIN3(maxIndex, r300->vertex_buffer_max_index, (1 << 24) - 1);
if (alt_num_verts) {
BEGIN_CS(15);
OUT_CS_REG(R500_VAP_ALT_NUM_VERTICES, count);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment