Implement GL_EXT_demote_to_helper_invocation

This commit is contained in:
Jeff Bolz 2019-07-01 09:23:23 -05:00
parent 4162de4bbf
commit ba6170b534
18 changed files with 3618 additions and 3426 deletions

View file

@ -356,6 +356,7 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["default"] = DEFAULT;
(*KeywordMap)["if"] = IF;
(*KeywordMap)["else"] = ELSE;
(*KeywordMap)["demote"] = DEMOTE;
(*KeywordMap)["discard"] = DISCARD;
(*KeywordMap)["return"] = RETURN;
(*KeywordMap)["void"] = VOID;
@ -1621,6 +1622,12 @@ int TScanContext::tokenizeIdentifier()
return keyword;
return identifierOrType();
case DEMOTE:
if (parseContext.extensionTurnedOn(E_GL_EXT_demote_to_helper_invocation))
return keyword;
else
return identifierOrType();
default:
parseContext.infoSink.info.message(EPrefixInternalError, "Unknown glslang keyword", loc);
return 0;