From: John Kessenich Date: Fri, 16 Sep 2016 04:49:31 +0000 (-0600) Subject: HLSL: return correct error when HLSL parsing fails. X-Git-Tag: upstream/11.4.0~1510 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7f702124ece009c5882ae29eb23169901edb5663;p=platform%2Fupstream%2Fglslang.git HLSL: return correct error when HLSL parsing fails. At least partially addresses issue #510. --- diff --git a/glslang/Include/revision.h b/glslang/Include/revision.h index 74310f3..e45c88a 100644 --- a/glslang/Include/revision.h +++ b/glslang/Include/revision.h @@ -2,5 +2,5 @@ // For the version, it uses the latest git tag followed by the number of commits. // For the date, it uses the current date (when then script is run). -#define GLSLANG_REVISION "Overload400-PrecQual.1482" -#define GLSLANG_DATE "12-Sep-2016" +#define GLSLANG_REVISION "Overload400-PrecQual.1485" +#define GLSLANG_DATE "15-Sep-2016" diff --git a/hlsl/hlslParseHelper.cpp b/hlsl/hlslParseHelper.cpp index 40bea67..bd2ff62 100755 --- a/hlsl/hlslParseHelper.cpp +++ b/hlsl/hlslParseHelper.cpp @@ -119,14 +119,15 @@ bool HlslParseContext::parseShaderStrings(TPpContext& ppContext, TInputScanner& HlslScanContext scanContext(*this, ppContext); HlslGrammar grammar(scanContext, *this); - if (!grammar.parse()) - { + if (!grammar.parse()) { // Print a message formated such that if you click on the message it will take you right to // the line through most UIs. const glslang::TSourceLoc& sourceLoc = input.getSourceLoc(); printf("\n%s(%i): error at column %i, HLSL translation failed.\n", sourceLoc.name, sourceLoc.line, sourceLoc.column); + return false; } + return numErrors == 0; }