Add a test for buffer auto-binding assignment.
This commit is contained in:
parent
3e47f5f7c8
commit
e4fe8b5c44
3 changed files with 118 additions and 0 deletions
28
Test/spv.buffer.autoassign.frag
Normal file
28
Test/spv.buffer.autoassign.frag
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
|
||||
cbuffer MyUB1 : register(b5) // explicitly assigned & offsetted
|
||||
{
|
||||
float g_a;
|
||||
int g_b;
|
||||
};
|
||||
|
||||
cbuffer MyUB2 // implicitly assigned
|
||||
{
|
||||
float g_c;
|
||||
};
|
||||
|
||||
cbuffer MyUB3 // implicitly assigned
|
||||
{
|
||||
float g_d;
|
||||
};
|
||||
|
||||
struct PS_OUTPUT
|
||||
{
|
||||
float4 Color : SV_Target0;
|
||||
};
|
||||
|
||||
PS_OUTPUT main()
|
||||
{
|
||||
PS_OUTPUT psout;
|
||||
psout.Color = g_a + g_b + g_c + g_d;
|
||||
return psout;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue