Add-support-for-SPV_NV_mesh_shader

This commit is contained in:
Chao Chen 2018-09-19 11:41:59 -07:00
parent 3a1379667d
commit 3c3669904c
41 changed files with 6976 additions and 4237 deletions

View file

@ -700,6 +700,12 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["resource"] = RESOURCE;
(*KeywordMap)["superp"] = SUPERP;
#ifdef NV_EXTENSIONS
(*KeywordMap)["perprimitiveNV"] = PERPRIMITIVENV;
(*KeywordMap)["perviewNV"] = PERVIEWNV;
(*KeywordMap)["taskNV"] = PERTASKNV;
#endif
ReservedSet = new std::unordered_set<const char*, str_hash, str_eq>;
ReservedSet->insert("common");
@ -1565,6 +1571,16 @@ int TScanContext::tokenizeIdentifier()
return identifierOrReserved(reserved);
}
#ifdef NV_EXTENSIONS
case PERPRIMITIVENV:
case PERVIEWNV:
case PERTASKNV:
if (parseContext.profile != EEsProfile &&
(parseContext.version >= 450 || parseContext.extensionTurnedOn(E_GL_NV_mesh_shader)))
return keyword;
return identifierOrType();
#endif
default:
parseContext.infoSink.info.message(EPrefixInternalError, "Unknown glslang keyword", loc);
return 0;