Fix #1682: flesh out more vulkan/SPV ModuleProcessed

This commit is contained in:
John Kessenich
2019-02-01 04:07:45 -07:00
parent f96d7dc2c0
commit de3b8e3bf3
3 changed files with 33 additions and 3 deletions

View File

@@ -83,6 +83,7 @@ void main()
ModuleProcessed "resource-set-binding 3"
ModuleProcessed "auto-map-locations"
ModuleProcessed "client opengl100"
ModuleProcessed "target-env spirv1.3"
ModuleProcessed "target-env opengl"
ModuleProcessed "relaxed-errors"
ModuleProcessed "suppress-warnings"

View File

@@ -74,7 +74,7 @@ inline const char* ProfileName(EProfile profile)
}
//
// What source rules, validation rules, target language, etc. are needed
// What source rules, validation rules, target language, etc. are needed or
// desired for SPIR-V?
//
// 0 means a target or rule set is not enabled (ignore rules from that entity).

View File

@@ -420,11 +420,40 @@ public:
if (spvVersion.openGl > 0)
processes.addProcess("client opengl100");
// target SPV
switch (spvVersion.spv) {
case 0:
break;
case EShTargetSpv_1_0:
break;
case EShTargetSpv_1_1:
processes.addProcess("target-env spirv1.1");
break;
case EShTargetSpv_1_2:
processes.addProcess("target-env spirv1.2");
break;
case EShTargetSpv_1_3:
processes.addProcess("target-env spirv1.3");
break;
default:
processes.addProcess("target-env spirvUnknown");
break;
}
// target-environment processes
if (spvVersion.vulkan > 0)
switch (spvVersion.vulkan) {
case 0:
break;
case EShTargetVulkan_1_0:
processes.addProcess("target-env vulkan1.0");
else if (spvVersion.vulkan > 0)
break;
case EShTargetVulkan_1_1:
processes.addProcess("target-env vulkan1.1");
break;
default:
processes.addProcess("target-env vulkanUnknown");
break;
}
if (spvVersion.openGl > 0)
processes.addProcess("target-env opengl");
}