Skip to content

Commit a53e6ce

Browse files
bashbaugjsji
authored andcommitted
fixes a new validation failure in a UniformId test (#3301)
A recent spirv-val change requires that OpDecorateId IDs are well-ordered, which means that the decoration operand ID cannot be the same as the decoration target ID. See: KhronosGroup/SPIRV-Tools#6227 This leads to the failure: ``` error: line 6: Parameter <ID> '2[%uint_0]' must appear earlier in the binary than the target OpDecorateId %uint_0 UniformId %uint_0 ``` The fix is to use a different ID for the decoration operand and the decoration target. Original commit: KhronosGroup/SPIRV-LLVM-Translator@fc5873ee760c333
1 parent 3f93d42 commit a53e6ce

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm-spirv/test/DecorateUniformId.spvasm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
OpCapability UniformDecoration
1616
OpMemoryModel Physical64 OpenCL
1717
OpEntryPoint Kernel %2 "test"
18-
OpDecorateId %uint_0 UniformId %uint_0
18+
OpDecorateId %tgt_uint_0 UniformId %op_uint_0
1919
%uint = OpTypeInt 32 0
20-
%uint_0 = OpConstant %uint 0
20+
%op_uint_0 = OpConstant %uint 0
21+
%tgt_uint_0 = OpConstant %uint 0
2122
%void = OpTypeVoid
2223
%1 = OpTypeFunction %void
2324
%2 = OpFunction %void None %1

0 commit comments

Comments
 (0)