Merge pull request #1507 from sparmarNV/fix-SPV_NV_mesh_shader

Add ES 320 support and additional error checks for SPV_NV_mesh_shader
This commit is contained in:
John Kessenich 2018-09-28 06:24:02 -06:00 committed by GitHub
commit 4508a8170a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 1416 additions and 1097 deletions

View file

@ -361,13 +361,16 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TS
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangMissNV, source,
infoSink, commonTable, symbolTables);
}
// check for mesh
if (profile != EEsProfile && version >= 450)
if ((profile != EEsProfile && version >= 450) ||
(profile == EEsProfile && version >= 320))
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangMeshNV, source,
infoSink, commonTable, symbolTables);
// check for task
if (profile != EEsProfile && version >= 450)
if ((profile != EEsProfile && version >= 450) ||
(profile == EEsProfile && version >= 320))
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangTaskNV, source,
infoSink, commonTable, symbolTables);
#endif
@ -610,11 +613,11 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo
break;
case EShLangMeshNV:
case EShLangTaskNV:
if ((profile == EEsProfile) ||
if ((profile == EEsProfile && version < 320) ||
(profile != EEsProfile && version < 450)) {
correct = false;
infoSink.info.message(EPrefixError, "#version: mesh/task shaders require non-es profile with version 450 or above");
version = 450;
infoSink.info.message(EPrefixError, "#version: mesh/task shaders require es profile with version 320 or above, or non-es profile with version 450 or above");
version = profile == EEsProfile ? 320 : 450;
}
#endif
default: