[Mesa-dev] [PATCH] i965: Make sure we always compute valid index bounds before drawing
Iago Toral Quiroga
itoral at igalia.com
Thu Mar 27 02:18:13 PDT 2014
There is crash in blender when rendering to the selection buffer and using VBO
that is caused because we call _tnl_draw_prims() without proper min_index
and max_index values.
As far as I can see it looks like these bounds should be computed by calling
vbo_get_minmax_indices() right before calling _tnl_draw_prims(), but this is
not happening in this case because vbo_all_varyings_in_vbos() evaluates to
TRUE in this code:
if (!vbo_all_varyings_in_vbos(arrays) && !index_bounds_valid) {
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);
}
Is there a case where index_bounds_valid can be FALSE and still we
don't want to compute index bounds? Since this is failing only when rendering
to the selection buffer (so using software rendering) I suppose hardware
rendering may be okay with that. If that is the case then I can update the
patch to make sure we only skip the vbo_all_varyings_in_vbos() check when
doing software rendering.
Iago Toral Quiroga (1):
i965: Make sure we always compute valid index bounds before drawing.
src/mesa/drivers/dri/i965/brw_draw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
1.8.3.2
More information about the mesa-dev
mailing list