st/mesa: Make st_cb_accum.h FEATURE_accum aware.
authorChia-I Wu <olv@lunarg.com>
Wed, 31 Mar 2010 03:43:49 +0000 (11:43 +0800)
committerChia-I Wu <olv@lunarg.com>
Wed, 12 May 2010 04:12:57 +0000 (12:12 +0800)
This change allows st_cb_accum.h to be used without knowing if
FEATURE_accum is enabled.

src/mesa/state_tracker/st_cb_accum.c
src/mesa/state_tracker/st_cb_accum.h
src/mesa/state_tracker/st_context.c

index ded0ba9c6a7530b93458b947c6a66246d0822a4c..425e7987d33e410032cada99a622bac1773455ee 100644 (file)
@@ -45,6 +45,8 @@
 #include "util/u_tile.h"
 
 
+#if FEATURE_accum
+
 /**
  * For hardware that supports deep color buffers, we could accelerate
  * most/all the accum operations with blending/texturing.
@@ -333,3 +335,5 @@ void st_init_accum_functions(struct dd_function_table *functions)
 {
    functions->Accum = st_Accum;
 }
+
+#endif /* FEATURE_accum */
index ed9b7dab9432d5309eb6e5d74159055ff56f7560..7d52481c82e7cf268eaf87d2ef828fae6e4c2ff0 100644 (file)
 #define ST_CB_ACCUM_H
 
 
+#include "main/mtypes.h"
+
+#if FEATURE_accum
+
 extern void
 st_clear_accum_buffer(GLcontext *ctx, struct gl_renderbuffer *rb);
 
 extern void st_init_accum_functions(struct dd_function_table *functions);
 
+#else
+
+static INLINE void
+st_clear_accum_buffer(GLcontext *ctx, struct gl_renderbuffer *rb)
+{
+   ASSERT_NO_FEATURE();
+}
+
+static INLINE void
+st_init_accum_functions(struct dd_function_table *functions)
+{
+}
+
+#endif /* FEATURE_accum */
 
 #endif /* ST_CB_ACCUM_H */
index 806f8777f2d1f63e69cbcca227706840b2c753bf..24360fa8bc7a03c7a52a9d815dbc2f9871231116 100644 (file)
@@ -302,9 +302,7 @@ void st_init_driver_functions(struct dd_function_table *functions)
 {
    _mesa_init_glsl_driver_functions(functions);
 
-#if FEATURE_accum
    st_init_accum_functions(functions);
-#endif
 #if FEATURE_EXT_framebuffer_blit
    st_init_blit_functions(functions);
 #endif