diff options
Diffstat (limited to 'src/gallium/drivers/trace')
-rw-r--r-- | src/gallium/drivers/trace/tr_context.c | 30 | ||||
-rw-r--r-- | src/gallium/drivers/trace/tr_dump.c | 16 | ||||
-rw-r--r-- | src/gallium/drivers/trace/tr_dump.h | 5 | ||||
-rw-r--r-- | src/gallium/drivers/trace/tr_screen.c | 28 |
4 files changed, 13 insertions, 66 deletions
diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c index d24cc623c2e..4db7619c424 100644 --- a/src/gallium/drivers/trace/tr_context.c +++ b/src/gallium/drivers/trace/tr_context.c @@ -1184,7 +1184,6 @@ trace_context_clear_depth_stencil(struct pipe_context *_pipe, static INLINE void trace_context_flush(struct pipe_context *_pipe, - unsigned flags, struct pipe_fence_handle **fence) { struct trace_context *tr_ctx = trace_context(_pipe); @@ -1193,9 +1192,8 @@ trace_context_flush(struct pipe_context *_pipe, trace_dump_call_begin("pipe_context", "flush"); trace_dump_arg(ptr, pipe); - trace_dump_arg(uint, flags); - pipe->flush(pipe, flags, fence); + pipe->flush(pipe, fence); if(fence) trace_dump_ret(ptr, *fence); @@ -1219,31 +1217,6 @@ trace_context_destroy(struct pipe_context *_pipe) FREE(tr_ctx); } -static unsigned int -trace_is_resource_referenced( struct pipe_context *_pipe, - struct pipe_resource *_resource, - unsigned level, int layer) -{ - struct trace_context *tr_ctx = trace_context(_pipe); - struct trace_resource *tr_tex = trace_resource(_resource); - struct pipe_context *pipe = tr_ctx->pipe; - struct pipe_resource *texture = tr_tex->resource; - unsigned int referenced; - - trace_dump_call_begin("pipe_context", "is_resource_referenced"); - trace_dump_arg(ptr, pipe); - trace_dump_arg(ptr, texture); - trace_dump_arg(uint, level); - trace_dump_arg(int, layer); - - referenced = pipe->is_resource_referenced(pipe, texture, level, layer); - - trace_dump_ret(uint, referenced); - trace_dump_call_end(); - - return referenced; -} - /******************************************************************** * transfer @@ -1520,7 +1493,6 @@ trace_context_create(struct trace_screen *tr_scr, tr_ctx->base.clear_render_target = trace_context_clear_render_target; tr_ctx->base.clear_depth_stencil = trace_context_clear_depth_stencil; tr_ctx->base.flush = trace_context_flush; - tr_ctx->base.is_resource_referenced = trace_is_resource_referenced; tr_ctx->base.get_transfer = trace_context_get_transfer; tr_ctx->base.transfer_destroy = trace_context_transfer_destroy; diff --git a/src/gallium/drivers/trace/tr_dump.c b/src/gallium/drivers/trace/tr_dump.c index 51a4ea96335..8a4ec20fb84 100644 --- a/src/gallium/drivers/trace/tr_dump.c +++ b/src/gallium/drivers/trace/tr_dump.c @@ -60,10 +60,9 @@ static struct os_stream *stream = NULL; static unsigned refcount = 0; -static pipe_mutex call_mutex; +pipe_static_mutex(call_mutex); static long unsigned call_no = 0; static boolean dumping = FALSE; -static boolean initialized = FALSE; static INLINE void @@ -225,26 +224,13 @@ trace_dump_trace_close(void) stream = NULL; refcount = 0; call_no = 0; - pipe_mutex_destroy(call_mutex); } } -void trace_dump_init() -{ - if (initialized) - return; - - pipe_mutex_init(call_mutex); - dumping = FALSE; - initialized = TRUE; -} - boolean trace_dump_trace_begin() { const char *filename; - assert(initialized); - filename = debug_get_option("GALLIUM_TRACE", NULL); if(!filename) return FALSE; diff --git a/src/gallium/drivers/trace/tr_dump.h b/src/gallium/drivers/trace/tr_dump.h index 74c5e83e9e1..62b4fe429b1 100644 --- a/src/gallium/drivers/trace/tr_dump.h +++ b/src/gallium/drivers/trace/tr_dump.h @@ -43,11 +43,6 @@ struct pipe_transfer; struct pipe_box; /* - * Call before use. - */ -void trace_dump_init(void); - -/* * Low level dumping controls. * * Opening the trace file and checking if that is opened. diff --git a/src/gallium/drivers/trace/tr_screen.c b/src/gallium/drivers/trace/tr_screen.c index c2de2daa883..42180c4f19e 100644 --- a/src/gallium/drivers/trace/tr_screen.c +++ b/src/gallium/drivers/trace/tr_screen.c @@ -158,8 +158,7 @@ trace_screen_is_format_supported(struct pipe_screen *_screen, enum pipe_format format, enum pipe_texture_target target, unsigned sample_count, - unsigned tex_usage, - unsigned geom_flags) + unsigned tex_usage) { struct trace_screen *tr_scr = trace_screen(_screen); struct pipe_screen *screen = tr_scr->screen; @@ -172,10 +171,9 @@ trace_screen_is_format_supported(struct pipe_screen *_screen, trace_dump_arg(int, target); trace_dump_arg(uint, sample_count); trace_dump_arg(uint, tex_usage); - trace_dump_arg(uint, geom_flags); result = screen->is_format_supported(screen, format, target, sample_count, - tex_usage, geom_flags); + tex_usage); trace_dump_ret(bool, result); @@ -393,10 +391,9 @@ trace_screen_fence_reference(struct pipe_screen *_screen, } -static int +static boolean trace_screen_fence_signalled(struct pipe_screen *_screen, - struct pipe_fence_handle *fence, - unsigned flags) + struct pipe_fence_handle *fence) { struct trace_screen *tr_scr = trace_screen(_screen); struct pipe_screen *screen = tr_scr->screen; @@ -406,11 +403,10 @@ trace_screen_fence_signalled(struct pipe_screen *_screen, trace_dump_arg(ptr, screen); trace_dump_arg(ptr, fence); - trace_dump_arg(uint, flags); - result = screen->fence_signalled(screen, fence, flags); + result = screen->fence_signalled(screen, fence); - trace_dump_ret(int, result); + trace_dump_ret(bool, result); trace_dump_call_end(); @@ -418,10 +414,10 @@ trace_screen_fence_signalled(struct pipe_screen *_screen, } -static int +static boolean trace_screen_fence_finish(struct pipe_screen *_screen, struct pipe_fence_handle *fence, - unsigned flags) + uint64_t timeout) { struct trace_screen *tr_scr = trace_screen(_screen); struct pipe_screen *screen = tr_scr->screen; @@ -431,11 +427,11 @@ trace_screen_fence_finish(struct pipe_screen *_screen, trace_dump_arg(ptr, screen); trace_dump_arg(ptr, fence); - trace_dump_arg(uint, flags); + trace_dump_arg(uint, timeout); - result = screen->fence_finish(screen, fence, flags); + result = screen->fence_finish(screen, fence, timeout); - trace_dump_ret(int, result); + trace_dump_ret(bool, result); trace_dump_call_end(); @@ -472,8 +468,6 @@ trace_enabled(void) return trace; firstrun = FALSE; - trace_dump_init(); - if(trace_dump_trace_begin()) { trace_dumping_start(); trace = TRUE; |