Mesa (10.6): i965: Remove early release of DRI2 miptree

Emil Velikov evelikov at kemper.freedesktop.org
Thu Oct 1 09:28:57 UTC 2015


Module: Mesa
Branch: 10.6
Commit: a1a567c125d826ab1b029615782111dcfa1dfe57
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a1a567c125d826ab1b029615782111dcfa1dfe57

Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Aug  7 21:13:12 2015 +0100

i965: Remove early release of DRI2 miptree

intel_update_winsys_renderbuffer_miptree() will release the existing
miptree when wrapping a new DRI2 buffer, so we can remove the early
release and so prevent a NULL mt dereference should importing the new
DRI2 name fail for any reason. (Reusing the old DRI2 name will result
in the rendering going astray, to a stale buffer, and not shown on the
screen, but it allows us to issue a warning and not crash much later in
innocent code.)

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86281
Reviewed-by: Martin Peres <martin.peres at linux.intel.com>
Reviewed-by: Chad Versace <chad.versace at intel.com>
(cherry picked from commit 70e91d61fde239e8ae58148cacd4ff891126e2aa)
Nominated-by: Emil Velikov <emil.velikov at collabora.com>

---

 src/mesa/drivers/dri/i965/brw_context.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 781a634..cf02c83 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -1413,7 +1413,6 @@ intel_process_dri2_buffer(struct brw_context *brw,
               buffer->cpp, buffer->pitch);
    }
 
-   intel_miptree_release(&rb->mt);
    bo = drm_intel_bo_gem_create_from_name(brw->bufmgr, buffer_name,
                                           buffer->name);
    if (!bo) {




More information about the mesa-commit mailing list