Add support for spirv1.6
Add command line support which enables the following behavior: - Remap discard Map discard to DemoteToHelperInvocation for HLSL shaders. Map to OpTerminateInvocation for GLSL shaders. - Decorate HelperInvocation with Volatile - Use localSizeId for execution mode WorkGroupSize is deprecated in spirv1.6 Also update known goods to SPIRV 1.6
This commit is contained in:
@@ -68,6 +68,26 @@ spv_target_env MapToSpirvToolsEnv(const SpvVersion& spvVersion, spv::SpvBuildLog
|
||||
}
|
||||
case glslang::EShTargetVulkan_1_2:
|
||||
return spv_target_env::SPV_ENV_VULKAN_1_2;
|
||||
case glslang::EShTargetUniversal:
|
||||
switch (spvVersion.spv) {
|
||||
case EShTargetSpv_1_0:
|
||||
return spv_target_env::SPV_ENV_UNIVERSAL_1_0;
|
||||
case EShTargetSpv_1_1:
|
||||
return spv_target_env::SPV_ENV_UNIVERSAL_1_1;
|
||||
case EShTargetSpv_1_2:
|
||||
return spv_target_env::SPV_ENV_UNIVERSAL_1_2;
|
||||
case EShTargetSpv_1_3:
|
||||
return spv_target_env::SPV_ENV_UNIVERSAL_1_3;
|
||||
case EShTargetSpv_1_4:
|
||||
return spv_target_env::SPV_ENV_UNIVERSAL_1_4;
|
||||
case EShTargetSpv_1_5:
|
||||
return spv_target_env::SPV_ENV_UNIVERSAL_1_5;
|
||||
case EShTargetSpv_1_6:
|
||||
return spv_target_env::SPV_ENV_UNIVERSAL_1_6;
|
||||
default:
|
||||
logger->missingFunctionality("Target version for SPIRV-Tools validator");
|
||||
return spv_target_env::SPV_ENV_UNIVERSAL_1_6;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user