Add more allowances for relaxed error checking mode: Warn instead of error on use of a disabled extension, allow 'f' suffix on floating point literals, and allow #version after tokens.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27113 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
fd30542a0f
commit
7e991e7be1
5 changed files with 113 additions and 56 deletions
|
|
@ -205,7 +205,8 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken)
|
|||
}
|
||||
} else if (ch == 'f' || ch == 'F') {
|
||||
parseContext.profileRequires(ppToken->loc, EEsProfile, 300, 0, "floating-point suffix");
|
||||
parseContext.profileRequires(ppToken->loc, ~EEsProfile, 120, 0, "floating-point suffix");
|
||||
if ((parseContext.messages & EShMsgRelaxedErrors) == 0)
|
||||
parseContext.profileRequires(ppToken->loc, ~EEsProfile, 120, 0, "floating-point suffix");
|
||||
if (! HasDecimalOrExponent)
|
||||
parseContext.error(ppToken->loc, "float literal needs a decimal point or exponent", "", "");
|
||||
if (len < TPpToken::maxTokenLength)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue