1 2StructuredBuffer<uint4> sbuf : register(t10); 3 4uint4 get(in StructuredBuffer<uint4> sb, uint bufferOffset) 5{ 6 return sb[bufferOffset]; 7} 8 9void set(in RWStructuredBuffer<uint4> sb, uint bufferOffset, uint4 data) 10{ 11 sb[bufferOffset] = data; 12} 13 14RWStructuredBuffer<uint4> sbuf2; 15 16// Not shared, because of type difference. 17StructuredBuffer<uint3> sbuf3 : register(t12); 18 19float4 main(uint pos : FOO) : SV_Target0 20{ 21 set(sbuf2, 2, get(sbuf, 3)); 22 23 return 0; 24} 25