Skip to content

Commit 8a8bb6c

Browse files
spirv-val: Add 11167 VUID label (KhronosGroup#6265)
1 parent 7318ab4 commit 8a8bb6c

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

source/val/validate_memory.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,7 @@ spv_result_t ValidateVariable(ValidationState_t& _, const Instruction* inst) {
435435
}
436436
if (spvIsVulkanEnv(_.context()->target_env)) {
437437
return _.diag(SPV_ERROR_INVALID_ID, inst)
438+
<< _.VkErrorID(11167)
438439
<< "Vulkan requires that data type be specified";
439440
}
440441
}

source/val/validation_state.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2749,6 +2749,8 @@ std::string ValidationState_t::VkErrorID(uint32_t id,
27492749
return VUID_WRAP(VUID-StandaloneSpirv-UnequalMemorySemantics-10879);
27502750
case 10880:
27512751
return VUID_WRAP(VUID-StandaloneSpirv-TessLevelInner-10880);
2752+
case 11167:
2753+
return VUID_WRAP(VUID-StandaloneSpirv-OpUntypedVariableKHR-11167);
27522754
default:
27532755
return ""; // unknown id
27542756
}

test/val/val_memory_test.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5729,6 +5729,8 @@ OpFunctionEnd
57295729

57305730
CompileSuccessfully(spirv, SPV_ENV_VULKAN_1_1);
57315731
EXPECT_EQ(SPV_ERROR_INVALID_ID, ValidateInstructions(SPV_ENV_VULKAN_1_1));
5732+
EXPECT_THAT(getDiagnosticString(),
5733+
AnyVUID("VUID-StandaloneSpirv-OpUntypedVariableKHR-11167"));
57325734
EXPECT_THAT(getDiagnosticString(),
57335735
HasSubstr("Vulkan requires that data type be specified"));
57345736
}

0 commit comments

Comments
 (0)