diff options
author | Brian <[email protected]> | 2007-04-10 21:50:53 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-04-10 21:50:53 -0600 |
commit | 319ce38fa4984d4cfe8575126bb0d7aa10ef27a1 (patch) | |
tree | 4f12b9151f84875ea00a0aa3e1872d3feaf7448c /src/mesa/shader/slang | |
parent | 64700be4e11ff735f0530812f6f319628e4b33c5 (diff) |
update SLANG version test
Diffstat (limited to 'src/mesa/shader/slang')
-rw-r--r-- | src/mesa/shader/slang/slang_compile.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 3539d712e2c..d3f6986543e 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -1904,14 +1904,22 @@ compile_with_grammar(grammar id, const char *source, slang_code_unit * unit, byte *prod; GLuint size, start, version; slang_string preprocessed; + int maxVersion; + +#if FEATURE_ARB_shading_language_120 + maxVersion = 120; +#else + maxVersion = 110; +#endif /* First retrieve the version number. */ if (!_slang_preprocess_version(source, &version, &start, infolog)) return GL_FALSE; - if (version > 110) { + if (version > maxVersion) { slang_info_log_error(infolog, - "language version specified is not supported."); + "language version %.2f is not supported.", + version * 0.01); return GL_FALSE; } |