From: Eric Anholt Date: Thu, 14 Feb 2008 00:08:19 +0000 (-0800) Subject: [965] Fix ARB_occlusion_query from intel_screen.c merge. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=85063f14ea431b586d710f249563fc73481552c7;p=mesa.git [965] Fix ARB_occlusion_query from intel_screen.c merge. It wasn't being initialized at screen setup, so we were getting stub entrypoints even though it was exposed as enabled. Fixes arbocclude mesa demo. --- diff --git a/src/mesa/drivers/dri/i965/intel_context.c b/src/mesa/drivers/dri/i965/intel_context.c index 83a00303df9..459039a8879 100644 --- a/src/mesa/drivers/dri/i965/intel_context.c +++ b/src/mesa/drivers/dri/i965/intel_context.c @@ -227,8 +227,10 @@ const struct dri_extension ttm_extensions[] = { {NULL, NULL} }; -const struct dri_extension arb_oc_extension = - { "GL_ARB_occlusion_query", GL_ARB_occlusion_query_functions}; +const struct dri_extension arb_oc_extensions[] = { + {"GL_ARB_occlusion_query", GL_ARB_occlusion_query_functions}, + {NULL, NULL} +}; /** * Initializes potential list of extensions if ctx == NULL, or actually enables @@ -248,7 +250,7 @@ void intelInitExtensions(GLcontext *ctx, GLboolean enable_imaging) driInitExtensions(ctx, ttm_extensions, GL_FALSE); if (intel == NULL || intel->intelScreen->drmMinor >= 8) - driInitSingleExtension(ctx, &arb_oc_extension); + driInitExtensions(ctx, arb_oc_extensions, GL_FALSE); } static const struct dri_debug_control debug_control[] = diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index 247fc4c5bc9..84c77d39919 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -68,11 +68,14 @@ DRI_CONF_END; const GLuint __driNConfigOptions = 5; #ifdef USE_NEW_INTERFACE - static PFNGLXCREATECONTEXTMODES create_context_modes = NULL; +static PFNGLXCREATECONTEXTMODES create_context_modes = NULL; #endif /*USE_NEW_INTERFACE */ - extern const struct dri_extension card_extensions[]; - extern const struct dri_extension ttm_extensions[]; +extern const struct dri_extension card_extensions[]; +extern const struct dri_extension ttm_extensions[]; +#ifndef I915 +extern const struct dri_extension arb_oc_extensions[]; +#endif /** * Map all the memory regions described by the screen. @@ -693,6 +696,9 @@ PUBLIC __GLcontextModes *__driDriverInitScreen(__DRIscreenPrivate *psp) */ driInitExtensions(NULL, card_extensions, GL_FALSE); driInitExtensions(NULL, ttm_extensions, GL_FALSE); +#ifndef I915 + driInitExtensions(NULL, arb_oc_extensions, GL_FALSE); +#endif if (!intelInitDriver(psp)) return NULL;