summaryrefslogtreecommitdiffstats
path: root/src/glsl/glcpp/glcpp.h
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-01-25 11:57:02 -0800
committerMatt Turner <[email protected]>2014-01-27 21:15:35 -0800
commit3e0e9e3bf9e597eb74b06381b3418c958be4d452 (patch)
treefce160f92ee606b088d78b9ee9d3ea64b9f32b4d /src/glsl/glcpp/glcpp.h
parenta818bf481a5e75feaed0afe44b0b80dc8017374f (diff)
glcpp: Check version_resolved in the proper place.
The check was in the wrong place, such that if a shader incorrectly put a preprocessor token before the #version declaration, the version would be resolved twice, leading to a segmentation fault when attempting to redefine the __VERSION__ macro. #extension GL_ARB_sample_shading: require #version 130 void main() {} Also, rename glcpp_parser_resolve_version to glcpp_parser_resolve_implicit_version to avoid confusion. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Carl Worth <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/glcpp/glcpp.h')
-rw-r--r--src/glsl/glcpp/glcpp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/glcpp/glcpp.h b/src/glsl/glcpp/glcpp.h
index 4aa200a635d..9d85c163f26 100644
--- a/src/glsl/glcpp/glcpp.h
+++ b/src/glsl/glcpp/glcpp.h
@@ -203,7 +203,7 @@ void
glcpp_parser_destroy (glcpp_parser_t *parser);
void
-glcpp_parser_resolve_version(glcpp_parser_t *parser);
+glcpp_parser_resolve_implicit_version(glcpp_parser_t *parser);
int
glcpp_preprocess(void *ralloc_ctx, const char **shader, char **info_log,