summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/r600
diff options
context:
space:
mode:
authorHenri Verbeet <[email protected]>2010-11-15 22:18:12 +0100
committerHenri Verbeet <[email protected]>2010-11-15 22:20:12 +0100
commitda8c8777332239ec05ccd495bedea105b52a8d96 (patch)
tree03cc8c9300b9dd697801f645a4eb83088d12f832 /src/gallium/winsys/r600
parent5da246944a787b933a509f0b65bab466574c3339 (diff)
r600g: Cleanup the fenced_bo list in r600_context_fini().
Diffstat (limited to 'src/gallium/winsys/r600')
-rw-r--r--src/gallium/winsys/r600/drm/r600_hw_context.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/winsys/r600/drm/r600_hw_context.c b/src/gallium/winsys/r600/drm/r600_hw_context.c
index 37e5baf8de8..b2a11251bc6 100644
--- a/src/gallium/winsys/r600/drm/r600_hw_context.c
+++ b/src/gallium/winsys/r600/drm/r600_hw_context.c
@@ -593,6 +593,17 @@ static int r600_loop_const_init(struct r600_context *ctx, u32 offset)
return r600_context_add_block(ctx, r600_loop_consts, nreg);
}
+static void r600_context_clear_fenced_bo(struct r600_context *ctx)
+{
+ struct radeon_bo *bo, *tmp;
+
+ LIST_FOR_EACH_ENTRY_SAFE(bo, tmp, &ctx->fenced_bo, fencedlist) {
+ LIST_DELINIT(&bo->fencedlist);
+ bo->fence = 0;
+ bo->ctx = NULL;
+ }
+}
+
/* initialize */
void r600_context_fini(struct r600_context *ctx)
{
@@ -616,6 +627,8 @@ void r600_context_fini(struct r600_context *ctx)
free(ctx->reloc);
free(ctx->bo);
free(ctx->pm4);
+
+ r600_context_clear_fenced_bo(ctx);
if (ctx->fence_bo) {
r600_bo_reference(ctx->radeon, &ctx->fence_bo, NULL);
}