HLSL: phase 1: add RWTexture and RWBuffer
There's a lot to do for RWTexture and RWBuffer, so it will be broken up into several PRs. This is #1. This adds RWTexture and RWBuffer support, with the following limitations: * Only 4 component formats supported * No operator[] yet Those will be added in other PRs. This PR supports declarations and the Load & GetDimensions methods. New tests are added.
This commit is contained in:
parent
9065ed83b8
commit
bb0183f817
14 changed files with 2483 additions and 39 deletions
32
Test/hlsl.load.rwbuffer.dx10.frag
Normal file
32
Test/hlsl.load.rwbuffer.dx10.frag
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
|
||||
RWBuffer <float4> g_tBuffF;
|
||||
RWBuffer <int4> g_tBuffI;
|
||||
RWBuffer <uint4> g_tBuffU;
|
||||
|
||||
struct PS_OUTPUT
|
||||
{
|
||||
float4 Color : SV_Target0;
|
||||
};
|
||||
|
||||
uniform int c1;
|
||||
uniform int2 c2;
|
||||
uniform int3 c3;
|
||||
uniform int4 c4;
|
||||
|
||||
uniform int o1;
|
||||
uniform int2 o2;
|
||||
uniform int3 o3;
|
||||
uniform int4 o4;
|
||||
|
||||
PS_OUTPUT main()
|
||||
{
|
||||
PS_OUTPUT psout;
|
||||
|
||||
g_tBuffF.Load(c1);
|
||||
g_tBuffU.Load(c1);
|
||||
g_tBuffI.Load(c1);
|
||||
|
||||
psout.Color = 1.0;
|
||||
|
||||
return psout;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue