mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-09 20:10:06 +00:00
24 lines
468 B
GLSL
24 lines
468 B
GLSL
|
|
||
|
StructuredBuffer<uint4> sbuf : register(t10);
|
||
|
RWStructuredBuffer<uint4> sbuf2;
|
||
|
|
||
|
// Not shared, because of type difference.
|
||
|
StructuredBuffer<uint3> sbuf3 : register(t12);
|
||
|
|
||
|
uint4 get(in StructuredBuffer<uint4> sb, uint bufferOffset)
|
||
|
{
|
||
|
return sb[bufferOffset];
|
||
|
}
|
||
|
|
||
|
void set(in RWStructuredBuffer<uint4> sb, uint bufferOffset, uint4 data)
|
||
|
{
|
||
|
sb[bufferOffset] = data;
|
||
|
}
|
||
|
|
||
|
float4 main(uint pos : FOO) : SV_Target0
|
||
|
{
|
||
|
set(sbuf2, 2, get(sbuf, 3));
|
||
|
|
||
|
return 0;
|
||
|
}
|