spirv-val: Label VUID 06997 (#4881)

This commit is contained in:
Spencer Fricke 2022-08-03 23:42:13 +09:00 committed by GitHub
parent 54cd5e1963
commit 08c542d344
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

View File

@ -233,7 +233,7 @@ spv_result_t ValidateMemoryScope(ValidationState_t& _, const Instruction* inst,
!_.HasCapability(SpvCapabilitySubgroupBallotKHR) &&
!_.HasCapability(SpvCapabilitySubgroupVoteKHR)) {
return _.diag(SPV_ERROR_INVALID_DATA, inst)
<< spvOpcodeString(opcode)
<< _.VkErrorID(6997) << spvOpcodeString(opcode)
<< ": in Vulkan 1.0 environment Memory Scope is can not be "
"Subgroup without SubgroupBallotKHR or SubgroupVoteKHR "
"declared";

View File

@ -1977,6 +1977,8 @@ std::string ValidationState_t::VkErrorID(uint32_t id,
return VUID_WRAP(VUID-StandaloneSpirv-PushConstant-06808);
case 6925:
return VUID_WRAP(VUID-StandaloneSpirv-Uniform-06925);
case 6997:
return VUID_WRAP(VUID-StandaloneSpirv-SubgroupVoteKHR-06997);
default:
return ""; // unknown id
}

View File

@ -359,6 +359,8 @@ OpControlBarrier %subgroup %subgroup %none
CompileSuccessfully(GenerateShaderCode(body), SPV_ENV_VULKAN_1_0);
ASSERT_EQ(SPV_ERROR_INVALID_DATA, ValidateInstructions(SPV_ENV_VULKAN_1_0));
EXPECT_THAT(getDiagnosticString(),
AnyVUID("VUID-StandaloneSpirv-SubgroupVoteKHR-06997"));
EXPECT_THAT(
getDiagnosticString(),
HasSubstr(
@ -765,6 +767,8 @@ OpMemoryBarrier %subgroup %acquire_release_uniform_workgroup
CompileSuccessfully(GenerateShaderCode(body), SPV_ENV_VULKAN_1_0);
ASSERT_EQ(SPV_ERROR_INVALID_DATA, ValidateInstructions(SPV_ENV_VULKAN_1_0));
EXPECT_THAT(getDiagnosticString(),
AnyVUID("VUID-StandaloneSpirv-SubgroupVoteKHR-06997"));
EXPECT_THAT(
getDiagnosticString(),
HasSubstr(