From: Chia-I Wu Date: Tue, 4 Jun 2013 05:25:38 +0000 (+0800) Subject: ilo: unmap cp bo before destroying it X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7cbf0a410e565b6a02c4b45f73364d3537780105;p=mesa.git ilo: unmap cp bo before destroying it The BOs are mapped in their entire life times for the chipsets we support so do not forget to unmap it. --- diff --git a/src/gallium/drivers/ilo/ilo_cp.c b/src/gallium/drivers/ilo/ilo_cp.c index 1fd47410bcd..b29a014591c 100644 --- a/src/gallium/drivers/ilo/ilo_cp.c +++ b/src/gallium/drivers/ilo/ilo_cp.c @@ -256,8 +256,13 @@ ilo_cp_flush(struct ilo_cp *cp) void ilo_cp_destroy(struct ilo_cp *cp) { - if (cp->bo) + if (cp->bo) { + if (!cp->sys) + cp->bo->unmap(cp->bo); + cp->bo->unreference(cp->bo); + } + if (cp->render_ctx) cp->winsys->destroy_context(cp->winsys, cp->render_ctx);