mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
i965: Make sure we always compute valid index bounds before drawing.
When doing software rendering (i.e. rendering to the selection buffer) we need to make sure that we have valid index bounds before calling _tnl_draw_prims(), otherwise we can crash. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59455 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
e7f7574598
commit
029ccd773d
1 changed files with 2 additions and 1 deletions
|
|
@ -554,7 +554,8 @@ void brw_draw_prims( struct gl_context *ctx,
|
|||
* get the minimum and maximum of their index buffer so we know what range
|
||||
* to upload.
|
||||
*/
|
||||
if (!vbo_all_varyings_in_vbos(arrays) && !index_bounds_valid) {
|
||||
if (!index_bounds_valid &&
|
||||
(ctx->RenderMode != GL_RENDER || !vbo_all_varyings_in_vbos(arrays))) {
|
||||
perf_debug("Scanning index buffer to compute index buffer bounds. "
|
||||
"Use glDrawRangeElements() to avoid this.\n");
|
||||
vbo_get_minmax_indices(ctx, prims, ib, &min_index, &max_index, nr_prims);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue