mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
aux/trace: enhance trigger mode to dump context states during bind
when dumping a single frame, the creation info for these states hasn't been dumped yet, so always dump it during bind so it's visible Acked-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10093>
This commit is contained in:
parent
51216d656d
commit
5ecffaa7a6
3 changed files with 19 additions and 3 deletions
|
|
@ -305,7 +305,10 @@ trace_context_bind_blend_state(struct pipe_context *_pipe,
|
|||
trace_dump_call_begin("pipe_context", "bind_blend_state");
|
||||
|
||||
trace_dump_arg(ptr, pipe);
|
||||
trace_dump_arg(ptr, state);
|
||||
if (trace_dump_is_triggered())
|
||||
trace_dump_arg(blend_state, state);
|
||||
else
|
||||
trace_dump_arg(ptr, state);
|
||||
|
||||
pipe->bind_blend_state(pipe, state);
|
||||
|
||||
|
|
@ -432,7 +435,10 @@ trace_context_bind_rasterizer_state(struct pipe_context *_pipe,
|
|||
trace_dump_call_begin("pipe_context", "bind_rasterizer_state");
|
||||
|
||||
trace_dump_arg(ptr, pipe);
|
||||
trace_dump_arg(ptr, state);
|
||||
if (trace_dump_is_triggered())
|
||||
trace_dump_arg(rasterizer_state, state);
|
||||
else
|
||||
trace_dump_arg(ptr, state);
|
||||
|
||||
pipe->bind_rasterizer_state(pipe, state);
|
||||
|
||||
|
|
@ -491,7 +497,10 @@ trace_context_bind_depth_stencil_alpha_state(struct pipe_context *_pipe,
|
|||
trace_dump_call_begin("pipe_context", "bind_depth_stencil_alpha_state");
|
||||
|
||||
trace_dump_arg(ptr, pipe);
|
||||
trace_dump_arg(ptr, state);
|
||||
if (trace_dump_is_triggered())
|
||||
trace_dump_arg(depth_stencil_alpha_state, state);
|
||||
else
|
||||
trace_dump_arg(ptr, state);
|
||||
|
||||
pipe->bind_depth_stencil_alpha_state(pipe, state);
|
||||
|
||||
|
|
|
|||
|
|
@ -99,6 +99,12 @@ trace_dump_check_trigger(void)
|
|||
mtx_unlock(&call_mutex);
|
||||
}
|
||||
|
||||
bool
|
||||
trace_dump_is_triggered(void)
|
||||
{
|
||||
return trigger_active && !!trigger_filename;
|
||||
}
|
||||
|
||||
static inline void
|
||||
trace_dump_write(const char *buf, size_t size)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ void trace_dump_transfer_ptr(struct pipe_transfer *_transfer);
|
|||
|
||||
void trace_dump_trigger_active(bool active);
|
||||
void trace_dump_check_trigger(void);
|
||||
bool trace_dump_is_triggered(void);
|
||||
|
||||
/*
|
||||
* Code saving macros.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue