Add-support-for-SPV_NV_fragment_shader_barycentric

This commit is contained in:
Chao Chen 2018-09-19 11:39:56 -07:00
parent 6dd4757f0f
commit 9eada4b971
19 changed files with 4369 additions and 4061 deletions

View file

@ -691,6 +691,9 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["__explicitInterpAMD"] = EXPLICITINTERPAMD;
#endif
(*KeywordMap)["centroid"] = CENTROID;
#ifdef NV_EXTENSIONS
(*KeywordMap)["pervertexNV"] = PERVERTEXNV;
#endif
(*KeywordMap)["precise"] = PRECISE;
(*KeywordMap)["invariant"] = INVARIANT;
(*KeywordMap)["packed"] = PACKED;
@ -1507,6 +1510,15 @@ int TScanContext::tokenizeIdentifier()
return identifierOrType();
#endif
#ifdef NV_EXTENSIONS
case PERVERTEXNV:
if (((parseContext.profile != EEsProfile && parseContext.version >= 450) ||
(parseContext.profile == EEsProfile && parseContext.version >= 320)) &&
parseContext.extensionTurnedOn(E_GL_NV_fragment_shader_barycentric))
return keyword;
return identifierOrType();
#endif
case FLAT:
if (parseContext.profile == EEsProfile && parseContext.version < 300)
reservedWord();