[Mesa-dev] [PATCH 3/5] intel: Kill intel_framebuffer_get_hiz_region()

Chad Versace chad at chad-versace.us
Thu Oct 27 18:55:49 PDT 2011


The only client of intel_framebuffer_get_hiz_region() was
intel_framebuffer_has_hiz(). So I folded the body of the former into the
latter.

Signed-off-by: Chad Versace <chad at chad-versace.us>
---
 src/mesa/drivers/dri/intel/intel_fbo.h |   20 +++-----------------
 1 files changed, 3 insertions(+), 17 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_fbo.h b/src/mesa/drivers/dri/intel/intel_fbo.h
index e12d0fd..7e2f490 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.h
+++ b/src/mesa/drivers/dri/intel/intel_fbo.h
@@ -131,27 +131,13 @@ intel_get_renderbuffer(struct gl_framebuffer *fb, gl_buffer_index attIndex)
    return irb;
 }
 
-/**
- * If the framebuffer has a depth buffer attached, then return its HiZ region.
- * The HiZ region may be null.
- */
-static INLINE struct intel_region*
-intel_framebuffer_get_hiz_region(struct gl_framebuffer *fb)
+static inline bool
+intel_framebuffer_has_hiz(struct gl_framebuffer *fb)
 {
    struct intel_renderbuffer *rb = NULL;
    if (fb)
       rb = intel_get_renderbuffer(fb, BUFFER_DEPTH);
-
-   if (rb)
-      return rb->hiz_region;
-   else
-      return NULL;
-}
-
-static INLINE bool
-intel_framebuffer_has_hiz(struct gl_framebuffer *fb)
-{
-   return intel_framebuffer_get_hiz_region(fb) != NULL;
+   return rb && rb->hiz_region;
 }
 
 extern struct intel_renderbuffer *
-- 
1.7.6.4



More information about the mesa-dev mailing list