Merge pull request #3031 from rg3igalia/sub-group-size-arb-flat-fix
[platform/upstream/glslang.git] / Test / hlsl.matrixSwizzle.vert
1 void ShaderFunction(float inf) : COLOR0
2 {
3     float3x4 m;
4
5     // tests that convert to non-matrix swizzles
6
7     m._34  = 1.0; // AST should have a normal component select
8     m._m23 = 2.0; // same code
9     m[2][3] = 2.0; // same code
10
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)
13     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
26 float3x3 createMat3x3(float3 a, float3 b, float3 c)\r
27 {\r
28     float3x3 m;\r
29     m._11_21_31 = a;\r
30     m._12_22_32 = b;\r
31     m._13_23_33 = c;\r
32     return m;\r
33 }