[Mesa-dev] [PATCH 11/11] i965: Instead of fallback on missing region, just bind a null renderbuffer.

Eric Anholt eric at anholt.net
Thu May 12 21:05:30 PDT 2011


The change for GPU hanging in 13bab58f04c1ec6d0d52760eab490a0997d9abe2
fell back even when rb == NULL, which is wrong for GLES2 and caused
segfaulting in GLES2 conformance.  For the GPU hang case (where the
broken 2D driver failed to allocate a BO for the window system
renderbuffer), it also would assertion fail/segfault immediately after
the fallback setup when the renderbuffer map failed.

Fixes GLES2 conformance packed_depth_stencil.
---
 src/mesa/drivers/dri/i965/brw_wm_surface_state.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index 47b8b51..9b2072a 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -554,12 +554,8 @@ prepare_wm_surfaces(struct brw_context *brw)
 	 struct intel_renderbuffer *irb = intel_renderbuffer(rb);
 	 struct intel_region *region = irb ? irb->region : NULL;
 
-	 if (region == NULL || region->buffer == NULL) {
-	    brw->intel.Fallback = GL_TRUE; /* boolean, not bitfield */
-	    return;
-	 }
-
-	 brw_add_validated_bo(brw, region->buffer);
+	 if (region)
+	    brw_add_validated_bo(brw, region->buffer);
 	 nr_surfaces = SURF_INDEX_DRAW(i) + 1;
       }
    }
-- 
1.7.5.1



More information about the mesa-dev mailing list