From 16775f4951e4a515167a8ec4115b692c256c5f16 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Wed, 31 Mar 2010 12:29:05 +0800 Subject: 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. --- src/mesa/state_tracker/st_cb_queryobj.c | 4 ++++ src/mesa/state_tracker/st_cb_queryobj.h | 11 +++++++++++ src/mesa/state_tracker/st_context.c | 2 -- 3 files changed, 15 insertions(+), 2 deletions(-) (limited to 'src/mesa/state_tracker') 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); -- cgit v1.2.3