mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 00:50:07 +01:00
freedreno: fix context teardown race
We could still have batches queued up to flush, so fd_context_destroy() (which will kill and sync on the flush_queue) before deleting buffers that might be referenced from fdN_gmem() from context of flush_queue. Signed-off-by: Rob Clark <robdclark@gmail.com>
This commit is contained in:
parent
5fab32ddad
commit
e11e9d6394
4 changed files with 8 additions and 8 deletions
|
|
@ -44,6 +44,8 @@ fd3_context_destroy(struct pipe_context *pctx)
|
|||
{
|
||||
struct fd3_context *fd3_ctx = fd3_context(fd_context(pctx));
|
||||
|
||||
fd_context_destroy(pctx);
|
||||
|
||||
fd_bo_del(fd3_ctx->vs_pvt_mem);
|
||||
fd_bo_del(fd3_ctx->fs_pvt_mem);
|
||||
fd_bo_del(fd3_ctx->vsc_size_mem);
|
||||
|
|
@ -54,8 +56,6 @@ fd3_context_destroy(struct pipe_context *pctx)
|
|||
|
||||
fd_hw_query_fini(pctx);
|
||||
|
||||
fd_context_destroy(pctx);
|
||||
|
||||
free(fd3_ctx);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@ fd4_context_destroy(struct pipe_context *pctx)
|
|||
{
|
||||
struct fd4_context *fd4_ctx = fd4_context(fd_context(pctx));
|
||||
|
||||
fd_context_destroy(pctx);
|
||||
|
||||
fd_bo_del(fd4_ctx->vs_pvt_mem);
|
||||
fd_bo_del(fd4_ctx->fs_pvt_mem);
|
||||
fd_bo_del(fd4_ctx->vsc_size_mem);
|
||||
|
|
@ -54,8 +56,6 @@ fd4_context_destroy(struct pipe_context *pctx)
|
|||
|
||||
fd_hw_query_fini(pctx);
|
||||
|
||||
fd_context_destroy(pctx);
|
||||
|
||||
free(fd4_ctx);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@ fd5_context_destroy(struct pipe_context *pctx)
|
|||
{
|
||||
struct fd5_context *fd5_ctx = fd5_context(fd_context(pctx));
|
||||
|
||||
fd_context_destroy(pctx);
|
||||
|
||||
fd_bo_del(fd5_ctx->vs_pvt_mem);
|
||||
fd_bo_del(fd5_ctx->fs_pvt_mem);
|
||||
fd_bo_del(fd5_ctx->vsc_size_mem);
|
||||
|
|
@ -53,8 +55,6 @@ fd5_context_destroy(struct pipe_context *pctx)
|
|||
|
||||
u_upload_destroy(fd5_ctx->border_color_uploader);
|
||||
|
||||
fd_context_destroy(pctx);
|
||||
|
||||
free(fd5_ctx);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,8 @@ fd6_context_destroy(struct pipe_context *pctx)
|
|||
{
|
||||
struct fd6_context *fd6_ctx = fd6_context(fd_context(pctx));
|
||||
|
||||
fd_context_destroy(pctx);
|
||||
|
||||
fd_bo_del(fd6_ctx->vs_pvt_mem);
|
||||
fd_bo_del(fd6_ctx->fs_pvt_mem);
|
||||
fd_bo_del(fd6_ctx->vsc_size_mem);
|
||||
|
|
@ -52,8 +54,6 @@ fd6_context_destroy(struct pipe_context *pctx)
|
|||
|
||||
u_upload_destroy(fd6_ctx->border_color_uploader);
|
||||
|
||||
fd_context_destroy(pctx);
|
||||
|
||||
free(fd6_ctx);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue