mesa: don't always enable OES_standard_derivatives

For Intel, expose it only if gen >= 4.
For Gallium, expose it only if PIPE_CAP_SM3 is advertised.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Marek Olšák
2012-10-28 15:01:52 +01:00
parent b6f5c37ac3
commit 55bf57dbb4
4 changed files with 5 additions and 2 deletions

View File

@@ -80,6 +80,7 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api)
ctx->Extensions.EXT_texture3D = true; ctx->Extensions.EXT_texture3D = true;
ctx->Extensions.OES_EGL_image_external = true; ctx->Extensions.OES_EGL_image_external = true;
ctx->Extensions.ARB_shader_bit_encoding = true; ctx->Extensions.ARB_shader_bit_encoding = true;
ctx->Extensions.OES_standard_derivatives = true;
ctx->Const.GLSLVersion = 120; ctx->Const.GLSLVersion = 120;

View File

@@ -158,6 +158,7 @@ intelInitExtensions(struct gl_context *ctx)
ctx->Extensions.ATI_envmap_bumpmap = true; ctx->Extensions.ATI_envmap_bumpmap = true;
ctx->Extensions.MESA_texture_array = true; ctx->Extensions.MESA_texture_array = true;
ctx->Extensions.NV_conditional_render = true; ctx->Extensions.NV_conditional_render = true;
ctx->Extensions.OES_standard_derivatives = true;
} }
if (intel->gen >= 3) { if (intel->gen >= 3) {

View File

@@ -357,8 +357,6 @@ name_to_offset(const char* name)
* XXX: Should these defaults also apply to GLES? * XXX: Should these defaults also apply to GLES?
*/ */
static const size_t default_extensions[] = { static const size_t default_extensions[] = {
o(OES_standard_derivatives),
/* Vendor Extensions */ /* Vendor Extensions */
o(APPLE_packed_pixels), o(APPLE_packed_pixels),
o(IBM_multimode_draw_arrays), o(IBM_multimode_draw_arrays),
@@ -464,6 +462,7 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
/*ctx->Extensions.NV_texgen_reflection = GL_TRUE;*/ /*ctx->Extensions.NV_texgen_reflection = GL_TRUE;*/
ctx->Extensions.NV_fragment_program_option = GL_TRUE; ctx->Extensions.NV_fragment_program_option = GL_TRUE;
ctx->Extensions.EXT_gpu_program_parameters = GL_TRUE; ctx->Extensions.EXT_gpu_program_parameters = GL_TRUE;
ctx->Extensions.OES_standard_derivatives = GL_TRUE;
_mesa_enable_extension(ctx, "GL_3DFX_texture_compression_FXT1"); _mesa_enable_extension(ctx, "GL_3DFX_texture_compression_FXT1");
if (ctx->Mesa_DXTn) { if (ctx->Mesa_DXTn) {
ctx->Extensions.ANGLE_texture_compression_dxt = GL_TRUE; ctx->Extensions.ANGLE_texture_compression_dxt = GL_TRUE;

View File

@@ -377,6 +377,8 @@ void st_init_extensions(struct st_context *st)
/* GL_NV_point_sprite is not supported by gallium because we don't /* GL_NV_point_sprite is not supported by gallium because we don't
* support the GL_POINT_SPRITE_R_MODE_NV option. */ * support the GL_POINT_SPRITE_R_MODE_NV option. */
{ o(MESA_texture_array), PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS }, { o(MESA_texture_array), PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS },
{ o(OES_standard_derivatives), PIPE_CAP_SM3 }
}; };
/* Required: render target and sampler support */ /* Required: render target and sampler support */