diff options
author | Marek Olšák <[email protected]> | 2012-10-28 15:01:52 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-10-31 02:04:54 +0100 |
commit | 55bf57dbb4e3ee1f0131fe7fc19211148b9e1e2f (patch) | |
tree | 1155b3709fc5130cd88ee926d06a56972e5e1df5 | |
parent | b6f5c37ac3e8ec3aae39289f94f05cb71a587066 (diff) |
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 <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
-rw-r--r-- | src/glsl/standalone_scaffolding.cpp | 1 | ||||
-rwxr-xr-x | src/mesa/drivers/dri/intel/intel_extensions.c | 1 | ||||
-rw-r--r-- | src/mesa/main/extensions.c | 3 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 2 |
4 files changed, 5 insertions, 2 deletions
diff --git a/src/glsl/standalone_scaffolding.cpp b/src/glsl/standalone_scaffolding.cpp index 679714e384a..7e37be57860 100644 --- a/src/glsl/standalone_scaffolding.cpp +++ b/src/glsl/standalone_scaffolding.cpp @@ -80,6 +80,7 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api) ctx->Extensions.EXT_texture3D = true; ctx->Extensions.OES_EGL_image_external = true; ctx->Extensions.ARB_shader_bit_encoding = true; + ctx->Extensions.OES_standard_derivatives = true; ctx->Const.GLSLVersion = 120; diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c index ec99c3e571a..702e40f2671 100755 --- a/src/mesa/drivers/dri/intel/intel_extensions.c +++ b/src/mesa/drivers/dri/intel/intel_extensions.c @@ -158,6 +158,7 @@ intelInitExtensions(struct gl_context *ctx) ctx->Extensions.ATI_envmap_bumpmap = true; ctx->Extensions.MESA_texture_array = true; ctx->Extensions.NV_conditional_render = true; + ctx->Extensions.OES_standard_derivatives = true; } if (intel->gen >= 3) { diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 142f8652f73..7fdf75abb86 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -357,8 +357,6 @@ name_to_offset(const char* name) * XXX: Should these defaults also apply to GLES? */ static const size_t default_extensions[] = { - o(OES_standard_derivatives), - /* Vendor Extensions */ o(APPLE_packed_pixels), 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_fragment_program_option = 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"); if (ctx->Mesa_DXTn) { ctx->Extensions.ANGLE_texture_compression_dxt = GL_TRUE; diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 97bf29c662c..fe2163c769b 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -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 * support the GL_POINT_SPRITE_R_MODE_NV option. */ { o(MESA_texture_array), PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS }, + + { o(OES_standard_derivatives), PIPE_CAP_SM3 } }; /* Required: render target and sampler support */ |