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
|
@ -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…
Reference in New Issue