diff options
author | Eric Anholt <[email protected]> | 2011-05-12 21:05:30 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2011-05-17 23:48:17 -0700 |
commit | 4e98318fc1722171a07d867a99ab7608ecf758cd (patch) | |
tree | b96aa52eeef320f3b8e93a8d1816bb9c160a64e0 /src | |
parent | 461e193971db4ac456be0d383e9aebf15868542a (diff) |
i965: Instead of fallback on missing region, just bind a null renderbuffer.
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 <[email protected]>
Signed-off-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 8 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/gen7_wm_surface_state.c | 8 |
2 files changed, 4 insertions, 12 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 d34059f0e61..cef0c65e478 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -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; } } diff --git a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c index ff220255311..361db2fead8 100644 --- a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c @@ -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; } } |