Debian Codegraph @

clang/test/CodeGenHLSL/vk-features/vk.pushconstant.access.hlsl

raw
1 // RUN: %clang_cc1 -triple spirv-pc-vulkan-compute -x hlsl -emit-llvm -finclude-default-header -disable-llvm-passes -o - %s | FileCheck %s
2
3 struct S {
4 uint a;
5 };
6 // CHECK: %struct.S = type { i32 }
7
8 [[vk::push_constant]] S buffer;
9 // CHECK: @buffer = external hidden addrspace(13) externally_initialized global %struct.S, align 1
10
11 [numthreads(1, 1, 1)]
12 void main() {
13 uint32_t v = buffer.a;
14 // CHECK: %[[#REG:]] = load i32, ptr addrspace(13) @buffer, align 1
15 // CHECK: store i32 %[[#REG]], ptr %v, align 4
16 }