intel: Protect against waiting on a NULL render target bo
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 24 Feb 2011 10:12:37 +0000 (10:12 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 24 Feb 2011 10:12:37 +0000 (10:12 +0000)
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@gmx.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34656
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
src/mesa/drivers/dri/intel/intel_context.c

index d22fa27aaa6f43f6658755f6e4106238285754cd..c2e2a98af5e26db8e6b7df4bf06725271293f706 100644 (file)
@@ -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) {