File: hlsl.memberFunCall.frag

package info (click to toggle)
glslang 16.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 51,712 kB
  • sloc: cpp: 92,305; yacc: 4,320; sh: 603; python: 305; ansic: 94; javascript: 74; makefile: 17
file content (16 lines) | stat: -rw-r--r-- 403 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
float method3(float a) { return 1.0; }

struct myContext {
    float method1() { return method2(); }
    float method2() { return method3(1.0); }
    float method3(float a) { return method4(a, a); }
    float method4(float a, float b) { return a + b + f; }
    float f;
};

float4 main() : SV_TARGET0
{
    myContext context;
    context.f = 3.0;
    return (float4)context.method1();
}