diff options
author | Timothy Arceri <[email protected]> | 2019-08-20 14:20:33 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2019-11-20 05:05:55 +0000 |
commit | 5327b756bf3c9f3779a90900ac06c6bcb8976951 (patch) | |
tree | 699da4546c10b1bcf82b751e29f44439d8485543 /src/compiler/glsl/glcpp | |
parent | 13a1426b97c2ff1e42f7455f1f9937fe956c17b2 (diff) |
glsl: error if #include used while extension is disabled
In other words make sure the shader does this:
Reviewed-by: Witold Baryluk <[email protected]>
Diffstat (limited to 'src/compiler/glsl/glcpp')
-rw-r--r-- | src/compiler/glsl/glcpp/glcpp-parse.y | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/glsl/glcpp/glcpp-parse.y b/src/compiler/glsl/glcpp/glcpp-parse.y index 3cc00bd56e8..60323e449da 100644 --- a/src/compiler/glsl/glcpp/glcpp-parse.y +++ b/src/compiler/glsl/glcpp/glcpp-parse.y @@ -377,6 +377,13 @@ control_line_success: glcpp_parser_copy_defines, &di); + /* Print out '#include' to the glsl parser. We do this + * so that it can do the error checking require to + * make sure the ARB_shading_language_include + * extension is enabled. + */ + _mesa_string_buffer_printf(parser->output, "#include\n"); + /* Parse the include string before adding to the * preprocessor output. */ |