aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2014-01-08 08:32:03 -0800
committerIan Romanick <[email protected]>2014-01-20 11:32:00 -0800
commit5439964270e966aa53a2c1f58969f23555bfa9ad (patch)
tree1fc7579169053b5c33108d760d9ff51cd2a32a1b /src
parent3815264d7d07e8dd216674a32568daa55aeed680 (diff)
glsl: Add extension infrastructure for ARB_viewport_array
Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/glsl/glcpp/glcpp-parse.y3
-rw-r--r--src/glsl/glsl_parser_extras.cpp1
-rw-r--r--src/glsl/glsl_parser_extras.h2
-rw-r--r--src/glsl/standalone_scaffolding.cpp1
4 files changed, 7 insertions, 0 deletions
diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y
index 55c49819561..bbe8a06f0a8 100644
--- a/src/glsl/glcpp/glcpp-parse.y
+++ b/src/glsl/glcpp/glcpp-parse.y
@@ -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);
}
}
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index 21dc3abd74f..ddb3d2df4be 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -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
diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h
index 2444a96ce6c..6f60b73b31c 100644
--- a/src/glsl/glsl_parser_extras.h
+++ b/src/glsl/glsl_parser_extras.h
@@ -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. */
diff --git a/src/glsl/standalone_scaffolding.cpp b/src/glsl/standalone_scaffolding.cpp
index 257d2e7a94b..91794719b70 100644
--- a/src/glsl/standalone_scaffolding.cpp
+++ b/src/glsl/standalone_scaffolding.cpp
@@ -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;