summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2011-02-14 10:05:52 +0100
committerMarek Olšák <maraeo@gmail.com>2011-02-14 11:43:14 +0100
commitd173f1ba8a3d77e46f73ecb00378ea9598fe2c68 (patch)
tree35e394bebe1d3266953753a9eb94c2093dcb4120 /src
parent3d5ac32f3bf95ceb9f3f03d6dedea5445ed35b18 (diff)
r300g: fix fallback for misaligned ushort indices with num vertices >= 65535
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r300/r300_render.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c
index fddabee7b2..051f434d42 100644
--- a/src/gallium/drivers/r300/r300_render.c
+++ b/src/gallium/drivers/r300/r300_render.c
@@ -615,7 +615,11 @@ static void r300_draw_range_elements(struct pipe_context* pipe,
minIndex, maxIndex, mode, start, count, indices3);
} else {
do {
- short_count = MIN2(count, 65534);
+ if (indexSize == 2 && (start & 1))
+ short_count = MIN2(count, 65535);
+ else
+ short_count = MIN2(count, 65534);
+
r300_emit_draw_elements(r300, indexBuffer, indexSize,
minIndex, maxIndex,
mode, start, short_count, indices3);