mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
aux/trace: add set_global_binding
Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19214>
This commit is contained in:
parent
6d2a0b3b8d
commit
d28d1ead9c
2 changed files with 47 additions and 2 deletions
|
|
@ -2276,6 +2276,30 @@ static void trace_context_make_image_handle_resident(struct pipe_context *_pipe,
|
|||
pipe->make_image_handle_resident(pipe, handle, access, resident);
|
||||
}
|
||||
|
||||
static void trace_context_set_global_binding(struct pipe_context *_pipe,
|
||||
unsigned first, unsigned count,
|
||||
struct pipe_resource **resources,
|
||||
uint32_t **handles)
|
||||
{
|
||||
struct trace_context *tr_ctx = trace_context(_pipe);
|
||||
struct pipe_context *pipe = tr_ctx->pipe;
|
||||
|
||||
trace_dump_call_begin("pipe_context", "set_global_binding");
|
||||
trace_dump_arg(ptr, pipe);
|
||||
trace_dump_arg(uint, first);
|
||||
trace_dump_arg(uint, count);
|
||||
trace_dump_arg_array(ptr, resources, count);
|
||||
trace_dump_arg_array_val(uint, handles, count);
|
||||
|
||||
pipe->set_global_binding(pipe, first, count, resources, handles);
|
||||
|
||||
/* TODO: the handles are 64 bit if ADDRESS_BITS are 64, this is better than
|
||||
* nothing though
|
||||
*/
|
||||
trace_dump_ret_array_val(uint, handles, count);
|
||||
trace_dump_call_end();
|
||||
}
|
||||
|
||||
struct pipe_context *
|
||||
trace_context_create(struct trace_screen *tr_scr,
|
||||
struct pipe_context *pipe)
|
||||
|
|
@ -2409,6 +2433,7 @@ trace_context_create(struct trace_screen *tr_scr,
|
|||
TR_CTX_INIT(invalidate_resource);
|
||||
TR_CTX_INIT(set_context_param);
|
||||
TR_CTX_INIT(set_debug_callback);
|
||||
TR_CTX_INIT(set_global_binding);
|
||||
|
||||
#undef TR_CTX_INIT
|
||||
|
||||
|
|
|
|||
|
|
@ -145,14 +145,14 @@ bool trace_dump_is_triggered(void);
|
|||
trace_dump_ret_end(); \
|
||||
} while(0)
|
||||
|
||||
#define trace_dump_array(_type, _obj, _size) \
|
||||
#define trace_dump_array_impl(_type, _obj, _size, _prefix) \
|
||||
do { \
|
||||
if (_obj) { \
|
||||
size_t idx; \
|
||||
trace_dump_array_begin(); \
|
||||
for(idx = 0; idx < (_size); ++idx) { \
|
||||
trace_dump_elem_begin(); \
|
||||
trace_dump_##_type((_obj)[idx]); \
|
||||
trace_dump_##_type(_prefix(_obj)[idx]); \
|
||||
trace_dump_elem_end(); \
|
||||
} \
|
||||
trace_dump_array_end(); \
|
||||
|
|
@ -161,6 +161,12 @@ bool trace_dump_is_triggered(void);
|
|||
} \
|
||||
} while(0)
|
||||
|
||||
#define trace_dump_array(_type, _obj, _size) \
|
||||
trace_dump_array_impl(_type, _obj, _size, );
|
||||
|
||||
#define trace_dump_array_val(_type, _obj, _size) \
|
||||
trace_dump_array_impl(_type, _obj, _size, *);
|
||||
|
||||
#define trace_dump_struct_array(_type, _obj, _size) \
|
||||
do { \
|
||||
if (_obj) { \
|
||||
|
|
@ -191,6 +197,20 @@ bool trace_dump_is_triggered(void);
|
|||
trace_dump_arg_end(); \
|
||||
} while(0)
|
||||
|
||||
#define trace_dump_arg_array_val(_type, _arg, _size) \
|
||||
do { \
|
||||
trace_dump_arg_begin(#_arg); \
|
||||
trace_dump_array_val(_type, _arg, _size); \
|
||||
trace_dump_arg_end(); \
|
||||
} while(0)
|
||||
|
||||
#define trace_dump_ret_array_val(_type, _arg, _size) \
|
||||
do { \
|
||||
trace_dump_ret_begin(); \
|
||||
trace_dump_array_val(_type, _arg, _size); \
|
||||
trace_dump_ret_end(); \
|
||||
} while(0)
|
||||
|
||||
#define trace_dump_member_array(_type, _obj, _member) \
|
||||
do { \
|
||||
trace_dump_member_begin(#_member); \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue