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

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

index af60db886967046e29c500fb19f8d8139b24a403..a8bd5db630431bcb945cfb0be5aa0aa19ee3ddc4 100644 (file)
@@ -43,6 +43,8 @@
 #include "st_cb_queryobj.h"
 
 
+#if FEATURE_queryobj
+
 static struct gl_query_object *
 st_NewQueryObject(GLcontext *ctx, GLuint id)
 {
@@ -168,3 +170,5 @@ void st_init_query_functions(struct dd_function_table *functions)
    functions->WaitQuery = st_WaitQuery;
    functions->CheckQuery = st_CheckQuery;
 }
+
+#endif /* FEATURE_queryobj */
index b8b578159d202527852468c25a78fa0ed382fe36..017471b0b0655651ae9affc0a213db3355e85a14 100644 (file)
@@ -29,6 +29,8 @@
 #define ST_CB_QUERYOBJ_H
 
 
+#include "main/mtypes.h"
+
 /**
  * Subclass of gl_query_object
  */
@@ -50,9 +52,18 @@ st_query_object(struct gl_query_object *q)
 }
 
 
+#if FEATURE_queryobj
 
 extern void
 st_init_query_functions(struct dd_function_table *functions);
 
+#else
+
+static INLINE void
+st_init_query_functions(struct dd_function_table *functions)
+{
+}
+
+#endif /* FEATURE_queryobj */
 
 #endif
index 5c9462a399bcbe6a5ef2f9d1f99d88a08b69b162..f3b436fecdf8af9e342a4d3417c811299e089fcb 100644 (file)
@@ -299,9 +299,7 @@ void st_init_driver_functions(struct dd_function_table *functions)
    st_init_fbo_functions(functions);
    st_init_feedback_functions(functions);
    st_init_program_functions(functions);
-#if FEATURE_queryobj
    st_init_query_functions(functions);
-#endif
    st_init_cond_render_functions(functions);
    st_init_readpixels_functions(functions);
    st_init_texture_functions(functions);