blob: c06996b31f693ae52723fd11efc29eb603bfdc07 [file] [log] [blame]
John Kessenich001dfa12017-01-12 16:51:18 -07001void ShaderFunction(float inf) : COLOR0
2{
3 float3x4 m;
4
John Kessenichfdf63472017-01-13 12:27:52 -07005 // tests that convert to non-matrix swizzles
6
John Kessenich001dfa12017-01-12 16:51:18 -07007 m._34 = 1.0; // AST should have a normal component select
8 m._m23 = 2.0; // same code
John Kessenichfdf63472017-01-13 12:27:52 -07009 m[2][3] = 2.0; // same code
John Kessenich001dfa12017-01-12 16:51:18 -070010
11 m._11_12_13_14 = float4(3.0); // AST should have normal column selection (first row)
12 m._m10_m11_m12_m13 = float4(3.0); // AST should have normal column selection (second row)
John Kessenichfdf63472017-01-13 12:27:52 -070013 m[1] = float4(3.0); // same code
14
15 // tests that stay as matrix swizzles
16
17 float3 f3;
18 m._11_22_23 = f3;
19 m._21_12_31 = float3(5.0);
20 m._11_12_21 = 2 * f3;
21
22 // r-value
23 f3 = m._21_12_31;
24}
25
26float3x3 createMat3x3(float3 a, float3 b, float3 c)
27{
28 float3x3 m;
29 m._11_21_31 = a;
30 m._12_22_32 = b;
31 m._13_23_33 = c;
32 return m;
John Kessenich001dfa12017-01-12 16:51:18 -070033}