Add-support-for-SPV_NVX_raytracing

This commit is contained in:
Chao Chen 2018-09-19 11:42:24 -07:00
parent 3c3669904c
commit b50c02ef53
50 changed files with 5970 additions and 4184 deletions

View file

@ -701,6 +701,10 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["superp"] = SUPERP;
#ifdef NV_EXTENSIONS
(*KeywordMap)["rayPayloadNVX"] = PAYLOADNV;
(*KeywordMap)["rayPayloadInNVX"] = PAYLOADINNV;
(*KeywordMap)["hitAttributeNVX"] = HITATTRNV;
(*KeywordMap)["accelerationStructureNVX"] = ACCSTRUCTNV;
(*KeywordMap)["perprimitiveNV"] = PERPRIMITIVENV;
(*KeywordMap)["perviewNV"] = PERVIEWNV;
(*KeywordMap)["taskNV"] = PERTASKNV;
@ -944,6 +948,18 @@ int TScanContext::tokenizeIdentifier()
return identifierOrType();
return keyword;
#ifdef NV_EXTENSIONS
case PAYLOADNV:
case PAYLOADINNV:
case HITATTRNV:
case ACCSTRUCTNV:
if (parseContext.symbolTable.atBuiltInLevel() ||
(parseContext.profile != EEsProfile && parseContext.version >= 460
&& parseContext.extensionTurnedOn(E_GL_NVX_raytracing)))
return keyword;
return identifierOrType();
#endif
case ATOMIC_UINT:
if ((parseContext.profile == EEsProfile && parseContext.version >= 310) ||
parseContext.extensionTurnedOn(E_GL_ARB_shader_atomic_counters))