Merge pull request #2865 from alan-baker/update-license
[platform/upstream/glslang.git] / Test / hlsl.inoutquals.frag
1 struct PS_OUTPUT
2 {
3     float4 Color : SV_Target0;
4     float  Depth : SV_Depth;
5 };
6
7 inline void MyFunc(in float x, out float y, inout float z, in out float w)
8 {
9     y = x;
10     z = y;
11     x = -1; // no effect since x = in param
12     w *= 1;
13 }
14
15 PS_OUTPUT main(noperspective in float4 inpos : SV_Position, out int sampleMask : SV_Coverage)
16 {
17    PS_OUTPUT psout;
18
19    float x = 7, y, z = 3;
20    MyFunc(x, y, z, inpos.w);
21
22    psout.Color = float4(x, y, z, 1);
23    psout.Depth = inpos.w;
24
25    return psout;
26 }