Add support for GL_NV_shader_invocation_reorder. (#3054)

This commit is contained in:
alelenv 2022-12-09 12:19:08 -08:00 committed by GitHub
parent 19d816c8c9
commit 4fc43cd3c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 7478 additions and 5636 deletions

View file

@ -765,6 +765,9 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["icoopmatNV"] = ICOOPMATNV;
(*KeywordMap)["ucoopmatNV"] = UCOOPMATNV;
(*KeywordMap)["hitObjectNV"] = HITOBJECTNV;
(*KeywordMap)["hitObjectAttributeNV"] = HITOBJECTATTRNV;
ReservedSet = new std::unordered_set<const char*, str_hash, str_eq>;
ReservedSet->insert("common");
@ -1789,6 +1792,20 @@ int TScanContext::tokenizeIdentifier()
parseContext.extensionTurnedOn(E_GL_EXT_spirv_intrinsics))
return keyword;
return identifierOrType();
case HITOBJECTNV:
if (parseContext.symbolTable.atBuiltInLevel() ||
(!parseContext.isEsProfile() && parseContext.version >= 460
&& parseContext.extensionTurnedOn(E_GL_NV_shader_invocation_reorder)))
return keyword;
return identifierOrType();
case HITOBJECTATTRNV:
if (parseContext.symbolTable.atBuiltInLevel() ||
(!parseContext.isEsProfile() && parseContext.version >= 460
&& parseContext.extensionTurnedOn(E_GL_NV_shader_invocation_reorder)))
return keyword;
return identifierOrType();
#endif
default: