[Mesa-dev] [PATCH 6/7] intel: Unobfuscate intel_alloc_renderbuffer_storage
Chad Versace
chad at chad-versace.us
Wed Jun 15 17:34:43 PDT 2011
Hiz buffer allocation can only occur if the 'else' branch has been taken,
so move the hiz buffer allocation into the 'else' branch.
Having the hiz buffer allocation dangling outside of the if-tree was just
damn confusing.
Signed-off-by: Chad Versace <chad at chad-versace.us>
---
src/mesa/drivers/dri/intel/intel_fbo.c | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index 76c84a8..50ca131 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -203,21 +203,21 @@ intel_alloc_renderbuffer_storage(struct gl_context * ctx, struct gl_renderbuffer
return false;
}
intel_region_reference(&irb->region, region);
- }
- if (intel->vtbl.is_hiz_depth_format(intel, rb->Format)) {
- struct intel_region *hiz_region =
- intel_region_alloc(intel->intelScreen,
- I915_TILING_Y,
- irb->region->cpp,
- irb->region->width,
- irb->region->height,
- true);
- if (!hiz_region) {
- intel_region_release(&irb->region);
- return false;
+ if (intel->vtbl.is_hiz_depth_format(intel, rb->Format)) {
+ struct intel_region *hiz_region =
+ intel_region_alloc(intel->intelScreen,
+ I915_TILING_Y,
+ irb->region->cpp,
+ irb->region->width,
+ irb->region->height,
+ true);
+ if (!hiz_region) {
+ intel_region_release(&irb->region);
+ return false;
+ }
+ intel_region_reference(&irb->hiz_region, hiz_region);
}
- intel_region_reference(&irb->hiz_region, hiz_region);
}
rb->Width = width;
--
1.7.5.2
More information about the mesa-dev
mailing list