diff options
author | Chia-I Wu <[email protected]> | 2014-04-22 16:58:16 +0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2014-05-02 10:50:14 -0700 |
commit | 267e28bb62bb7ca2ebffc9a713bd5fa5fbd78ac7 (patch) | |
tree | 820373d474f47b0ba87c73a448d751f3e081bba0 /src/glsl/glsl_parser_extras.cpp | |
parent | 6a2d28599f7326d7e40663033d34c32eeb814473 (diff) |
glsl: make static constant variables "static const"
This allows them to be moved to .rodata, and allow us to be sure that they
will not be modified.
Signed-off-by: Chia-I Wu <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/glsl/glsl_parser_extras.cpp')
-rw-r--r-- | src/glsl/glsl_parser_extras.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index 1e619265c9e..d3339e7795d 100644 --- a/src/glsl/glsl_parser_extras.cpp +++ b/src/glsl/glsl_parser_extras.cpp @@ -49,7 +49,7 @@ glsl_compute_version_string(void *mem_ctx, bool is_es, unsigned version) } -static unsigned known_desktop_glsl_versions[] = +static const unsigned known_desktop_glsl_versions[] = { 110, 120, 130, 140, 150, 330, 400, 410, 420, 430, 440 }; @@ -656,7 +656,7 @@ _mesa_glsl_process_extension(const char *name, YYLTYPE *name_locp, if (extension && extension->compatible_with_state(state)) { extension->set_flags(state, behavior); } else { - static const char *const fmt = "extension `%s' unsupported in %s shader"; + static const char fmt[] = "extension `%s' unsupported in %s shader"; if (behavior == extension_require) { _mesa_glsl_error(name_locp, state, fmt, |