diff options
author | Michal Krol <[email protected]> | 2006-08-21 09:25:11 +0000 |
---|---|---|
committer | Michal Krol <[email protected]> | 2006-08-21 09:25:11 +0000 |
commit | 1d67cad9af17d1a56c9370dc221eba7eeb74b1cb (patch) | |
tree | cabbd4a69aba5520d280b0da8701227cb5de6aa6 /src/mesa/shader/slang/slang_compile.c | |
parent | 798ef5ce330fa308dad60e4550dd1a0437be5338 (diff) |
More GLSL preprocessor code:
Rename slang_version.syn to slang_pp_version.syn.
The #version directive understands version 120.
Cosmetic changes in version preprocessor.
Checks if requested version is supported by the compiler.
Diffstat (limited to 'src/mesa/shader/slang/slang_compile.c')
-rw-r--r-- | src/mesa/shader/slang/slang_compile.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index bcbb7561827..46bdf830f92 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -1925,6 +1925,11 @@ compile_with_grammar (grammar id, const char *source, slang_code_unit *unit, sla if (!_slang_preprocess_version (source, &version, &start, infolog)) return GL_FALSE; + if (version > 110) { + slang_info_log_error (infolog, "language version specified is not supported."); + return GL_FALSE; + } + /* check the syntax and generate its binary representation */ if (!grammar_fast_check (id, (const byte *) source + start, &prod, &size, 65536)) { |