aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2009-04-24 16:39:00 -0700
committerIan Romanick <[email protected]>2009-04-24 16:39:00 -0700
commit022319b92ccd2f3bfc4aca54ebc7e39aeddd8b21 (patch)
tree81187271a5de66bef3b9026888b6e28fadabcc43 /src/mesa
parent302ba83116a24dbcd09a5f8d10edaaf862127873 (diff)
intel: Fix more issues with the combined depth-stencil attachment
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.c19
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 84460327426..eb224a8a413 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(&region);
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);
+ }
}
}