mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 16:30:10 +01:00
r300g: fix draw_vbo splitting on r3xx-r4xx
NOTE: This is a candidate for the 7.10 branch.
This commit is contained in:
parent
f48412c39f
commit
578d4539ba
1 changed files with 10 additions and 5 deletions
|
|
@ -673,10 +673,11 @@ static void r300_draw_elements(struct r300_context *r300,
|
|||
indices3);
|
||||
} else {
|
||||
do {
|
||||
if (indexSize == 2 && (start & 1))
|
||||
short_count = MIN2(count, 65535);
|
||||
else
|
||||
short_count = MIN2(count, 65534);
|
||||
/* The maximum must be divisible by 4 and 3,
|
||||
* so that quad and triangle lists are split correctly.
|
||||
*
|
||||
* Strips, loops, and fans won't work. */
|
||||
short_count = MIN2(count, 65532);
|
||||
|
||||
r300_emit_draw_elements(r300, indexBuffer, indexSize,
|
||||
info->min_index, info->max_index,
|
||||
|
|
@ -722,7 +723,11 @@ static void r300_draw_arrays(struct r300_context *r300,
|
|||
r300_emit_draw_arrays(r300, info->mode, count);
|
||||
} else {
|
||||
do {
|
||||
short_count = MIN2(count, 65535);
|
||||
/* The maximum must be divisible by 4 and 3,
|
||||
* so that quad and triangle lists are split correctly.
|
||||
*
|
||||
* Strips, loops, and fans won't work. */
|
||||
short_count = MIN2(count, 65532);
|
||||
r300_emit_draw_arrays(r300, info->mode, short_count);
|
||||
|
||||
start += short_count;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue