|
| 1 | +// RUN: %dxc -T vs_6_2 -E main |
| 2 | + |
| 3 | +// CHECK: OpDecorate %in_var_A Location 0 |
| 4 | +// CHECK: OpDecorate %in_var_B Location 4 |
| 5 | +// CHECK: OpDecorate %in_var_C Location 6 |
| 6 | +// CHECK: OpDecorate %in_var_D Location 7 |
| 7 | +// CHECK: OpDecorate %in_var_E Location 8 |
| 8 | + |
| 9 | +// CHECK: OpDecorate %out_var_A Location 0 |
| 10 | +// CHECK: OpDecorate %out_var_B Location 2 |
| 11 | +// CHECK: OpDecorate %out_var_C Location 6 |
| 12 | +// CHECK: OpDecorate %out_var_D Location 7 |
| 13 | +// CHECK: OpDecorate %out_var_E Location 8 |
| 14 | + |
| 15 | +// CHECK: OpDecorate %in_var_A RelaxedPrecision |
| 16 | +// CHECK: OpDecorate %in_var_B RelaxedPrecision |
| 17 | +// CHECK: OpDecorate %in_var_C RelaxedPrecision |
| 18 | +// CHECK: OpDecorate %in_var_D RelaxedPrecision |
| 19 | +// CHECK: OpDecorate %in_var_E RelaxedPrecision |
| 20 | + |
| 21 | +// CHECK: OpDecorate %out_var_A RelaxedPrecision |
| 22 | +// CHECK: OpDecorate %out_var_B RelaxedPrecision |
| 23 | +// CHECK: OpDecorate %out_var_C RelaxedPrecision |
| 24 | +// CHECK: OpDecorate %out_var_D RelaxedPrecision |
| 25 | +// CHECK: OpDecorate %out_var_E RelaxedPrecision |
| 26 | + |
| 27 | +// CHECK: %float = OpTypeFloat 32 |
| 28 | +// CHECK-NOT: %half = OpTypeFloat 16 |
| 29 | + |
| 30 | +// CHECK: %in_var_A = OpVariable %_ptr_Input__arr_v2float_uint_4 Input |
| 31 | +// CHECK: %in_var_B = OpVariable %_ptr_Input__arr_v3uint_uint_2 Input |
| 32 | +// CHECK: %in_var_C = OpVariable %_ptr_Input_int Input |
| 33 | +// CHECK: %in_var_D = OpVariable %_ptr_Input_v2uint Input |
| 34 | +// CHECK: %in_var_E = OpVariable %_ptr_Input_mat3v2float Input |
| 35 | + |
| 36 | +// CHECK: %out_var_A = OpVariable %_ptr_Output_mat2v3float Output |
| 37 | +// CHECK: %out_var_B = OpVariable %_ptr_Output__arr_v2int_uint_4 Output |
| 38 | +// CHECK: %out_var_C = OpVariable %_ptr_Output_float Output |
| 39 | +// CHECK: %out_var_D = OpVariable %_ptr_Output_v2int Output |
| 40 | +// CHECK: %out_var_E = OpVariable %_ptr_Output_v3uint Output |
| 41 | + |
| 42 | +struct VSOut { |
| 43 | + min16float2x3 outA : A; // 2 locations: 0, 1 |
| 44 | + min16int2 outB[4] : B; // 4 locations: 2, 3, 4, 5 |
| 45 | + min16float outC : C; // 1 location : 6 |
| 46 | + min16int2 outD : D; // 1 location : 7 |
| 47 | + min16uint3 outE : E; // 1 location : 8 |
| 48 | +}; |
| 49 | + |
| 50 | +VSOut main( |
| 51 | + min16float2 inA[4] : A, // 4 locations: 0, 1, 2, 3 |
| 52 | + min16uint2x3 inB : B, // 2 locations: 4, 5 |
| 53 | + min16int inC : C, // 1 location : 6 |
| 54 | + min16uint2 inD : D, // 1 location : 7 |
| 55 | + min16float3x2 inE : E // 3 location : 8, 9, 10 |
| 56 | +) { |
| 57 | + VSOut o; |
| 58 | + o.outA = inA[0].x; |
| 59 | + o.outB[0] = inB[0][0]; |
| 60 | + o.outC = inC.x; |
| 61 | + o.outD = inD[0]; |
| 62 | + o.outE = inE[0][0]; |
| 63 | + return o; |
| 64 | +} |
0 commit comments