1// Test register class offsets for different resource types 2 3SamplerState s1 : register(s1, space1); 4SamplerComparisonState s2 : register(s2, space2); 5 6Texture1D <float4> t1 : register(t1, space1); 7Texture2D <float4> t2 : register(t2, space1); 8Texture3D <float4> t3 : register(t1, space2); 9Texture3D <float4> ts6 : register(t1, space6); 10StructuredBuffer<float4> t4 : register(t1, space3); 11 12ByteAddressBuffer t5 : register(t2, space3); 13Buffer<float4> t6 : register(t3, space3); 14 15RWTexture1D <float4> u1 : register(u1, space1); 16RWTexture2D <float4> u2 : register(u2, space2); 17RWTexture3D <float4> u3 : register(u3, space2); 18 19RWBuffer <float> u4 : register(u4, space1); 20RWByteAddressBuffer u5 : register(u4, space2); 21RWStructuredBuffer<float> u6 : register(u4, space3); 22AppendStructuredBuffer<float> u7 : register(u4, space4); 23ConsumeStructuredBuffer<float> u8 : register(u4, space5); 24 25cbuffer cb : register(b1, space6) { 26 int cb1; 27}; 28 29tbuffer tb : register(t7) { 30 int tb1; 31}; 32 33float4 main() : SV_Target0 34{ 35 t1; 36 t2; 37 t3; 38 t4[0]; 39 t5.Load(0); 40 t6; 41 42 s1; 43 s2; 44 45 u1; 46 u2; 47 u3; 48 49 u4[0]; 50 u5.Load(0); 51 u6[0]; 52 u7; 53 u8; 54 55 cb1; 56 tb1; 57 ts6; 58 59 return 0; 60} 61