summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-03-31 12:29:05 +0800
committerChia-I Wu <olv@lunarg.com>2010-05-12 12:12:57 +0800
commit16775f4951e4a515167a8ec4115b692c256c5f16 (patch)
tree8151154ffcd3849afc66c9164f692c47f7b59b12 /src/mesa/state_tracker
parentbcce57c2e9a1d9b203dba8fe13480889e6d19c89 (diff)
st/mesa: Make st_cb_queryobj.h FEATURE_queryobj aware.
This change allows st_cb_queryobj.h to be used without knowing if FEATURE_queryobj is enabled.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_cb_queryobj.c4
-rw-r--r--src/mesa/state_tracker/st_cb_queryobj.h11
-rw-r--r--src/mesa/state_tracker/st_context.c2
3 files changed, 15 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_cb_queryobj.c b/src/mesa/state_tracker/st_cb_queryobj.c
index af60db8869..a8bd5db630 100644
--- a/src/mesa/state_tracker/st_cb_queryobj.c
+++ b/src/mesa/state_tracker/st_cb_queryobj.c
@@ -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 */
diff --git a/src/mesa/state_tracker/st_cb_queryobj.h b/src/mesa/state_tracker/st_cb_queryobj.h
index b8b578159d..017471b0b0 100644
--- a/src/mesa/state_tracker/st_cb_queryobj.h
+++ b/src/mesa/state_tracker/st_cb_queryobj.h
@@ -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
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 5c9462a399..f3b436fecd 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -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);