Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra test for push constant pointers #301

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions tests/push_constants/push_constant_basic_3.slang
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
RWStructuredBuffer<uint> result;

struct Foo{
uint s;
uint t;
};

struct Bar{
uint x_unused;
uint y;
};

struct Data{
uint a_unused;
uint b[4];
uint c;
uint d_unused[4];
Foo* foo_unused;
Bar* bar;
};
[[vk::push_constant]] Data pc;

[shader("compute")]
[numthreads(1,1,1)]
void computeMain(uint3 threadId : SV_DispatchThreadID)
{
result[0] += pc.c;
result[0] += pc.b[1];
result[0] += pc.bar->y;
}
Binary file added tests/push_constants/push_constant_basic_3.spv
Binary file not shown.
Loading
Loading