aux/trace: sanitize draws
if a draw isn't indexed, don't trace index_bias since this is a garbage value Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36045>
This commit is contained in:
committed by
Marge Bot
parent
e6038645fa
commit
eacb167375
@@ -112,7 +112,10 @@ trace_context_draw_vbo(struct pipe_context *_pipe,
|
||||
trace_dump_arg(int, drawid_offset);
|
||||
trace_dump_arg(draw_indirect_info, indirect);
|
||||
trace_dump_arg_begin("draws");
|
||||
trace_dump_struct_array(draw_start_count, draws, num_draws);
|
||||
if (info->index.resource)
|
||||
trace_dump_struct_array(draw_start_count_indexed, draws, num_draws);
|
||||
else
|
||||
trace_dump_struct_array(draw_start_count, draws, num_draws);
|
||||
trace_dump_arg_end();
|
||||
trace_dump_arg(uint, num_draws);
|
||||
|
||||
|
||||
@@ -934,6 +934,17 @@ void trace_dump_draw_vertex_state_info(struct pipe_draw_vertex_state_info state)
|
||||
}
|
||||
|
||||
void trace_dump_draw_start_count(const struct pipe_draw_start_count_bias *state)
|
||||
{
|
||||
if (!trace_dumping_enabled_locked())
|
||||
return;
|
||||
|
||||
trace_dump_struct_begin("pipe_draw_start_count_bias");
|
||||
trace_dump_member(uint, state, start);
|
||||
trace_dump_member(uint, state, count);
|
||||
trace_dump_struct_end();
|
||||
}
|
||||
|
||||
void trace_dump_draw_start_count_indexed(const struct pipe_draw_start_count_bias *state)
|
||||
{
|
||||
if (!trace_dumping_enabled_locked())
|
||||
return;
|
||||
|
||||
@@ -103,6 +103,8 @@ void trace_dump_draw_vertex_state_info(struct pipe_draw_vertex_state_info state)
|
||||
|
||||
void trace_dump_draw_start_count(const struct pipe_draw_start_count_bias *state);
|
||||
|
||||
void trace_dump_draw_start_count_indexed(const struct pipe_draw_start_count_bias *state);
|
||||
|
||||
void trace_dump_draw_indirect_info(const struct pipe_draw_indirect_info *state);
|
||||
|
||||
void trace_dump_blit_info(const struct pipe_blit_info *);
|
||||
|
||||
Reference in New Issue
Block a user