/**
 * Initializes potential list of extensions if ctx == NULL, or actually enables
 * extensions for a context.
 */
void
intelInitExtensions(struct gl_context *ctx)
{
   struct intel_context *intel = intel_context(ctx);

   driInitExtensions(ctx, card_extensions, GL_FALSE);

   _mesa_map_function_array(GL_VERSION_2_1_functions);

   ctx->Const.GLSLVersion = get_glsl_version();

   if (intel->gen >= 5)
      driInitExtensions(ctx, ironlake_extensions, GL_FALSE);

   if (intel->gen >= 4)
      driInitExtensions(ctx, brw_extensions, GL_FALSE);

   if (intel->gen == 3) {
      driInitExtensions(ctx, i915_extensions, GL_FALSE);

      if (driQueryOptionb(&intel->optionCache, "fragment_shader"))
	 driInitExtensions(ctx, fragment_shader_extensions, GL_FALSE);

      if (driQueryOptionb(&intel->optionCache, "stub_occlusion_query"))
	 driInitExtensions(ctx, arb_oq_extensions, GL_FALSE);
   }
}
示例#2
0
/**
 * Initializes potential list of extensions if ctx == NULL, or actually enables
 * extensions for a context.
 */
void
intelInitExtensions(GLcontext *ctx)
{
   struct intel_context *intel = intel_context(ctx);

   /* Disable imaging extension until convolution is working in teximage paths.
    */
   driInitExtensions(ctx, card_extensions, GL_FALSE);

   _mesa_map_function_array(GL_VERSION_2_1_functions);
   ctx->Const.GLSLVersion = 120;

   if (intel->gen >= 5)
      driInitExtensions(ctx, ironlake_extensions, GL_FALSE);

   if (intel->gen >= 4)
      driInitExtensions(ctx, brw_extensions, GL_FALSE);

   if (intel->gen == 3) {
      driInitExtensions(ctx, i915_extensions, GL_FALSE);

      if (driQueryOptionb(&intel->optionCache, "fragment_shader"))
	 driInitExtensions(ctx, fragment_shader_extensions, GL_FALSE);

      if (driQueryOptionb(&intel->optionCache, "stub_occlusion_query"))
	 driInitExtensions(ctx, arb_oq_extensions, GL_FALSE);
   }
}
示例#3
0
文件: remap.c 项目: aphogat/mesa
/**
 * Map the functions which are already static.
 *
 * When a extension function are incorporated into the ABI, the
 * extension suffix is usually stripped.  Mapping such functions
 * makes sure the alternative names are available.
 *
 * Note that functions mapped by _mesa_init_remap_table() are
 * excluded.
 */
void
_mesa_map_static_functions(void)
{
   /* Remap static functions which have alternative names and are in the ABI.
    * This is to be on the safe side.  glapi should have defined those names.
    */
   _mesa_map_function_array(MESA_alt_functions);
}
示例#4
0
/**
 * Enable and map functions for a single extension
 * 
 * \param ctx  Context where extension is to be enabled.
 * \param ext  Extension that is to be enabled.
 * 
 * \sa driInitExtensions, _mesa_enable_extension, _mesa_map_function_array
 */
void driInitSingleExtension( GLcontext * ctx,
			     const struct dri_extension * ext )
{
    if ( ext->functions != NULL ) {
       _mesa_map_function_array(ext->functions);
    }

    if ( ctx != NULL ) {
	_mesa_enable_extension( ctx, ext->name );
    }
}