intel: Kill intel_framebuffer_get_hiz_region()
authorChad Versace <chad.versace@linux.intel.com>
Mon, 14 Nov 2011 07:05:47 +0000 (23:05 -0800)
committerChad Versace <chad.versace@linux.intel.com>
Tue, 22 Nov 2011 00:58:32 +0000 (16:58 -0800)
The only user of intel_framebuffer_get_hiz_region() was
intel_framebuffer_has_hiz(). So I folded the body of the former into the
latter.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/dri/intel/intel_fbo.h

index 4cc57fe60be3175eb27a7199e3e976ccf65d26b5..b46700a25090b36930f926ff8cc6ea96bea3ebd6 100644 (file)
@@ -134,27 +134,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 *