Add reflection queries for thread local size and ssbo auto-binding
New command line option --shift-ssbo-binding mirrors --shift-ubo-binding, etc. New reflection query getLocalSize(int dim) queries local size, e.g, CS threads.
This commit is contained in:
parent
5da1f038d8
commit
932bb5cc4e
11 changed files with 265 additions and 15 deletions
24
Test/spv.ssbo.autoassign.frag
Normal file
24
Test/spv.ssbo.autoassign.frag
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
|
||||
cbuffer TestCB
|
||||
{
|
||||
uint W;
|
||||
uint H;
|
||||
};
|
||||
|
||||
struct BufType
|
||||
{
|
||||
float4 va;
|
||||
float4 vb;
|
||||
};
|
||||
|
||||
StructuredBuffer < BufType > SB0;
|
||||
RWStructuredBuffer < BufType > SB1;
|
||||
|
||||
float4 main(float4 pos : POS) : SV_Target0
|
||||
{
|
||||
float4 vTmp = SB0[pos.y * W + pos.x].va + SB0[pos.y * W + pos.x].vb;
|
||||
|
||||
vTmp += SB1[pos.y * W + pos.x].va + SB1[pos.y * W + pos.x].vb;
|
||||
|
||||
return vTmp;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue