mesa/sso: Enable GL_ARB_separate_shader_objects by default
authorIan Romanick <ian.d.romanick@intel.com>
Sat, 29 Jun 2013 02:39:28 +0000 (19:39 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 2 May 2014 14:20:08 +0000 (07:20 -0700)
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/glsl/glcpp/glcpp-parse.y
src/glsl/glsl_parser_extras.cpp
src/mesa/drivers/common/meta.c
src/mesa/main/extensions.c
src/mesa/main/get.c
src/mesa/main/get_hash_params.py
src/mesa/main/mtypes.h
src/mesa/main/shaderapi.c

index f28d8531eb1de8b2ca5a022afecd12a64852e252..412d571e6ebca9a68fc7ea2793cd36248e028a3c 100644 (file)
@@ -2069,6 +2069,7 @@ _glcpp_parser_handle_version_declaration(glcpp_parser_t *parser, intmax_t versio
           }
        } else {
           add_builtin_define(parser, "GL_ARB_draw_buffers", 1);
+           add_builtin_define(parser, "GL_ARB_separate_shader_objects", 1);
           add_builtin_define(parser, "GL_ARB_texture_rectangle", 1);
            add_builtin_define(parser, "GL_AMD_shader_trinary_minmax", 1);
 
@@ -2134,9 +2135,6 @@ _glcpp_parser_handle_version_declaration(glcpp_parser_t *parser, intmax_t versio
              if (extensions->ARB_texture_gather)
                 add_builtin_define(parser, "GL_ARB_texture_gather", 1);
 
-              if (extensions->ARB_separate_shader_objects)
-                 add_builtin_define(parser, "GL_ARB_separate_shader_objects", 1);
-
              if (extensions->ARB_shader_atomic_counters)
                 add_builtin_define(parser, "GL_ARB_shader_atomic_counters", 1);
 
index 8f09cc7293afaf0a04a64d5de7acb5fe019ed986..7dc9c71fd50ed482a1b3787577464c69098605e2 100644 (file)
@@ -514,7 +514,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
    EXT(ARB_fragment_coord_conventions, true,  false,     ARB_fragment_coord_conventions),
    EXT(ARB_texture_rectangle,          true,  false,     dummy_true),
    EXT(EXT_texture_array,              true,  false,     EXT_texture_array),
-   EXT(ARB_separate_shader_objects,    true,  false,     ARB_separate_shader_objects),
+   EXT(ARB_separate_shader_objects,    true,  false,     dummy_true),
    EXT(ARB_shader_texture_lod,         true,  false,     ARB_shader_texture_lod),
    EXT(ARB_shader_stencil_export,      true,  false,     ARB_shader_stencil_export),
    EXT(AMD_conservative_depth,         true,  false,     ARB_conservative_depth),
index d3910597dea7c6e7f911a24275e43abdac144f40..d3ff87a36657e09bfe933f1277aa64f937500bc4 100644 (file)
@@ -576,11 +576,10 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
          _mesa_set_enable(ctx, GL_FRAGMENT_SHADER_ATI, GL_FALSE);
       }
 
-      if (ctx->Extensions.ARB_separate_shader_objects) {
-         if (ctx->Pipeline.Current) {
-            _mesa_reference_pipeline_object(ctx, &save->Pipeline,
-                                            ctx->Pipeline.Current);
-            _mesa_BindProgramPipeline(0);
+      if (ctx->Pipeline.Current) {
+         _mesa_reference_pipeline_object(ctx, &save->Pipeline,
+                                         ctx->Pipeline.Current);
+         _mesa_BindProgramPipeline(0);
       }
 
       /* Save the shader state from ctx->Shader (instead of ctx->_Shader) so
@@ -975,7 +974,6 @@ _mesa_meta_end(struct gl_context *ctx)
                                          ctx->Pipeline.Default);
 
       if (save->Pipeline) {
-         assert(ctx->Extensions.ARB_separate_shader_objects);
          _mesa_bind_pipeline(ctx, save->Pipeline);
 
          _mesa_reference_pipeline_object(ctx, &save->Pipeline, NULL);
index 941e38a9f79c2b252fc6407aaf2d0a3e4276e89d..e60d7b0d57c733768b6fa5ecebaf44c5b19f1a75 100644 (file)
@@ -128,7 +128,7 @@ static const struct extension extension_table[] = {
    { "GL_ARB_sample_shading",                      o(ARB_sample_shading),                      GL,             2009 },
    { "GL_ARB_sampler_objects",                     o(dummy_true),                              GL,             2009 },
    { "GL_ARB_seamless_cube_map",                   o(ARB_seamless_cube_map),                   GL,             2009 },
-   { "GL_ARB_separate_shader_objects",             o(ARB_separate_shader_objects),             GL,             2010 },
+   { "GL_ARB_separate_shader_objects",             o(dummy_true),                              GL,             2010 },
    { "GL_ARB_shader_atomic_counters",              o(ARB_shader_atomic_counters),              GL,             2011 },
    { "GL_ARB_shader_bit_encoding",                 o(ARB_shader_bit_encoding),                 GL,             2010 },
    { "GL_ARB_shader_image_load_store",             o(ARB_shader_image_load_store),             GL,             2011 },
index fe35ff3ef8afe6cf2e8eec4db82351f50294c569..937d7aa67b4cf06a9e15018724ee11383b4f8d3e 100644 (file)
@@ -387,7 +387,6 @@ EXTRA_EXT(ARB_texture_cube_map_array);
 EXTRA_EXT(ARB_texture_buffer_range);
 EXTRA_EXT(ARB_texture_multisample);
 EXTRA_EXT(ARB_texture_gather);
-EXTRA_EXT(ARB_separate_shader_objects);
 EXTRA_EXT(ARB_shader_atomic_counters);
 EXTRA_EXT(ARB_draw_indirect);
 EXTRA_EXT(ARB_shader_image_load_store);
index 06d0bbacccf774027fe98674da8d559c6abc5f5c..1d565028ebbffff8caa0ac8f8fbbc589cb7bd33a 100644 (file)
@@ -727,7 +727,7 @@ descriptor=[
   [ "MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB", "CONTEXT_INT(Const.MaxProgramTextureGatherComponents), extra_ARB_texture_gather"],
 
 # GL_ARB_separate_shader_objects
-  [ "PROGRAM_PIPELINE_BINDING", "LOC_CUSTOM, TYPE_INT, GL_PROGRAM_PIPELINE_BINDING, extra_ARB_separate_shader_objects" ],
+  [ "PROGRAM_PIPELINE_BINDING", "LOC_CUSTOM, TYPE_INT, GL_PROGRAM_PIPELINE_BINDING, NO_EXTRA" ],
 
 # GL_ARB_shader_atomic_counters
   [ "ATOMIC_COUNTER_BUFFER_BINDING", "LOC_CUSTOM, TYPE_INT, 0, extra_ARB_shader_atomic_counters" ],
index f31788aefab7db977c5d20cd9f41606384bb222d..b3fdf0662a15c16b534fe2505494cc248a1d00ce 100644 (file)
@@ -3540,7 +3540,6 @@ struct gl_extensions
    GLboolean ARB_point_sprite;
    GLboolean ARB_sample_shading;
    GLboolean ARB_seamless_cube_map;
-   GLboolean ARB_separate_shader_objects;
    GLboolean ARB_shader_atomic_counters;
    GLboolean ARB_shader_bit_encoding;
    GLboolean ARB_shader_image_load_store;
index 1c8e6b4cf5bbaf1cec517db30b786270a2aaa3b1..8368ec56abfba50a18933bc92d08a2102662e2c9 100644 (file)
@@ -700,9 +700,6 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, GLint *param
       return;
    }
    case GL_PROGRAM_SEPARABLE:
-      if (!ctx->Extensions.ARB_separate_shader_objects)
-         break;
-
       *params = shProg->SeparateShader;
       return;
    default:
@@ -1777,9 +1774,6 @@ _mesa_ProgramParameteri(GLuint program, GLenum pname, GLint value)
       return;
 
    case GL_PROGRAM_SEPARABLE:
-      if (!ctx->Extensions.ARB_separate_shader_objects)
-         break;
-
       /* Spec imply that the behavior is the same as ARB_get_program_binary
        * Chapter 7.3 Program Objects
        */