diff options
author | Rob Clark <[email protected]> | 2015-07-08 14:51:46 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2015-07-10 11:57:30 -0400 |
commit | ab3ba21f979605b90b2fb44482138732b42514b0 (patch) | |
tree | 0da36706959518da0ec22ac934b039cd43775256 /src | |
parent | 749dced4b363963b2230a18b0776fa92653116b8 (diff) |
vc4: unref old fence
Some, but not all, state trackers will explicitly unref (and set to
NULL) the previous *fence before calling pipe->flush(). So driver
should use fence_ref() which will unref the old fence if not NULL.
Signed-off-by: Rob Clark <[email protected]>
Acked-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_context.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_context.c b/src/gallium/drivers/vc4/vc4_context.c index 630f8e68896..316598f0a9d 100644 --- a/src/gallium/drivers/vc4/vc4_context.c +++ b/src/gallium/drivers/vc4/vc4_context.c @@ -103,8 +103,10 @@ vc4_pipe_flush(struct pipe_context *pctx, struct pipe_fence_handle **fence, vc4_flush(pctx); if (fence) { + struct pipe_screen *screen = pctx->screen; struct vc4_fence *f = vc4_fence_create(vc4->screen, vc4->last_emit_seqno); + screen->fence_reference(screen, fence, NULL); *fence = (struct pipe_fence_handle *)f; } } |