i965: Don't leak scratch BOs for TCS/TES.
authorKenneth Graunke <kenneth@whitecape.org>
Sun, 12 Jun 2016 22:44:55 +0000 (15:44 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 13 Jun 2016 19:22:06 +0000 (12:22 -0700)
These need to be freed too.

Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_context.c

index 7bbc128d9a4e97fd76e3c663f053f0fe8d6cf119..a5c658196f1dacfaaebb16869291a8a7536106ef 100644 (file)
@@ -1100,6 +1100,10 @@ intelDestroyContext(__DRIcontext * driContextPriv)
    drm_intel_bo_unreference(brw->curbe.curbe_bo);
    if (brw->vs.base.scratch_bo)
       drm_intel_bo_unreference(brw->vs.base.scratch_bo);
+   if (brw->tcs.base.scratch_bo)
+      drm_intel_bo_unreference(brw->tcs.base.scratch_bo);
+   if (brw->tes.base.scratch_bo)
+      drm_intel_bo_unreference(brw->tes.base.scratch_bo);
    if (brw->gs.base.scratch_bo)
       drm_intel_bo_unreference(brw->gs.base.scratch_bo);
    if (brw->wm.base.scratch_bo)