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