Wine tends to pessimistically use ~0 for its max index, but r300s
only can go up to 2^24-1, causing the kernel checker to freak out.
Civ4 is marginally improved now. Still crashes, but not as bad.
CS_LOCALS(r300);
assert((start * indexSize) % 4 == 0);
+ assert(count < (1 << 24));
+
+ DBG(r300, DBG_DRAW, "r300: Indexbuf of %u indices, min %u max %u\n",
+ count, minIndex, maxIndex);
+
+ maxIndex = MIN2(maxIndex, ((1 << 24) - 1));
if (alt_num_verts) {
- assert(count < (1 << 24));
BEGIN_CS(16);
OUT_CS_REG(R500_VAP_ALT_NUM_VERTICES, count);
} else {