diff options
author | Bruce Cherniak <[email protected]> | 2016-12-12 19:24:59 -0600 |
---|---|---|
committer | Tim Rowley <[email protected]> | 2016-12-16 11:29:02 -0600 |
commit | 79b66ec05e2745e5d19838dcfd83f905afa82b6c (patch) | |
tree | 5893ed8d0e3dc45248e2a4b14be64f91ec33b753 /src/gallium/drivers/swr/swr_context.cpp | |
parent | 3421b3f5a35f5cf29934f74c30850c4d04ba0237 (diff) |
swr: Implement fence attached work queues for deferred deletion.
Work can now be added to fences and triggered by fence completion. This
allows for deferred resource deletion, and other asynchronous tasks.
Reviewed-by: George Kyriazis <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/swr_context.cpp')
-rw-r--r-- | src/gallium/drivers/swr/swr_context.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/swr/swr_context.cpp b/src/gallium/drivers/swr/swr_context.cpp index b8c87faef73..89330857ae0 100644 --- a/src/gallium/drivers/swr/swr_context.cpp +++ b/src/gallium/drivers/swr/swr_context.cpp @@ -355,9 +355,6 @@ swr_destroy(struct pipe_context *pipe) if (ctx->blitter) util_blitter_destroy(ctx->blitter); - /* Idle core before deleting context */ - SwrWaitForIdle(ctx->swrContext); - for (unsigned i = 0; i < PIPE_MAX_COLOR_BUFS; i++) { pipe_surface_reference(&ctx->framebuffer.cbufs[i], NULL); } @@ -372,6 +369,10 @@ swr_destroy(struct pipe_context *pipe) pipe_sampler_view_reference(&ctx->sampler_views[PIPE_SHADER_VERTEX][i], NULL); } + /* Idle core after destroying buffer resources, but before deleting + * context. Destroying resources has potentially called StoreTiles.*/ + SwrWaitForIdle(ctx->swrContext); + if (ctx->swrContext) SwrDestroyContext(ctx->swrContext); |