glsl: Add extension infrastructure for ARB_viewport_array
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 8 Jan 2014 16:32:03 +0000 (08:32 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 20 Jan 2014 19:32:00 +0000 (11:32 -0800)
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/glcpp/glcpp-parse.y
src/glsl/glsl_parser_extras.cpp
src/glsl/glsl_parser_extras.h
src/glsl/standalone_scaffolding.cpp

index 55c498195615621b7656fc792df3c2d4927c5047..bbe8a06f0a833c29450eeed19632e4f0a117fd94 100644 (file)
@@ -1284,6 +1284,9 @@ glcpp_parser_create (const struct gl_extensions *extensions, int api)
 
              if (extensions->AMD_shader_trinary_minmax)
                 add_builtin_define(parser, "GL_AMD_shader_trinary_minmax", 1);
+
+             if (extensions->ARB_viewport_array)
+                add_builtin_define(parser, "GL_ARB_viewport_array", 1);
           }
        }
 
index 21dc3abd74fff4a4552a18b087c9b3279eaf0dd8..ddb3d2df4be6d3cc36cafb0fc7ec3b727154e7a0 100644 (file)
@@ -513,6 +513,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
    EXT(ARB_shader_atomic_counters,     true,  false,     ARB_shader_atomic_counters),
    EXT(ARB_sample_shading,             true,  false,     ARB_sample_shading),
    EXT(AMD_shader_trinary_minmax,      true,  false,     dummy_true),
+   EXT(ARB_viewport_array,             true,  false,     ARB_viewport_array),
 };
 
 #undef EXT
index 2444a96ce6c86205282a74ce95d31001c75222ca..6f60b73b31c01df0a3a938cf47c45deb94f42ec8 100644 (file)
@@ -352,6 +352,8 @@ struct _mesa_glsl_parse_state {
    bool ARB_shader_atomic_counters_warn;
    bool AMD_shader_trinary_minmax_enable;
    bool AMD_shader_trinary_minmax_warn;
+   bool ARB_viewport_array_enable;
+   bool ARB_viewport_array_warn;
    /*@}*/
 
    /** Extensions supported by the OpenGL implementation. */
index 257d2e7a94bfee263f8d12396d33117fcd8c1565..91794719b707e2f7371eaaf3fccbe8e2888d198f 100644 (file)
@@ -110,6 +110,7 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api)
    ctx->Extensions.ARB_texture_query_levels = true;
    ctx->Extensions.ARB_texture_query_lod = true;
    ctx->Extensions.ARB_uniform_buffer_object = true;
+   ctx->Extensions.ARB_viewport_array = true;
 
    ctx->Extensions.OES_EGL_image_external = true;
    ctx->Extensions.OES_standard_derivatives = true;