summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/auxiliary/driver_trace/tr_context.c44
-rw-r--r--src/gallium/auxiliary/driver_trace/tr_screen.c24
2 files changed, 68 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/driver_trace/tr_context.c b/src/gallium/auxiliary/driver_trace/tr_context.c
index 479a987dfa6..70565db851d 100644
--- a/src/gallium/auxiliary/driver_trace/tr_context.c
+++ b/src/gallium/auxiliary/driver_trace/tr_context.c
@@ -1314,6 +1314,48 @@ trace_context_flush(struct pipe_context *_pipe,
}
+static void
+trace_context_create_fence_fd(struct pipe_context *_pipe,
+ struct pipe_fence_handle **fence,
+ int fd,
+ enum pipe_fd_type type)
+{
+ struct trace_context *tr_ctx = trace_context(_pipe);
+ struct pipe_context *pipe = tr_ctx->pipe;
+
+ trace_dump_call_begin("pipe_context", "create_fence_fd");
+
+ trace_dump_arg(ptr, pipe);
+ trace_dump_arg(int, fd);
+ trace_dump_arg(uint, type);
+
+ pipe->create_fence_fd(pipe, fence, fd, type);
+
+ if (fence)
+ trace_dump_ret(ptr, *fence);
+
+ trace_dump_call_end();
+}
+
+
+static void
+trace_context_fence_server_sync(struct pipe_context *_pipe,
+ struct pipe_fence_handle *fence)
+{
+ struct trace_context *tr_ctx = trace_context(_pipe);
+ struct pipe_context *pipe = tr_ctx->pipe;
+
+ trace_dump_call_begin("pipe_context", "fence_server_sync");
+
+ trace_dump_arg(ptr, pipe);
+ trace_dump_arg(ptr, fence);
+
+ pipe->fence_server_sync(pipe, fence);
+
+ trace_dump_call_end();
+}
+
+
static inline boolean
trace_context_generate_mipmap(struct pipe_context *_pipe,
struct pipe_resource *res,
@@ -1949,6 +1991,8 @@ trace_context_create(struct trace_screen *tr_scr,
TR_CTX_INIT(clear_depth_stencil);
TR_CTX_INIT(clear_texture);
TR_CTX_INIT(flush);
+ TR_CTX_INIT(create_fence_fd);
+ TR_CTX_INIT(fence_server_sync);
TR_CTX_INIT(generate_mipmap);
TR_CTX_INIT(texture_barrier);
TR_CTX_INIT(memory_barrier);
diff --git a/src/gallium/auxiliary/driver_trace/tr_screen.c b/src/gallium/auxiliary/driver_trace/tr_screen.c
index b5bd3e11c46..e42aef63552 100644
--- a/src/gallium/auxiliary/driver_trace/tr_screen.c
+++ b/src/gallium/auxiliary/driver_trace/tr_screen.c
@@ -495,6 +495,29 @@ trace_screen_fence_reference(struct pipe_screen *_screen,
}
+static int
+trace_screen_fence_get_fd(struct pipe_screen *_screen,
+ struct pipe_fence_handle *fence)
+{
+ struct trace_screen *tr_scr = trace_screen(_screen);
+ struct pipe_screen *screen = tr_scr->screen;
+ int result;
+
+ trace_dump_call_begin("pipe_screen", "fence_get_fd");
+
+ trace_dump_arg(ptr, screen);
+ trace_dump_arg(ptr, fence);
+
+ result = screen->fence_get_fd(screen, fence);
+
+ trace_dump_ret(int, result);
+
+ trace_dump_call_end();
+
+ return result;
+}
+
+
static boolean
trace_screen_fence_finish(struct pipe_screen *_screen,
struct pipe_context *_ctx,
@@ -654,6 +677,7 @@ trace_screen_create(struct pipe_screen *screen)
SCR_INIT(resource_changed);
tr_scr->base.resource_destroy = trace_screen_resource_destroy;
tr_scr->base.fence_reference = trace_screen_fence_reference;
+ SCR_INIT(fence_get_fd);
tr_scr->base.fence_finish = trace_screen_fence_finish;
SCR_INIT(memobj_create_from_handle);
SCR_INIT(memobj_destroy);