mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 20:10:17 +01:00
r300g: index buffer range checking
This commit is contained in:
parent
e130f524a9
commit
d84bf6d44d
1 changed files with 6 additions and 0 deletions
|
|
@ -508,6 +508,12 @@ static void r300_draw_range_elements(struct pipe_context* pipe,
|
|||
return;
|
||||
}
|
||||
|
||||
/* Index buffer range checking. */
|
||||
if ((start + count) * indexSize > indexBuffer->width0) {
|
||||
fprintf(stderr, "r300: Invalid index buffer range. Skipping rendering.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Set up fallback for incompatible vertex layout if needed. */
|
||||
if (r300->incompatible_vb_layout || r300->velems->incompatible_layout) {
|
||||
r300_begin_vertex_translate(r300);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue