Skip to content

Commit c7164d0

Browse files
committed
Test multiple variable with same spec id.
1 parent 973e9ce commit c7164d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/test/CodeGenHLSL/vk-features/vk.spec-constant.hlsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[[vk::constant_id(1)]]
77
const bool bool_const = true;
88

9-
[[vk::constant_id(2)]]
9+
[[vk::constant_id(1)]]
1010
const short short_const = 4;
1111

1212
[[vk::constant_id(3)]]
@@ -124,7 +124,7 @@ void main() {
124124
// CHECK-SAME: ) #[[ATTR3]] {
125125
// CHECK-NEXT: [[ENTRY:.*:]]
126126
// CHECK-NEXT: [[TMP0:%.*]] = call token @llvm.experimental.convergence.entry()
127-
// CHECK-NEXT: [[TMP1:%.*]] = call i16 @_Z20__spirv_SpecConstantis(i32 2, i16 4)
127+
// CHECK-NEXT: [[TMP1:%.*]] = call i16 @_Z20__spirv_SpecConstantis(i32 1, i16 4)
128128
// CHECK-NEXT: store i16 [[TMP1]], ptr addrspace(10) @_ZL11short_const, align 2
129129
// CHECK-NEXT: ret void
130130
//

0 commit comments

Comments
 (0)