Fix output of SPIR-V version in diagnostic (#4562)

Fixes #4552.
This commit is contained in:
Alastair Donaldson 2021-10-14 14:13:47 +01:00 committed by GitHub
parent d31218c560
commit 5ed637caa3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -318,10 +318,9 @@ spv_result_t VersionCheck(ValidationState_t& _, const Instruction* inst) {
if (module_version < min_version) {
return _.diag(SPV_ERROR_WRONG_VERSION, inst)
<< spvOpcodeString(opcode) << " requires "
<< spvTargetEnvDescription(
static_cast<spv_target_env>(min_version))
<< " at minimum.";
<< spvOpcodeString(opcode) << " requires SPIR-V version "
<< SPV_SPIRV_VERSION_MAJOR_PART(min_version) << "."
<< SPV_SPIRV_VERSION_MINOR_PART(min_version) << " at minimum.";
}
} else if (!_.HasAnyOfExtensions(exts)) {
// Otherwise, we only error out when no enabling extensions are