Skip to content

Commit 594aab3

Browse files
Extra test for push constant pointers
1 parent 7b89953 commit 594aab3

File tree

4 files changed

+671
-0
lines changed

4 files changed

+671
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
RWStructuredBuffer<uint> result;
2+
3+
struct Foo{
4+
uint s;
5+
uint t;
6+
};
7+
8+
struct Bar{
9+
uint x_unused;
10+
uint y;
11+
};
12+
13+
struct Data{
14+
uint a_unused;
15+
uint b[4];
16+
uint c;
17+
uint d_unused[4];
18+
Foo* foo_unused;
19+
Bar* bar;
20+
};
21+
[[vk::push_constant]] Data pc;
22+
23+
[shader("compute")]
24+
[numthreads(1,1,1)]
25+
void computeMain(uint3 threadId : SV_DispatchThreadID)
26+
{
27+
result[0] += pc.c;
28+
result[0] += pc.b[1];
29+
result[0] += pc.bar->y;
30+
}
1.81 KB
Binary file not shown.

0 commit comments

Comments
 (0)