summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_context.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2015-08-16 19:18:22 -0400
committerRob Clark <[email protected]>2015-08-18 15:36:30 -0400
commitfd7a14f8ddeae5fc868a8d452445d708505cc930 (patch)
tree5bb81c14f246549229687af3f459ec82d5ee14f9 /src/gallium/drivers/freedreno/freedreno_context.c
parent885762e18291eb4dc0b449297c3a78f7c036bcde (diff)
freedreno: fence fix
Don't take current timestamp/fence from current ring, as we might have already rolled over to new rb. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_context.c')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_context.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_context.c b/src/gallium/drivers/freedreno/freedreno_context.c
index 8e6d43150ce..0b6b9fbbe7a 100644
--- a/src/gallium/drivers/freedreno/freedreno_context.c
+++ b/src/gallium/drivers/freedreno/freedreno_context.c
@@ -131,11 +131,13 @@ static void
fd_context_flush(struct pipe_context *pctx, struct pipe_fence_handle **fence,
unsigned flags)
{
+ struct fd_ringbuffer *ring = fd_context(pctx)->ring;
+
fd_context_render(pctx);
if (fence) {
fd_screen_fence_ref(pctx->screen, fence, NULL);
- *fence = fd_fence_create(pctx);
+ *fence = fd_fence_create(pctx, fd_ringbuffer_timestamp(ring));
}
}