[Mesa-dev] [PATCH 09/19] intel: Move definition of intel_framebuffer_get_hiz_region from .h to .c

Chad Versace chad at chad-versace.us
Fri Sep 23 17:37:39 PDT 2011


This eliminates the need for intel_fbo.h to include intel_regions.h on the
next commit. And this function was too large to be inline, anyway.

Signed-off-by: Chad Versace <chad at chad-versace.us>
---
 src/mesa/drivers/dri/intel/intel_fbo.c |   12 ++++++++++++
 src/mesa/drivers/dri/intel/intel_fbo.h |   14 ++------------
 2 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index 418e426..0828af4 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -97,6 +97,18 @@ intel_get_pointer(struct gl_context * ctx, struct gl_renderbuffer *rb,
    return NULL;
 }
 
+struct intel_region*
+intel_framebuffer_get_hiz_region(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;
+}
 
 /**
  * Called via glRenderbufferStorageEXT() to set the format and allocate
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.h b/src/mesa/drivers/dri/intel/intel_fbo.h
index e12d0fd..459cba6 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.h
+++ b/src/mesa/drivers/dri/intel/intel_fbo.h
@@ -135,18 +135,8 @@ intel_get_renderbuffer(struct gl_framebuffer *fb, gl_buffer_index attIndex)
  * 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)
-{
-   struct intel_renderbuffer *rb = NULL;
-   if (fb)
-      rb = intel_get_renderbuffer(fb, BUFFER_DEPTH);
-
-   if (rb)
-      return rb->hiz_region;
-   else
-      return NULL;
-}
+struct intel_region*
+intel_framebuffer_get_hiz_region(struct gl_framebuffer *fb);
 
 static INLINE bool
 intel_framebuffer_has_hiz(struct gl_framebuffer *fb)
-- 
1.7.6.2



More information about the mesa-dev mailing list