mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
swr: limit pipe_draw_info->restart_index usage
Only copy this value when in restart drawing mode. Eliminates valgrind errors when running trivial programs. Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
This commit is contained in:
parent
7fb4b6f270
commit
f0602dc920
1 changed files with 4 additions and 1 deletions
|
|
@ -107,7 +107,10 @@ swr_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
|
|||
}
|
||||
|
||||
struct swr_vertex_element_state *velems = ctx->velems;
|
||||
velems->fsState.cutIndex = info->restart_index;
|
||||
if (info->primitive_restart)
|
||||
velems->fsState.cutIndex = info->restart_index;
|
||||
else
|
||||
velems->fsState.cutIndex = 0;
|
||||
velems->fsState.bEnableCutIndex = info->primitive_restart;
|
||||
velems->fsState.bPartialVertexBuffer = (info->min_index > 0);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue