Skip to content

Commit

Permalink
Extra test for push constant pointers (#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
spencer-lunarg authored Jan 21, 2025
1 parent 7b89953 commit c637858
Show file tree
Hide file tree
Showing 4 changed files with 671 additions and 0 deletions.
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

0 comments on commit c637858

Please sign in to comment.