mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
util: fix valgrind errors when dumping pipe_draw_info
Various index-related fields are only initialized when required, so they should only be dumped in those cases. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
94cc01105e
commit
556946f801
1 changed files with 8 additions and 2 deletions
|
|
@ -919,9 +919,15 @@ util_dump_draw_info(FILE *stream, const struct pipe_draw_info *state)
|
|||
util_dump_member(stream, uint, state, max_index);
|
||||
|
||||
util_dump_member(stream, bool, state, primitive_restart);
|
||||
util_dump_member(stream, uint, state, restart_index);
|
||||
if (state->primitive_restart)
|
||||
util_dump_member(stream, uint, state, restart_index);
|
||||
|
||||
util_dump_member(stream, ptr, state, index.resource);
|
||||
if (state->index_size) {
|
||||
if (state->has_user_indices)
|
||||
util_dump_member(stream, ptr, state, index.user);
|
||||
else
|
||||
util_dump_member(stream, ptr, state, index.resource);
|
||||
}
|
||||
util_dump_member(stream, ptr, state, count_from_stream_output);
|
||||
|
||||
if (!state->indirect) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue