diff options
author | Kenneth Graunke <[email protected]> | 2013-10-15 16:09:22 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2013-10-17 14:27:03 -0700 |
commit | 7601ba649f1d5541e8d77a10701616521b3cd37a (patch) | |
tree | 2f07577b1dd6ff5880180e64a37d621d13938510 /src/mesa/drivers/dri/i965/brw_vtbl.c | |
parent | 5f76bc37abe39bad8ad99a51864f8beda0f6d3d7 (diff) |
i965: Replace dri_bo_release with drm_intel_bo_unreference.
dri_bo_release is a helper function that calls drm_intel_bo_unreference
but then also sets the pointer to NULL. This is unnecessary, since
brw_destroy_context is called from intelDestroyContext, which also frees
brw completely.
If you're still trying to access them, you've got bigger problems.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vtbl.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vtbl.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vtbl.c b/src/mesa/drivers/dri/i965/brw_vtbl.c index d78af8b3496..7f34083c2d9 100644 --- a/src/mesa/drivers/dri/i965/brw_vtbl.c +++ b/src/mesa/drivers/dri/i965/brw_vtbl.c @@ -55,14 +55,6 @@ #include "glsl/ralloc.h" -static void -dri_bo_release(drm_intel_bo **bo) -{ - drm_intel_bo_unreference(*bo); - *bo = NULL; -} - - /** * called from intelDestroyContext() */ @@ -80,9 +72,9 @@ brw_destroy_context(struct brw_context *brw) brw_destroy_state(brw); brw_draw_destroy( brw ); - dri_bo_release(&brw->curbe.curbe_bo); - dri_bo_release(&brw->vs.base.const_bo); - dri_bo_release(&brw->wm.base.const_bo); + drm_intel_bo_unreference(brw->curbe.curbe_bo); + drm_intel_bo_unreference(brw->vs.base.const_bo); + drm_intel_bo_unreference(brw->wm.base.const_bo); free(brw->curbe.last_buf); free(brw->curbe.next_buf); |