intel: Move inline functions from intel_fbo.h to .c
authorChad Versace <chad.versace@linux.intel.com>
Mon, 14 Nov 2011 07:06:17 +0000 (23:06 -0800)
committerChad Versace <chad.versace@linux.intel.com>
Tue, 22 Nov 2011 00:58:33 +0000 (16:58 -0800)
Move the following inline functions:
    intel_get_rb_region
    intel_framebuffer_has_hiz

A future commit will replace the renderbuffer's region with a miptree.
This small refactor will eliminate the need for intel_fbo.h to include
intel_mipmap_tree.h on that commit. I'd like to avoid the situation where
each header transitively includes every other header.

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.c
src/mesa/drivers/dri/intel/intel_fbo.h

index 16b49ae311d60302ac46ce829425037f90cc491e..429529c81c497dfb77f81cd1d92ba6d63716505c 100644 (file)
 #define FILE_DEBUG_FLAG DEBUG_FBO
 
 
+bool
+intel_framebuffer_has_hiz(struct gl_framebuffer *fb)
+{
+   struct intel_renderbuffer *rb = NULL;
+   if (fb)
+      rb = intel_get_renderbuffer(fb, BUFFER_DEPTH);
+   return rb && rb->hiz_region;
+}
+
+struct intel_region*
+intel_get_rb_region(struct gl_framebuffer *fb, GLuint attIndex)
+{
+   struct intel_renderbuffer *irb = intel_get_renderbuffer(fb, attIndex);
+   if (irb)
+      return irb->region;
+   else
+      return NULL;
+}
+
 /**
  * Create a new framebuffer object.
  */
index b46700a25090b36930f926ff8cc6ea96bea3ebd6..63da6659296a489686537c52ef9e54155d4e1f6c 100644 (file)
@@ -134,14 +134,8 @@ intel_get_renderbuffer(struct gl_framebuffer *fb, gl_buffer_index attIndex)
    return irb;
 }
 
-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);
-   return rb && rb->hiz_region;
-}
+bool
+intel_framebuffer_has_hiz(struct gl_framebuffer *fb);
 
 extern struct intel_renderbuffer *
 intel_create_renderbuffer(gl_format format);
@@ -174,14 +168,7 @@ intel_renderbuffer_tile_offsets(struct intel_renderbuffer *irb,
                                uint32_t *tile_x,
                                uint32_t *tile_y);
 
-static INLINE struct intel_region *
-intel_get_rb_region(struct gl_framebuffer *fb, GLuint attIndex)
-{
-   struct intel_renderbuffer *irb = intel_get_renderbuffer(fb, attIndex);
-   if (irb)
-      return irb->region;
-   else
-      return NULL;
-}
+struct intel_region*
+intel_get_rb_region(struct gl_framebuffer *fb, GLuint attIndex);
 
 #endif /* INTEL_FBO_H */