mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-08 11:30:06 +00:00
bb0183f817
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.
33 lines
435 B
GLSL
33 lines
435 B
GLSL
|
|
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;
|
|
}
|