i965: Instead of fallback on missing region, just bind a null renderbuffer.
authorEric Anholt <eric@anholt.net>
Fri, 13 May 2011 04:05:30 +0000 (21:05 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 18 May 2011 06:48:17 +0000 (23:48 -0700)
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.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_wm_surface_state.c
src/mesa/drivers/dri/i965/gen7_wm_surface_state.c

index d34059f0e61bf74080845f94c6ee71c08c5b8c39..cef0c65e478d9102422676e55f2b83fa1301036c 100644 (file)
@@ -562,12 +562,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;
       }
    }
index ff22025531115cd331d2fc32bb1ab91291fb6686..361db2fead8d78d465d178a472dc533b88eb8a80 100644 (file)
@@ -329,12 +329,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;
       }
    }