summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2013-04-09 16:01:38 -0700
committerMatt Turner <[email protected]>2013-05-06 10:17:12 -0700
commitf99f78e49a10b92e236ee0909eb806d353e1f2e6 (patch)
treec39a6e7e662d48d3ebea0c52020c52ef1fb8d429 /src/glsl
parent914d797797b5b835eeaffb56f04a2ca3f2e120b6 (diff)
mesa: Add infrastructure for ARB_gpu_shader5.
Reviewed-by: Chris Forbes <[email protected]>
Diffstat (limited to 'src/glsl')
-rwxr-xr-xsrc/glsl/builtins/tools/generate_builtins.py1
-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
5 files changed, 8 insertions, 0 deletions
diff --git a/src/glsl/builtins/tools/generate_builtins.py b/src/glsl/builtins/tools/generate_builtins.py
index 75d3c21f43b..85bd5dddc73 100755
--- a/src/glsl/builtins/tools/generate_builtins.py
+++ b/src/glsl/builtins/tools/generate_builtins.py
@@ -192,6 +192,7 @@ read_builtins(GLenum target, const char *protos, const char **functions, unsigne
st->ARB_shading_language_packing_enable = true;
st->ARB_texture_multisample_enable = true;
st->ARB_texture_query_lod_enable = true;
+ st->ARB_gpu_shader5_enable = true;
_mesa_glsl_initialize_types(st);
sh->ir = new(sh) exec_list;
diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y
index 00edbbfbde2..f0d2ab00799 100644
--- a/src/glsl/glcpp/glcpp-parse.y
+++ b/src/glsl/glcpp/glcpp-parse.y
@@ -1236,6 +1236,9 @@ glcpp_parser_create (const struct gl_extensions *extensions, int api)
if (extensions->ARB_texture_query_lod)
add_builtin_define(parser, "GL_ARB_texture_query_lod", 1);
+
+ if (extensions->ARB_gpu_shader5)
+ add_builtin_define(parser, "GL_ARB_gpu_shader5", 1);
}
}
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index 099229410c9..e4636f87309 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -468,6 +468,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
EXT(ARB_shading_language_packing, true, false, true, true, false, ARB_shading_language_packing),
EXT(ARB_texture_multisample, true, false, true, true, false, ARB_texture_multisample),
EXT(ARB_texture_query_lod, false, false, true, true, false, ARB_texture_query_lod),
+ EXT(ARB_gpu_shader5, true, true, true, true, false, ARB_gpu_shader5),
};
#undef EXT
diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h
index 95891b595f8..c77dda84ef6 100644
--- a/src/glsl/glsl_parser_extras.h
+++ b/src/glsl/glsl_parser_extras.h
@@ -284,6 +284,8 @@ struct _mesa_glsl_parse_state {
bool ARB_texture_multisample_warn;
bool ARB_texture_query_lod_enable;
bool ARB_texture_query_lod_warn;
+ bool ARB_gpu_shader5_enable;
+ bool ARB_gpu_shader5_warn;
/*@}*/
/** Extensions supported by the OpenGL implementation. */
diff --git a/src/glsl/standalone_scaffolding.cpp b/src/glsl/standalone_scaffolding.cpp
index 0c1f52f48c1..3c8f70f9e29 100644
--- a/src/glsl/standalone_scaffolding.cpp
+++ b/src/glsl/standalone_scaffolding.cpp
@@ -104,6 +104,7 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api)
ctx->Extensions.ARB_texture_cube_map_array = true;
ctx->Extensions.ARB_texture_multisample = true;
ctx->Extensions.ARB_texture_query_lod = true;
+ ctx->Extensions.ARB_gpu_shader5 = true;
ctx->Const.GLSLVersion = 120;