From 1d67cad9af17d1a56c9370dc221eba7eeb74b1cb Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Mon, 21 Aug 2006 09:25:11 +0000 Subject: 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. --- src/mesa/shader/slang/slang_compile.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mesa/shader/slang/slang_compile.c') diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index bcbb756182..46bdf830f9 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)) { -- cgit v1.2.3