summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2017-10-27 12:50:50 +0300
committerTapani Pälli <[email protected]>2017-10-27 13:48:56 +0300
commiteeb3515c3f6ae0eac891559b2f7f8af0659ce5eb (patch)
tree8870a6a7934bc01e0382c468525490adb79b1b1a
parent70cd05d6ac533977f96aa832bbb2886172019f35 (diff)
i965: remove if conditions from scratch_bo unref
brw_bo_unreference handles NULL case Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index c8de0746387..39b2a938f60 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -1061,16 +1061,12 @@ intelDestroyContext(__DRIcontext * driContextPriv)
brw_draw_destroy(brw);
brw_bo_unreference(brw->curbe.curbe_bo);
- if (brw->vs.base.scratch_bo)
- brw_bo_unreference(brw->vs.base.scratch_bo);
- if (brw->tcs.base.scratch_bo)
- brw_bo_unreference(brw->tcs.base.scratch_bo);
- if (brw->tes.base.scratch_bo)
- brw_bo_unreference(brw->tes.base.scratch_bo);
- if (brw->gs.base.scratch_bo)
- brw_bo_unreference(brw->gs.base.scratch_bo);
- if (brw->wm.base.scratch_bo)
- brw_bo_unreference(brw->wm.base.scratch_bo);
+
+ brw_bo_unreference(brw->vs.base.scratch_bo);
+ brw_bo_unreference(brw->tcs.base.scratch_bo);
+ brw_bo_unreference(brw->tes.base.scratch_bo);
+ brw_bo_unreference(brw->gs.base.scratch_bo);
+ brw_bo_unreference(brw->wm.base.scratch_bo);
brw_destroy_hw_context(brw->bufmgr, brw->hw_ctx);