mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 03:50:13 +01:00
intel: Unobfuscate intel_alloc_renderbuffer_storage
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. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Chad Versace <chad@chad-versace.us>
This commit is contained in:
parent
39d0e3632a
commit
36e05c6870
1 changed files with 16 additions and 16 deletions
|
|
@ -196,26 +196,26 @@ intel_alloc_renderbuffer_storage(struct gl_context * ctx, struct gl_renderbuffer
|
|||
width,
|
||||
height / 2,
|
||||
GL_TRUE);
|
||||
if (!irb->region)
|
||||
return false;
|
||||
|
||||
} else {
|
||||
irb->region = intel_region_alloc(intel->intelScreen, tiling, cpp,
|
||||
width, height, GL_TRUE);
|
||||
}
|
||||
if (!irb->region)
|
||||
return false;
|
||||
|
||||
if (!irb->region)
|
||||
return GL_FALSE; /* out of memory? */
|
||||
|
||||
ASSERT(irb->region->buffer);
|
||||
|
||||
if (intel->vtbl.is_hiz_depth_format(intel, rb->Format)) {
|
||||
irb->hiz_region = intel_region_alloc(intel->intelScreen,
|
||||
I915_TILING_Y,
|
||||
irb->region->cpp,
|
||||
irb->region->width,
|
||||
irb->region->height,
|
||||
GL_TRUE);
|
||||
if (!irb->hiz_region) {
|
||||
intel_region_release(&irb->region);
|
||||
return GL_FALSE;
|
||||
if (intel->vtbl.is_hiz_depth_format(intel, rb->Format)) {
|
||||
irb->hiz_region = intel_region_alloc(intel->intelScreen,
|
||||
I915_TILING_Y,
|
||||
irb->region->cpp,
|
||||
irb->region->width,
|
||||
irb->region->height,
|
||||
GL_TRUE);
|
||||
if (!irb->hiz_region) {
|
||||
intel_region_release(&irb->region);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue