• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1SKIP: FAILED
2
3void set_scalar_float4x3(inout float4x3 mat, int col, int row, float val) {
4  switch (col) {
5    case 0:
6      mat[0] = (row.xxx == int3(0, 1, 2)) ? val.xxx : mat[0];
7      break;
8    case 1:
9      mat[1] = (row.xxx == int3(0, 1, 2)) ? val.xxx : mat[1];
10      break;
11    case 2:
12      mat[2] = (row.xxx == int3(0, 1, 2)) ? val.xxx : mat[2];
13      break;
14    case 3:
15      mat[3] = (row.xxx == int3(0, 1, 2)) ? val.xxx : mat[3];
16      break;
17  }
18}
19
20struct tint_padded_array_element {
21  float el;
22};
23
24cbuffer cbuffer_x_6 : register(b1, space0) {
25  uint4 x_6[3];
26};
27cbuffer cbuffer_x_8 : register(b0, space0) {
28  uint4 x_8[4];
29};
30static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
31
32void main_1() {
33  float4x3 m43 = float4x3(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
34  tint_padded_array_element sums[3] = (tint_padded_array_element[3])0;
35  int i = 0;
36  int a = 0;
37  int x_67_phi = 0;
38  const float x_44 = asfloat(x_6[1].x);
39  const float3 x_48 = float3(0.0f, 0.0f, 0.0f);
40  m43 = float4x3(float3(x_44, 0.0f, 0.0f), float3(0.0f, x_44, 0.0f), float3(0.0f, 0.0f, x_44), float3(0.0f, 0.0f, 0.0f));
41  const uint scalar_offset = ((16u * uint(0))) / 4;
42  const int x_51 = asint(x_8[scalar_offset / 4][scalar_offset % 4]);
43  const uint scalar_offset_1 = ((16u * uint(0))) / 4;
44  const int x_53 = asint(x_8[scalar_offset_1 / 4][scalar_offset_1 % 4]);
45  const uint scalar_offset_2 = ((16u * uint(0))) / 4;
46  const float x_55 = asfloat(x_6[scalar_offset_2 / 4][scalar_offset_2 % 4]);
47  set_scalar_float4x3(m43, x_53, x_51, x_55);
48  const uint scalar_offset_3 = ((16u * uint(0))) / 4;
49  const float x_58 = asfloat(x_6[scalar_offset_3 / 4][scalar_offset_3 % 4]);
50  const uint scalar_offset_4 = ((16u * uint(0))) / 4;
51  const float x_60 = asfloat(x_6[scalar_offset_4 / 4][scalar_offset_4 % 4]);
52  const uint scalar_offset_5 = ((16u * uint(0))) / 4;
53  const float x_62 = asfloat(x_6[scalar_offset_5 / 4][scalar_offset_5 % 4]);
54  const tint_padded_array_element tint_symbol_3[3] = {{x_58}, {x_60}, {x_62}};
55  sums = tint_symbol_3;
56  const uint scalar_offset_6 = ((16u * uint(0))) / 4;
57  const int x_65 = asint(x_8[scalar_offset_6 / 4][scalar_offset_6 % 4]);
58  i = x_65;
59  x_67_phi = x_65;
60  [loop] while (true) {
61    const int x_67 = x_67_phi;
62    const int x_73 = asint(x_8[3].x);
63    if ((x_67 < x_73)) {
64    } else {
65      break;
66    }
67    const uint scalar_offset_7 = ((16u * uint(0))) / 4;
68    const int x_77 = asint(x_8[scalar_offset_7 / 4][scalar_offset_7 % 4]);
69    const uint scalar_offset_8 = ((16u * uint(0))) / 4;
70    const int x_79 = asint(x_8[scalar_offset_8 / 4][scalar_offset_8 % 4]);
71    const float x_81 = m43[x_67][x_79];
72    const float x_83 = sums[x_77].el;
73    sums[x_77].el = (x_83 + x_81);
74    {
75      const int x_68 = (x_67 + 1);
76      i = x_68;
77      x_67_phi = x_68;
78    }
79  }
80  const int x_87 = asint(x_8[1].x);
81  if ((x_87 == 1)) {
82    a = 4;
83    const int x_92 = asint(x_8[2].x);
84    const uint scalar_offset_9 = ((16u * uint(0))) / 4;
85    const int x_94 = asint(x_8[scalar_offset_9 / 4][scalar_offset_9 % 4]);
86    const float x_96 = m43[4][x_94];
87    const float x_98 = sums[x_92].el;
88    sums[x_92].el = (x_98 + x_96);
89  }
90  const int x_102 = asint(x_8[1].x);
91  const float x_104 = sums[x_102].el;
92  const uint scalar_offset_10 = ((16u * uint(0))) / 4;
93  const int x_106 = asint(x_8[scalar_offset_10 / 4][scalar_offset_10 % 4]);
94  const float x_108 = sums[x_106].el;
95  const float x_111 = asfloat(x_6[2].x);
96  if (((x_104 + x_108) == x_111)) {
97    const uint scalar_offset_11 = ((16u * uint(0))) / 4;
98    const int x_117 = asint(x_8[scalar_offset_11 / 4][scalar_offset_11 % 4]);
99    const int x_120 = asint(x_8[1].x);
100    const int x_123 = asint(x_8[1].x);
101    const uint scalar_offset_12 = ((16u * uint(0))) / 4;
102    const int x_126 = asint(x_8[scalar_offset_12 / 4][scalar_offset_12 % 4]);
103    x_GLF_color = float4(float(x_117), float(x_120), float(x_123), float(x_126));
104  } else {
105    const int x_130 = asint(x_8[1].x);
106    const float x_131 = float(x_130);
107    x_GLF_color = float4(x_131, x_131, x_131, x_131);
108  }
109  return;
110}
111
112struct main_out {
113  float4 x_GLF_color_1;
114};
115struct tint_symbol {
116  float4 x_GLF_color_1 : SV_Target0;
117};
118
119main_out main_inner() {
120  main_1();
121  const main_out tint_symbol_4 = {x_GLF_color};
122  return tint_symbol_4;
123}
124
125tint_symbol main() {
126  const main_out inner_result = main_inner();
127  tint_symbol wrapper_result = (tint_symbol)0;
128  wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
129  return wrapper_result;
130}
131C:\src\tint\test\Shader@0x00000111C3C21900(84,24-29): error X3504: array index out of bounds
132
133