Skip to content

Commit 81e1a40

Browse files
committed
fix address space mapping for SPIR
1 parent 04cabdd commit 81e1a40

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clang/lib/Basic/Targets/SPIR.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static const unsigned SPIRDefIsPrivMap[] = {
5050
2, // hlsl_constant
5151
10, // hlsl_private
5252
11, // hlsl_device
53-
12, // hlsl_input
53+
7, // hlsl_input
5454
// Wasm address space values for this target are dummy values,
5555
// as it is only enabled for Wasm targets.
5656
20, // wasm_funcref
@@ -86,7 +86,7 @@ static const unsigned SPIRDefIsGenMap[] = {
8686
0, // hlsl_constant
8787
10, // hlsl_private
8888
11, // hlsl_device
89-
12, // hlsl_input
89+
7, // hlsl_input
9090
// Wasm address space values for this target are dummy values,
9191
// as it is only enabled for Wasm targets.
9292
20, // wasm_funcref

clang/test/CodeGenHLSL/vk-input-builtin.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
[[vk::ext_builtin_input(/* WorkgroupId */ 26)]]
55
static const uint3 groupid;
6-
// CHECK: @_ZL7groupid = local_unnamed_addr addrspace(12) externally_initialized constant <3 x i32> undef, align 16, !spv.builtin [[META0:![0-9]+]]
6+
// CHECK: @_ZL7groupid = local_unnamed_addr addrspace(7) externally_initialized constant <3 x i32> undef, align 16, !spv.builtin [[META0:![0-9]+]]
77

88
RWStructuredBuffer<int> output : register(u1, space0);
99

0 commit comments

Comments
 (0)