summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 af60db88696..a8bd5db6304 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 b8b578159d2..017471b0b06 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 5c9462a399b..f3b436fecdf 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);