diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2009-04-24 16:39:00 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2009-04-24 16:39:00 -0700 |
commit | 022319b92ccd2f3bfc4aca54ebc7e39aeddd8b21 (patch) | |
tree | 81187271a5de66bef3b9026888b6e28fadabcc43 /src/mesa/drivers | |
parent | 302ba83116a24dbcd09a5f8d10edaaf862127873 (diff) |
intel: Fix more issues with the combined depth-stencil attachment
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_context.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c index 8446032742..eb224a8a41 100644 --- a/src/mesa/drivers/dri/intel/intel_context.c +++ b/src/mesa/drivers/dri/intel/intel_context.c @@ -361,13 +361,20 @@ intel_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable) intel_region_release(®ion); if (buffers[i].attachment == __DRI_BUFFER_DEPTH_STENCIL) { - struct intel_region *stencil_region = NULL; - - intel_region_reference(&stencil_region, region); - rb = intel_get_renderbuffer(&intel_fb->Base, BUFFER_STENCIL); - intel_renderbuffer_set_region(rb, stencil_region); - intel_region_release(&stencil_region); + if (rb != NULL) { + struct intel_region *stencil_region = NULL; + + if (rb->region) { + dri_bo_flink(rb->region->buffer, &name); + if (name == buffers[i].name) + continue; + } + + intel_region_reference(&stencil_region, region); + intel_renderbuffer_set_region(rb, stencil_region); + intel_region_release(&stencil_region); + } } } |