From: Chia-I Wu Date: Wed, 31 Mar 2010 04:29:05 +0000 (+0800) Subject: st/mesa: Make st_cb_queryobj.h FEATURE_queryobj aware. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=16775f4951e4a515167a8ec4115b692c256c5f16;p=mesa.git 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. --- 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);