summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ddebug
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-08-06 16:41:42 +0200
committerMarek Olšák <[email protected]>2016-08-10 01:11:10 +0200
commit54272e18a682c8b82d4a86b2c07b51c303d8cead (patch)
treec9c0ac7ad2fb4144ebeb9c7851eaa19a8103973c /src/gallium/drivers/ddebug
parentc6043e7d54fc48771856a50235f9141b711151f3 (diff)
gallium: add a pipe_context parameter to fence_finish
required by glClientWaitSync (GL 4.5 Core spec) that can optionally flush the context Reviewed-by: Rob Clark <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/ddebug')
-rw-r--r--src/gallium/drivers/ddebug/dd_draw.c2
-rw-r--r--src/gallium/drivers/ddebug/dd_screen.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/ddebug/dd_draw.c b/src/gallium/drivers/ddebug/dd_draw.c
index 7abcf877a3b..3124d0552d0 100644
--- a/src/gallium/drivers/ddebug/dd_draw.c
+++ b/src/gallium/drivers/ddebug/dd_draw.c
@@ -548,7 +548,7 @@ dd_flush_and_check_hang(struct dd_context *dctx,
if (!fence)
return false;
- idle = screen->fence_finish(screen, fence, timeout_ms * 1000000);
+ idle = screen->fence_finish(screen, NULL, fence, timeout_ms * 1000000);
screen->fence_reference(screen, &fence, NULL);
if (!idle)
fprintf(stderr, "dd: GPU hang detected!\n");
diff --git a/src/gallium/drivers/ddebug/dd_screen.c b/src/gallium/drivers/ddebug/dd_screen.c
index 412ea365ce2..3deba0a6e27 100644
--- a/src/gallium/drivers/ddebug/dd_screen.c
+++ b/src/gallium/drivers/ddebug/dd_screen.c
@@ -263,12 +263,14 @@ dd_screen_fence_reference(struct pipe_screen *_screen,
static boolean
dd_screen_fence_finish(struct pipe_screen *_screen,
+ struct pipe_context *_ctx,
struct pipe_fence_handle *fence,
uint64_t timeout)
{
struct pipe_screen *screen = dd_screen(_screen)->screen;
+ struct pipe_context *ctx = _ctx ? dd_context(_ctx)->pipe : NULL;
- return screen->fence_finish(screen, fence, timeout);
+ return screen->fence_finish(screen, ctx, fence, timeout);
}