Mesa (master): intel: Protect against waiting on a NULL render target bo

Chris Wilson ickle at kemper.freedesktop.org
Thu Feb 24 10:14:56 UTC 2011


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

Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Feb 24 10:12:37 2011 +0000

intel: Protect against waiting on a NULL render target bo

If we fall back to software rendering due to the render target being
absent (GPU hang or other error in creating the named target), then we
do not need to nor should we wait upon the results.

Reported-by: Magnus Kessler <Magnus.Kessler at gmx.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34656
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

---

 src/mesa/drivers/dri/intel/intel_context.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index d22fa27..c2e2a98 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -581,7 +581,7 @@ intelFinish(struct gl_context * ctx)
 
        irb = intel_renderbuffer(fb->_ColorDrawBuffers[i]);
 
-       if (irb && irb->region)
+       if (irb && irb->region && irb->region->buffer)
 	  drm_intel_bo_wait_rendering(irb->region->buffer);
    }
    if (fb->_DepthBuffer) {




More information about the mesa-commit mailing list