summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2016-06-20 16:35:32 -0700
committerIan Romanick <[email protected]>2016-07-19 12:19:28 -0700
commit15c4ae461dba101e12924fc8e3e9099b3e700bab (patch)
tree16198d4cff499b3f07c29746efd266b582e8d0fa /src/compiler
parent91482ef226de7686350202cfbdfda4358d9cea86 (diff)
MESA_shader_integer_functions: Boiler plate extension tracking
Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/glsl/glcpp/glcpp-parse.y3
-rw-r--r--src/compiler/glsl/glsl_parser_extras.cpp1
-rw-r--r--src/compiler/glsl/glsl_parser_extras.h2
-rw-r--r--src/compiler/glsl/standalone_scaffolding.cpp2
4 files changed, 8 insertions, 0 deletions
diff --git a/src/compiler/glsl/glcpp/glcpp-parse.y b/src/compiler/glsl/glcpp/glcpp-parse.y
index 2cfa6a6825a..a1597611144 100644
--- a/src/compiler/glsl/glcpp/glcpp-parse.y
+++ b/src/compiler/glsl/glcpp/glcpp-parse.y
@@ -2479,6 +2479,9 @@ _glcpp_parser_handle_version_declaration(glcpp_parser_t *parser, intmax_t versio
if (extensions->EXT_shader_samples_identical)
add_builtin_define(parser, "GL_EXT_shader_samples_identical", 1);
+
+ if (extensions->MESA_shader_integer_functions)
+ add_builtin_define(parser, "GL_MESA_shader_integer_functions", 1);
}
if (version >= 150)
diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp
index 96014247e5d..007743497d4 100644
--- a/src/compiler/glsl/glsl_parser_extras.cpp
+++ b/src/compiler/glsl/glsl_parser_extras.cpp
@@ -652,6 +652,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
EXT(EXT_shader_samples_identical, true, true, EXT_shader_samples_identical),
EXT(EXT_texture_array, true, false, EXT_texture_array),
EXT(EXT_texture_buffer, false, true, OES_texture_buffer),
+ EXT(MESA_shader_integer_functions, true, true, MESA_shader_integer_functions),
};
#undef EXT
diff --git a/src/compiler/glsl/glsl_parser_extras.h b/src/compiler/glsl/glsl_parser_extras.h
index 669b3d1b201..9548e62532f 100644
--- a/src/compiler/glsl/glsl_parser_extras.h
+++ b/src/compiler/glsl/glsl_parser_extras.h
@@ -681,6 +681,8 @@ struct _mesa_glsl_parse_state {
bool EXT_texture_array_warn;
bool EXT_texture_buffer_enable;
bool EXT_texture_buffer_warn;
+ bool MESA_shader_integer_functions_enable;
+ bool MESA_shader_integer_functions_warn;
/*@}*/
/** Extensions supported by the OpenGL implementation. */
diff --git a/src/compiler/glsl/standalone_scaffolding.cpp b/src/compiler/glsl/standalone_scaffolding.cpp
index 53729af3921..b0fb4b726ae 100644
--- a/src/compiler/glsl/standalone_scaffolding.cpp
+++ b/src/compiler/glsl/standalone_scaffolding.cpp
@@ -177,6 +177,8 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api)
ctx->Extensions.EXT_shader_integer_mix = true;
ctx->Extensions.EXT_texture_array = true;
+ ctx->Extensions.MESA_shader_integer_functions = true;
+
ctx->Extensions.NV_texture_rectangle = true;
ctx->Const.GLSLVersion = 120;