Debian Codegraph @

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

raw
1 // RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
2 // RUN: spirv-unknown-vulkan1.3-compute %s -emit-llvm -O3 -o - | FileCheck %s
3
4 [[vk::ext_builtin_input(/* WorkgroupId */ 26)]]
5 static const uint3 groupid;
6 // CHECK: @_ZL7groupid = external hidden local_unnamed_addr addrspace(7) externally_initialized constant <3 x i32>, align 16, !spirv.Decorations [[META0:![0-9]+]]
7
8 RWStructuredBuffer<int> output : register(u1, space0);
9
10 [numthreads(1, 1, 1)]
11 void main() {
12 output[0] = groupid;
13 }
14 // CHECK: [[META0]] = !{[[META1:![0-9]+]]}
15 // CHECK: [[META1]] = !{i32 11, i32 26}