aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/intel/intel_fbo.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-12-08 08:33:28 -0800
committerEric Anholt <[email protected]>2011-12-19 13:20:11 -0800
commit0c498467104e361e50bbb95adf2b2c0e799591dc (patch)
tree3d97682567af9be610ba2f3a48c9f0a30696f29f /src/mesa/drivers/dri/intel/intel_fbo.c
parentfdf18b323156098ba5fb2881aa1a7888d2e0667f (diff)
intel: Stop creating the wrapped depth irb.
All the operations were just trying to get at irb->wrapped_depth->mt, which is the same as irb->mt now. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_fbo.c')
-rw-r--r--src/mesa/drivers/dri/intel/intel_fbo.c92
1 files changed, 7 insertions, 85 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index 17118036128..c60b57ed404 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -113,8 +113,6 @@ intel_delete_renderbuffer(struct gl_renderbuffer *rb)
intel_miptree_release(&irb->mt);
- _mesa_reference_renderbuffer(&irb->wrapped_depth, NULL);
-
free(irb);
}
@@ -260,34 +258,6 @@ intel_alloc_renderbuffer_storage(struct gl_context * ctx, struct gl_renderbuffer
}
}
- if (irb->mt->stencil_mt) {
- bool ok;
- struct intel_renderbuffer *depth_irb;
-
- /* The RB got allocated as separate stencil. Hook up our wrapped
- * renderbuffer so that consumers of intel_get_renderbuffer(BUFFER_DEPTH)
- * end up with pointers to the separate depth.
- */
- if (!irb->wrapped_depth) {
- _mesa_reference_renderbuffer(&irb->wrapped_depth,
- intel_new_renderbuffer(ctx, ~0));
- }
-
- depth_irb = intel_renderbuffer(irb->wrapped_depth);
- if (!depth_irb) {
- intel_miptree_release(&irb->mt);
- return false;
- }
-
- assert(irb->mt->format == MESA_FORMAT_S8_Z24 ||
- irb->mt->format == MESA_FORMAT_X8_Z24);
- ok = intel_renderbuffer_update_wrapper(intel, depth_irb, irb->mt,
- 0, 0, /* level, layer */
- MESA_FORMAT_X8_Z24,
- GL_DEPTH_COMPONENT24);
- assert(ok);
- }
-
return true;
}
@@ -533,45 +503,14 @@ intel_renderbuffer_update_wrapper(struct intel_context *intel,
irb->mt_layer = layer;
intel_miptree_reference(&irb->mt, mt);
- if (mt->stencil_mt && _mesa_is_depthstencil_format(rb->InternalFormat)) {
- struct intel_renderbuffer *depth_irb;
-
- if (!irb->wrapped_depth) {
- depth_irb = intel_renderbuffer_wrap_miptree(intel,
- mt, level, layer,
- MESA_FORMAT_X8_Z24,
- GL_DEPTH_COMPONENT24);
- _mesa_reference_renderbuffer(&irb->wrapped_depth, &depth_irb->Base);
-
- if (!irb->wrapped_depth) {
- intel_miptree_release(&irb->mt);
- return false;
- }
- } else {
- bool ok = true;
-
- depth_irb = intel_renderbuffer(irb->wrapped_depth);
-
- ok &= intel_renderbuffer_update_wrapper(intel,
- depth_irb,
- mt,
- level, layer,
- MESA_FORMAT_X8_Z24,
- GL_DEPTH_COMPONENT24);
- if (!ok) {
- intel_miptree_release(&irb->mt);
- return false;
- }
- }
- } else {
- intel_renderbuffer_set_draw_offset(irb);
- if (mt->hiz_mt == NULL &&
- intel->vtbl.is_hiz_depth_format(intel, rb->Format)) {
- intel_miptree_alloc_hiz(intel, mt);
- if (!mt->hiz_mt)
- return false;
- }
+ intel_renderbuffer_set_draw_offset(irb);
+
+ if (mt->hiz_mt == NULL &&
+ intel->vtbl.is_hiz_depth_format(intel, rb->Format)) {
+ intel_miptree_alloc_hiz(intel, mt);
+ if (!mt->hiz_mt)
+ return false;
}
return true;
@@ -982,11 +921,6 @@ intel_renderbuffer_set_needs_hiz_resolve(struct intel_renderbuffer *irb)
intel_miptree_slice_set_needs_hiz_resolve(irb->mt,
irb->mt_level,
irb->mt_layer);
- } else if (irb->wrapped_depth) {
- intel_renderbuffer_set_needs_hiz_resolve(
- intel_renderbuffer(irb->wrapped_depth));
- } else {
- return;
}
}
@@ -997,11 +931,6 @@ intel_renderbuffer_set_needs_depth_resolve(struct intel_renderbuffer *irb)
intel_miptree_slice_set_needs_depth_resolve(irb->mt,
irb->mt_level,
irb->mt_layer);
- } else if (irb->wrapped_depth) {
- intel_renderbuffer_set_needs_depth_resolve(
- intel_renderbuffer(irb->wrapped_depth));
- } else {
- return;
}
}
@@ -1014,9 +943,6 @@ intel_renderbuffer_resolve_hiz(struct intel_context *intel,
irb->mt,
irb->mt_level,
irb->mt_layer);
- if (irb->wrapped_depth)
- return intel_renderbuffer_resolve_hiz(intel,
- intel_renderbuffer(irb->wrapped_depth));
return false;
}
@@ -1031,10 +957,6 @@ intel_renderbuffer_resolve_depth(struct intel_context *intel,
irb->mt_level,
irb->mt_layer);
- if (irb->wrapped_depth)
- return intel_renderbuffer_resolve_depth(intel,
- intel_renderbuffer(irb->wrapped_depth));
-
return false;
}