diff options
author | Chia-I Wu <olvaffe@gmail.com> | 2009-09-08 17:45:59 +0800 |
---|---|---|
committer | Chia-I Wu <olvaffe@gmail.com> | 2009-09-12 20:55:57 +0800 |
commit | 57ce3ab32382d08ac8f0aeca13677612af3adfc0 (patch) | |
tree | a3c0df6c82dead8e37ca3570180e6f76e465bc8a /src/mesa/main/queryobj.h | |
parent | 7f8045ab4e11dee0d80498187e96d38ce95c8ef4 (diff) |
mesa/main: New feature FEATURE_queryobj.
It merges FEATURE_ARB_occlusion_query and FEATURE_EXT_timer_query, and
follows the feature conventions.
Diffstat (limited to 'src/mesa/main/queryobj.h')
-rw-r--r-- | src/mesa/main/queryobj.h | 51 |
1 files changed, 42 insertions, 9 deletions
diff --git a/src/mesa/main/queryobj.h b/src/mesa/main/queryobj.h index ee775ef959..861e6ba566 100644 --- a/src/mesa/main/queryobj.h +++ b/src/mesa/main/queryobj.h @@ -23,19 +23,24 @@ */ -#ifndef OCCLUDE_H -#define OCCLUDE_H +#ifndef QUERYOBJ_H +#define QUERYOBJ_H -extern void -_mesa_init_query(GLcontext *ctx); +#include "main/mtypes.h" -extern void -_mesa_free_query_data(GLcontext *ctx); -extern void -_mesa_init_query_object_functions(struct dd_function_table *driver); +#if FEATURE_queryobj +#define _MESA_INIT_QUERYOBJ_FUNCTIONS(driver, impl) \ + do { \ + (driver)->NewQueryObject = impl ## NewQueryObject; \ + (driver)->DeleteQuery = impl ## DeleteQuery; \ + (driver)->BeginQuery = impl ## BeginQuery; \ + (driver)->EndQuery = impl ## EndQuery; \ + (driver)->WaitQuery = impl ## WaitQuery; \ + (driver)->CheckQuery = impl ## CheckQuery; \ + } while (0) extern void GLAPIENTRY _mesa_GenQueriesARB(GLsizei n, GLuint *ids); @@ -67,5 +72,33 @@ _mesa_GetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64EXT *params); extern void GLAPIENTRY _mesa_GetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64EXT *params); +extern void +_mesa_init_query_object_functions(struct dd_function_table *driver); + +extern void +_mesa_init_queryobj_dispatch(struct _glapi_table *disp); + +#else /* FEATURE_queryobj */ + +#define _MESA_INIT_QUERYOBJ_FUNCTIONS(driver, impl) do { } while (0) + +static INLINE void +_mesa_init_query_object_functions(struct dd_function_table *driver) +{ +} + +static INLINE void +_mesa_init_queryobj_dispatch(struct _glapi_table *disp) +{ +} + +#endif /* FEATURE_queryobj */ + +extern void +_mesa_init_queryobj(GLcontext *ctx); + +extern void +_mesa_free_queryobj_data(GLcontext *ctx); + -#endif /* OCCLUDE_H */ +#endif /* QUERYOBJ_H */ |