glslang/Test/baseResults/hlsl.init2.frag.out
John Kessenich 085b833490 HLSL: Fix issue #658: Don't adopt initializer constness from declaration.
This also makes it match how GLSL handles the same thing.
2017-01-05 10:28:26 -07:00

518 lines
22 KiB
Plaintext

hlsl.init2.frag
Shader version: 450
gl_FragCoord origin is upper left
0:? Sequence
0:3 Function Definition: Test1( (temp void)
0:3 Function Parameters:
0:? Sequence
0:5 Sequence
0:5 move second child to first child (temp structure{temp 2-component vector of float a})
0:5 'test1' (temp structure{temp 2-component vector of float a})
0:5 Constant:
0:5 1.000000
0:5 2.000000
0:9 Sequence
0:9 move second child to first child (temp structure{temp 2-component vector of float a})
0:9 'test2' (temp structure{temp 2-component vector of float a})
0:9 Constant:
0:9 3.000000
0:9 4.000000
0:17 Sequence
0:17 move second child to first child (temp float)
0:17 'test4' (temp float)
0:17 Constant:
0:17 7.000000
0:20 Sequence
0:20 move second child to first child (temp structure{temp float a, temp float b, temp float c})
0:20 'test5' (temp structure{temp float a, temp float b, temp float c})
0:20 Constant:
0:20 8.000000
0:20 9.000000
0:20 10.000000
0:22 Constant:
0:22 10.000000
0:25 Sequence
0:25 move second child to first child (temp float)
0:25 'n' (temp float)
0:25 Constant:
0:25 0.000000
0:26 Sequence
0:26 move second child to first child (temp 8-element array of 3-component vector of float)
0:26 'a' (const (read only) 8-element array of 3-component vector of float)
0:26 Construct vec3 (temp 8-element array of 3-component vector of float)
0:27 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? 0.577350
0:? 0.577350
0:? 0.577350
0:27 add second child into first child (temp float)
0:27 'n' (temp float)
0:27 Constant:
0:27 1.000000
0:28 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? -0.577350
0:? -0.577350
0:? -0.577350
0:28 add second child into first child (temp float)
0:28 'n' (temp float)
0:28 Constant:
0:28 1.000000
0:29 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? -0.577350
0:? -0.577350
0:? 0.577350
0:29 add second child into first child (temp float)
0:29 'n' (temp float)
0:29 Constant:
0:29 1.000000
0:30 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? -0.577350
0:? 0.577350
0:? -0.577350
0:30 add second child into first child (temp float)
0:30 'n' (temp float)
0:30 Constant:
0:30 1.000000
0:31 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? -0.577350
0:? 0.577350
0:? 0.577350
0:31 add second child into first child (temp float)
0:31 'n' (temp float)
0:31 Constant:
0:31 1.000000
0:32 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? 0.577350
0:? -0.577350
0:? -0.577350
0:32 add second child into first child (temp float)
0:32 'n' (temp float)
0:32 Constant:
0:32 1.000000
0:33 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? 0.577350
0:? -0.577350
0:? 0.577350
0:33 add second child into first child (temp float)
0:33 'n' (temp float)
0:33 Constant:
0:33 1.000000
0:34 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? 0.577350
0:? 0.577350
0:? -0.577350
0:34 add second child into first child (temp float)
0:34 'n' (temp float)
0:34 Constant:
0:34 1.000000
0:36 Sequence
0:36 move second child to first child (temp structure{temp 3-component vector of float a})
0:36 'oneNonConst' (const (read only) structure{temp 3-component vector of float a})
0:36 Construct structure (temp structure{temp 3-component vector of float a})
0:36 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? -0.577350
0:? 0.577350
0:? 0.577350
0:36 add second child into first child (temp float)
0:36 'n' (temp float)
0:36 Constant:
0:36 1.000000
0:38 Sequence
0:38 move second child to first child (temp structure{temp 3-component vector of float a, temp 3-component vector of float b})
0:38 'twoNonConst' (const (read only) structure{temp 3-component vector of float a, temp 3-component vector of float b})
0:38 Construct structure (temp structure{temp 3-component vector of float a, temp 3-component vector of float b})
0:38 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? -0.577350
0:? 0.577350
0:? 0.577350
0:38 add second child into first child (temp float)
0:38 'n' (temp float)
0:38 Constant:
0:38 1.000000
0:39 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? -0.577350
0:? 0.577350
0:? 0.577350
0:39 add second child into first child (temp float)
0:39 'n' (temp float)
0:39 Constant:
0:39 1.000000
0:45 Function Definition: main( (temp structure{temp 4-component vector of float color})
0:45 Function Parameters:
0:? Sequence
0:46 Function Call: Test1( (temp void)
0:49 move second child to first child (temp 4-component vector of float)
0:49 color: direct index for structure (temp 4-component vector of float)
0:49 'ps_output' (temp structure{temp 4-component vector of float color})
0:49 Constant:
0:49 0 (const int)
0:49 Constant:
0:49 1.000000
0:49 1.000000
0:49 1.000000
0:49 1.000000
0:50 Sequence
0:50 Sequence
0:50 move second child to first child (temp 4-component vector of float)
0:? 'color' (layout(location=0 ) out 4-component vector of float)
0:50 color: direct index for structure (temp 4-component vector of float)
0:50 'ps_output' (temp structure{temp 4-component vector of float color})
0:50 Constant:
0:50 0 (const int)
0:50 Branch: Return
0:? Linker Objects
0:? 'color' (layout(location=0 ) out 4-component vector of float)
Linked fragment stage:
Shader version: 450
gl_FragCoord origin is upper left
0:? Sequence
0:3 Function Definition: Test1( (temp void)
0:3 Function Parameters:
0:? Sequence
0:5 Sequence
0:5 move second child to first child (temp structure{temp 2-component vector of float a})
0:5 'test1' (temp structure{temp 2-component vector of float a})
0:5 Constant:
0:5 1.000000
0:5 2.000000
0:9 Sequence
0:9 move second child to first child (temp structure{temp 2-component vector of float a})
0:9 'test2' (temp structure{temp 2-component vector of float a})
0:9 Constant:
0:9 3.000000
0:9 4.000000
0:17 Sequence
0:17 move second child to first child (temp float)
0:17 'test4' (temp float)
0:17 Constant:
0:17 7.000000
0:20 Sequence
0:20 move second child to first child (temp structure{temp float a, temp float b, temp float c})
0:20 'test5' (temp structure{temp float a, temp float b, temp float c})
0:20 Constant:
0:20 8.000000
0:20 9.000000
0:20 10.000000
0:22 Constant:
0:22 10.000000
0:25 Sequence
0:25 move second child to first child (temp float)
0:25 'n' (temp float)
0:25 Constant:
0:25 0.000000
0:26 Sequence
0:26 move second child to first child (temp 8-element array of 3-component vector of float)
0:26 'a' (const (read only) 8-element array of 3-component vector of float)
0:26 Construct vec3 (temp 8-element array of 3-component vector of float)
0:27 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? 0.577350
0:? 0.577350
0:? 0.577350
0:27 add second child into first child (temp float)
0:27 'n' (temp float)
0:27 Constant:
0:27 1.000000
0:28 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? -0.577350
0:? -0.577350
0:? -0.577350
0:28 add second child into first child (temp float)
0:28 'n' (temp float)
0:28 Constant:
0:28 1.000000
0:29 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? -0.577350
0:? -0.577350
0:? 0.577350
0:29 add second child into first child (temp float)
0:29 'n' (temp float)
0:29 Constant:
0:29 1.000000
0:30 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? -0.577350
0:? 0.577350
0:? -0.577350
0:30 add second child into first child (temp float)
0:30 'n' (temp float)
0:30 Constant:
0:30 1.000000
0:31 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? -0.577350
0:? 0.577350
0:? 0.577350
0:31 add second child into first child (temp float)
0:31 'n' (temp float)
0:31 Constant:
0:31 1.000000
0:32 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? 0.577350
0:? -0.577350
0:? -0.577350
0:32 add second child into first child (temp float)
0:32 'n' (temp float)
0:32 Constant:
0:32 1.000000
0:33 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? 0.577350
0:? -0.577350
0:? 0.577350
0:33 add second child into first child (temp float)
0:33 'n' (temp float)
0:33 Constant:
0:33 1.000000
0:34 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? 0.577350
0:? 0.577350
0:? -0.577350
0:34 add second child into first child (temp float)
0:34 'n' (temp float)
0:34 Constant:
0:34 1.000000
0:36 Sequence
0:36 move second child to first child (temp structure{temp 3-component vector of float a})
0:36 'oneNonConst' (const (read only) structure{temp 3-component vector of float a})
0:36 Construct structure (temp structure{temp 3-component vector of float a})
0:36 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? -0.577350
0:? 0.577350
0:? 0.577350
0:36 add second child into first child (temp float)
0:36 'n' (temp float)
0:36 Constant:
0:36 1.000000
0:38 Sequence
0:38 move second child to first child (temp structure{temp 3-component vector of float a, temp 3-component vector of float b})
0:38 'twoNonConst' (const (read only) structure{temp 3-component vector of float a, temp 3-component vector of float b})
0:38 Construct structure (temp structure{temp 3-component vector of float a, temp 3-component vector of float b})
0:38 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? -0.577350
0:? 0.577350
0:? 0.577350
0:38 add second child into first child (temp float)
0:38 'n' (temp float)
0:38 Constant:
0:38 1.000000
0:39 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? -0.577350
0:? 0.577350
0:? 0.577350
0:39 add second child into first child (temp float)
0:39 'n' (temp float)
0:39 Constant:
0:39 1.000000
0:45 Function Definition: main( (temp structure{temp 4-component vector of float color})
0:45 Function Parameters:
0:? Sequence
0:46 Function Call: Test1( (temp void)
0:49 move second child to first child (temp 4-component vector of float)
0:49 color: direct index for structure (temp 4-component vector of float)
0:49 'ps_output' (temp structure{temp 4-component vector of float color})
0:49 Constant:
0:49 0 (const int)
0:49 Constant:
0:49 1.000000
0:49 1.000000
0:49 1.000000
0:49 1.000000
0:50 Sequence
0:50 Sequence
0:50 move second child to first child (temp 4-component vector of float)
0:? 'color' (layout(location=0 ) out 4-component vector of float)
0:50 color: direct index for structure (temp 4-component vector of float)
0:50 'ps_output' (temp structure{temp 4-component vector of float color})
0:50 Constant:
0:50 0 (const int)
0:50 Branch: Return
0:? Linker Objects
0:? 'color' (layout(location=0 ) out 4-component vector of float)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 107
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 103
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 6 "Test1("
Name 10 "mystruct"
MemberName 10(mystruct) 0 "a"
Name 12 "test1"
Name 17 "test2"
Name 23 "test4"
Name 25 "mystruct2"
MemberName 25(mystruct2) 0 "a"
MemberName 25(mystruct2) 1 "b"
MemberName 25(mystruct2) 2 "c"
Name 27 "test5"
Name 32 "n"
Name 39 "a"
Name 75 "one"
MemberName 75(one) 0 "a"
Name 77 "oneNonConst"
Name 82 "two"
MemberName 82(two) 0 "a"
MemberName 82(two) 1 "b"
Name 84 "twoNonConst"
Name 94 "PS_OUTPUT"
MemberName 94(PS_OUTPUT) 0 "color"
Name 96 "ps_output"
Name 103 "color"
Decorate 103(color) Location 0
2: TypeVoid
3: TypeFunction 2
8: TypeFloat 32
9: TypeVector 8(float) 2
10(mystruct): TypeStruct 9(fvec2)
11: TypePointer Function 10(mystruct)
13: 8(float) Constant 1065353216
14: 8(float) Constant 1073741824
15: 9(fvec2) ConstantComposite 13 14
16:10(mystruct) ConstantComposite 15
18: 8(float) Constant 1077936128
19: 8(float) Constant 1082130432
20: 9(fvec2) ConstantComposite 18 19
21:10(mystruct) ConstantComposite 20
22: TypePointer Function 8(float)
24: 8(float) Constant 1088421888
25(mystruct2): TypeStruct 8(float) 8(float) 8(float)
26: TypePointer Function 25(mystruct2)
28: 8(float) Constant 1090519040
29: 8(float) Constant 1091567616
30: 8(float) Constant 1092616192
31:25(mystruct2) ConstantComposite 28 29 30
33: 8(float) Constant 0
34: TypeVector 8(float) 3
35: TypeInt 32 0
36: 35(int) Constant 8
37: TypeArray 34(fvec3) 36
38: TypePointer Function 37
40: 8(float) Constant 1058262330
41: 34(fvec3) ConstantComposite 40 40 40
45: 8(float) Constant 3205745978
46: 34(fvec3) ConstantComposite 45 45 45
50: 34(fvec3) ConstantComposite 45 45 40
54: 34(fvec3) ConstantComposite 45 40 45
58: 34(fvec3) ConstantComposite 45 40 40
62: 34(fvec3) ConstantComposite 40 45 45
66: 34(fvec3) ConstantComposite 40 45 40
70: 34(fvec3) ConstantComposite 40 40 45
75(one): TypeStruct 34(fvec3)
76: TypePointer Function 75(one)
82(two): TypeStruct 34(fvec3) 34(fvec3)
83: TypePointer Function 82(two)
93: TypeVector 8(float) 4
94(PS_OUTPUT): TypeStruct 93(fvec4)
95: TypePointer Function 94(PS_OUTPUT)
97: TypeInt 32 1
98: 97(int) Constant 0
99: 93(fvec4) ConstantComposite 13 13 13 13
100: TypePointer Function 93(fvec4)
102: TypePointer Output 93(fvec4)
103(color): 102(ptr) Variable Output
4(main): 2 Function None 3
5: Label
96(ps_output): 95(ptr) Variable Function
92: 2 FunctionCall 6(Test1()
101: 100(ptr) AccessChain 96(ps_output) 98
Store 101 99
104: 100(ptr) AccessChain 96(ps_output) 98
105: 93(fvec4) Load 104
Store 103(color) 105
Return
FunctionEnd
6(Test1(): 2 Function None 3
7: Label
12(test1): 11(ptr) Variable Function
17(test2): 11(ptr) Variable Function
23(test4): 22(ptr) Variable Function
27(test5): 26(ptr) Variable Function
32(n): 22(ptr) Variable Function
39(a): 38(ptr) Variable Function
77(oneNonConst): 76(ptr) Variable Function
84(twoNonConst): 83(ptr) Variable Function
Store 12(test1) 16
Store 17(test2) 21
Store 23(test4) 24
Store 27(test5) 31
Store 32(n) 33
42: 8(float) Load 32(n)
43: 8(float) FAdd 42 13
Store 32(n) 43
44: 34(fvec3) VectorTimesScalar 41 43
47: 8(float) Load 32(n)
48: 8(float) FAdd 47 13
Store 32(n) 48
49: 34(fvec3) VectorTimesScalar 46 48
51: 8(float) Load 32(n)
52: 8(float) FAdd 51 13
Store 32(n) 52
53: 34(fvec3) VectorTimesScalar 50 52
55: 8(float) Load 32(n)
56: 8(float) FAdd 55 13
Store 32(n) 56
57: 34(fvec3) VectorTimesScalar 54 56
59: 8(float) Load 32(n)
60: 8(float) FAdd 59 13
Store 32(n) 60
61: 34(fvec3) VectorTimesScalar 58 60
63: 8(float) Load 32(n)
64: 8(float) FAdd 63 13
Store 32(n) 64
65: 34(fvec3) VectorTimesScalar 62 64
67: 8(float) Load 32(n)
68: 8(float) FAdd 67 13
Store 32(n) 68
69: 34(fvec3) VectorTimesScalar 66 68
71: 8(float) Load 32(n)
72: 8(float) FAdd 71 13
Store 32(n) 72
73: 34(fvec3) VectorTimesScalar 70 72
74: 37 CompositeConstruct 44 49 53 57 61 65 69 73
Store 39(a) 74
78: 8(float) Load 32(n)
79: 8(float) FAdd 78 13
Store 32(n) 79
80: 34(fvec3) VectorTimesScalar 58 79
81: 75(one) CompositeConstruct 80
Store 77(oneNonConst) 81
85: 8(float) Load 32(n)
86: 8(float) FAdd 85 13
Store 32(n) 86
87: 34(fvec3) VectorTimesScalar 58 86
88: 8(float) Load 32(n)
89: 8(float) FAdd 88 13
Store 32(n) 89
90: 34(fvec3) VectorTimesScalar 58 89
91: 82(two) CompositeConstruct 87 90
Store 84(twoNonConst) 91
Return
FunctionEnd