mesa: don't always enable OES_standard_derivatives
authorMarek Olšák <maraeo@gmail.com>
Sun, 28 Oct 2012 14:01:52 +0000 (15:01 +0100)
committerMarek Olšák <maraeo@gmail.com>
Wed, 31 Oct 2012 01:04:54 +0000 (02:04 +0100)
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>
src/glsl/standalone_scaffolding.cpp
src/mesa/drivers/dri/intel/intel_extensions.c
src/mesa/main/extensions.c
src/mesa/state_tracker/st_extensions.c

index 679714e384ae53c094a210e35f670fdebef5b792..7e37be5786011fe808f87b870a9bc8a5369992b7 100644 (file)
@@ -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;
 
index ec99c3e571a3d1e8b8242755b32ba4bcfc98b31a..702e40f26716eb23193d6f2c30a76878d33e91bd 100755 (executable)
@@ -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) {
index 142f8652f7314a2a839d52e0786b32edafb79b2c..7fdf75abb861db2eb10b9e79df0411d4223f14b5 100644 (file)
@@ -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;
index 97bf29c662c9fbd0d3f34dc2a3546880d024d2d1..fe2163c769b0adb79aa2d752f189a913111b74ce 100644 (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
        * 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 */