Debian Codegraph @

third_party/spirv-cross/reference/shaders-hlsl/asm/frag/lut-promotion-initializer.asm.frag

raw
1 static const float _46[16] = { 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f };
2 static const float4 _76[4] = { 0.0f.xxxx, 1.0f.xxxx, 8.0f.xxxx, 5.0f.xxxx };
3 static const float4 _90[4] = { 20.0f.xxxx, 30.0f.xxxx, 50.0f.xxxx, 60.0f.xxxx };
4
5 static float FragColor;
6 static int index;
7
8 struct SPIRV_Cross_Input
9 {
10 nointerpolation int index : TEXCOORD0;
11 };
12
13 struct SPIRV_Cross_Output
14 {
15 float FragColor : SV_Target0;
16 };
17
18 void frag_main()
19 {
20 float4 foobar[4] = _76;
21 float4 baz[4] = _76;
22 FragColor = _46[index];
23 if (index < 10)
24 {
25 FragColor += _46[index ^ 1];
26 }
27 else
28 {
29 FragColor += _46[index & 1];
30 }
31 if (index > 30)
32 {
33 FragColor += _76[index & 3].y;
34 }
35 else
36 {
37 FragColor += _76[index & 1].x;
38 }
39 if (index > 30)
40 {
41 foobar[1].z = 20.0f;
42 }
43 FragColor += foobar[index & 3].z;
44 baz = _90;
45 FragColor += baz[index & 3].z;
46 }
47
48 SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
49 {
50 index = stage_input.index;
51 frag_main();
52 SPIRV_Cross_Output stage_output;
53 stage_output.FragColor = FragColor;
54 return stage_output;
55 }