SPIRV-Cross/reference/shaders-hlsl/comp/address-buffers.comp
2017-08-15 09:39:45 +02:00

16 lines
373 B
Plaintext

RWByteAddressBuffer WriteOnly : register(u2);
ByteAddressBuffer ReadOnly : register(u0);
RWByteAddressBuffer ReadWrite : register(u1);
void comp_main()
{
WriteOnly.Store4(0, asuint(asfloat(ReadOnly.Load4(0))));
ReadWrite.Store4(0, asuint(asfloat(ReadWrite.Load4(0)) + float4(10.0f, 10.0f, 10.0f, 10.0f)));
}
[numthreads(1, 1, 1)]
void main()
{
comp_main();
}