blob: 6c40505360568245016a25eac911d68946cefff9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
//TEST:SIMPLE(filecheck=CHECK): -target spirv -entry main -stage compute -emit-spirv-directly
struct Tester
{
uint i;
};
struct Push
{
Tester* ptr_array[2];
uint * out_ptr;
};
[[vk::push_constant]] Push p;
// CHECK: OpEntryPoint
[shader("compute")]
[numthreads(1, 1, 1)]
void main(int id : SV_DispatchThreadID)
{
uint i = p.ptr_array[0].i;
*p.out_ptr = i;
}
|