#undef TRACE_SHADER_STATE
+static inline void *
+trace_context_create_compute_state(struct pipe_context *_pipe,
+ const struct pipe_compute_state *state)
+{
+ struct trace_context *tr_ctx = trace_context(_pipe);
+ struct pipe_context *pipe = tr_ctx->pipe;
+ void * result;
+
+ trace_dump_call_begin("pipe_context", "create_compute_state");
+ trace_dump_arg(ptr, pipe);
+ trace_dump_arg(compute_state, state);
+ result = pipe->create_compute_state(pipe, state);
+ trace_dump_ret(ptr, result);
+ trace_dump_call_end();
+ return result;
+}
+
+static inline void
+trace_context_bind_compute_state(struct pipe_context *_pipe,
+ void *state)
+{
+ struct trace_context *tr_ctx = trace_context(_pipe);
+ struct pipe_context *pipe = tr_ctx->pipe;
+
+ trace_dump_call_begin("pipe_context", "bind_compute_state");
+ trace_dump_arg(ptr, pipe);
+ trace_dump_arg(ptr, state);
+ pipe->bind_compute_state(pipe, state);
+ trace_dump_call_end();
+}
+
+static inline void
+trace_context_delete_compute_state(struct pipe_context *_pipe,
+ void *state)
+{
+ struct trace_context *tr_ctx = trace_context(_pipe);
+ struct pipe_context *pipe = tr_ctx->pipe;
+
+ trace_dump_call_begin("pipe_context", "delete_compute_state");
+ trace_dump_arg(ptr, pipe);
+ trace_dump_arg(ptr, state);
+ pipe->delete_compute_state(pipe, state);
+ trace_dump_call_end();
+}
+
static inline void *
trace_context_create_vertex_elements_state(struct pipe_context *_pipe,
unsigned num_elements,
FREE(_buffers);
}
+static void trace_context_launch_grid(struct pipe_context *_pipe,
+ const struct pipe_grid_info *info)
+{
+ struct trace_context *tr_ctx = trace_context(_pipe);
+ struct pipe_context *pipe = tr_ctx->pipe;
+
+ trace_dump_call_begin("pipe_context", "launch_grid");
+
+ trace_dump_arg(ptr, pipe);
+ trace_dump_arg(grid_info, info);
+
+ trace_dump_trace_flush();
+
+ if (info->indirect) {
+ struct pipe_grid_info _info;
+
+ memcpy(&_info, info, sizeof(_info));
+ _info.indirect = trace_resource_unwrap(tr_ctx, _info.indirect);
+ pipe->launch_grid(pipe, &_info);
+ } else {
+ pipe->launch_grid(pipe, info);
+ }
+
+ trace_dump_call_end();
+}
+
static const struct debug_named_value rbug_blocker_flags[] = {
{"before", 1, NULL},
TR_CTX_INIT(create_tes_state);
TR_CTX_INIT(bind_tes_state);
TR_CTX_INIT(delete_tes_state);
+ TR_CTX_INIT(create_compute_state);
+ TR_CTX_INIT(bind_compute_state);
+ TR_CTX_INIT(delete_compute_state);
TR_CTX_INIT(create_vertex_elements_state);
TR_CTX_INIT(bind_vertex_elements_state);
TR_CTX_INIT(delete_vertex_elements_state);
TR_CTX_INIT(memory_barrier);
TR_CTX_INIT(set_tess_state);
TR_CTX_INIT(set_shader_buffers);
+ TR_CTX_INIT(launch_grid);
TR_CTX_INIT(transfer_map);
TR_CTX_INIT(transfer_unmap);
}
+void trace_dump_compute_state(const struct pipe_compute_state *state)
+{
+ if (!trace_dumping_enabled_locked())
+ return;
+
+ if (!state) {
+ trace_dump_null();
+ return;
+ }
+
+ trace_dump_struct_begin("pipe_compute_state");
+
+ trace_dump_member_begin("prog");
+ if (state->prog) {
+ static char str[64 * 1024];
+ tgsi_dump_str(state->prog, 0, str, sizeof(str));
+ trace_dump_string(str);
+ } else {
+ trace_dump_null();
+ }
+ trace_dump_member_end();
+
+ trace_dump_member(uint, state, req_local_mem);
+ trace_dump_member(uint, state, req_private_mem);
+ trace_dump_member(uint, state, req_input_mem);
+
+ trace_dump_struct_end();
+}
+
+
void trace_dump_depth_stencil_alpha_state(const struct pipe_depth_stencil_alpha_state *state)
{
unsigned i;
break;
}
}
+
+void trace_dump_grid_info(const struct pipe_grid_info *state)
+{
+ if (!trace_dumping_enabled_locked())
+ return;
+
+ if (!state) {
+ trace_dump_null();
+ return;
+ }
+
+ trace_dump_struct_begin("pipe_grid_info");
+
+ trace_dump_member(uint, state, pc);
+ trace_dump_member(ptr, state, input);
+
+ trace_dump_member_begin("block");
+ trace_dump_array(uint, state->block, Elements(state->block));
+ trace_dump_member_end();
+
+ trace_dump_member_begin("grid");
+ trace_dump_array(uint, state->grid, Elements(state->grid));
+ trace_dump_member_end();
+
+ trace_dump_member(ptr, state, indirect);
+ trace_dump_member(uint, state, indirect_offset);
+
+ trace_dump_struct_end();
+}
+
}
+static int
+trace_screen_get_compute_param(struct pipe_screen *_screen,
+ enum pipe_compute_cap param, void *data)
+{
+ struct trace_screen *tr_scr = trace_screen(_screen);
+ struct pipe_screen *screen = tr_scr->screen;
+ int result;
+
+ trace_dump_call_begin("pipe_screen", "get_compute_param");
+
+ trace_dump_arg(ptr, screen);
+ trace_dump_arg(int, param);
+ trace_dump_arg(ptr, data);
+
+ result = screen->get_compute_param(screen, param, data);
+
+ trace_dump_ret(int, result);
+
+ trace_dump_call_end();
+
+ return result;
+}
+
+
static boolean
trace_screen_is_format_supported(struct pipe_screen *_screen,
enum pipe_format format,
tr_scr->base.get_param = trace_screen_get_param;
tr_scr->base.get_shader_param = trace_screen_get_shader_param;
tr_scr->base.get_paramf = trace_screen_get_paramf;
+ tr_scr->base.get_compute_param = trace_screen_get_compute_param;
tr_scr->base.is_format_supported = trace_screen_is_format_supported;
assert(screen->context_create);
tr_scr->base.context_create = trace_screen_context_create;