mirror of
https://github.com/RPCS3/glslang.git
synced 2024-12-03 16:41:30 +00:00
02467d8d94
This needs some render testing, but is destined to be part of master. This also leads to a variety of other simplifications. - IO are global symbols, so only need one list of linkage nodes (deferred) - no longer need parse-context-wide 'inEntryPoint' state, entry-point is localized - several parts of splitting/flattening are now localized
306 lines
17 KiB
Plaintext
306 lines
17 KiB
Plaintext
hlsl.logical.unary.frag
|
|
Shader version: 450
|
|
gl_FragCoord origin is upper left
|
|
0:? Sequence
|
|
0:12 Function Definition: @main( (temp structure{temp 4-component vector of float Color})
|
|
0:12 Function Parameters:
|
|
0:? Sequence
|
|
0:13 Negate conditional (temp bool)
|
|
0:13 Convert int to bool (temp bool)
|
|
0:13 ival: direct index for structure (layout(offset=0 ) uniform int)
|
|
0:13 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int ival, layout(offset=16 ) uniform 4-component vector of int ival4, layout(offset=32 ) uniform float fval, layout(offset=48 ) uniform 4-component vector of float fval4})
|
|
0:13 Constant:
|
|
0:13 0 (const uint)
|
|
0:14 Negate conditional (temp 4-component vector of bool)
|
|
0:14 Convert int to bool (temp 4-component vector of bool)
|
|
0:14 ival4: direct index for structure (layout(offset=16 ) uniform 4-component vector of int)
|
|
0:14 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int ival, layout(offset=16 ) uniform 4-component vector of int ival4, layout(offset=32 ) uniform float fval, layout(offset=48 ) uniform 4-component vector of float fval4})
|
|
0:14 Constant:
|
|
0:14 1 (const uint)
|
|
0:16 Negate conditional (temp bool)
|
|
0:16 Convert float to bool (temp bool)
|
|
0:16 fval: direct index for structure (layout(offset=32 ) uniform float)
|
|
0:16 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int ival, layout(offset=16 ) uniform 4-component vector of int ival4, layout(offset=32 ) uniform float fval, layout(offset=48 ) uniform 4-component vector of float fval4})
|
|
0:16 Constant:
|
|
0:16 2 (const uint)
|
|
0:17 Negate conditional (temp 4-component vector of bool)
|
|
0:17 Convert float to bool (temp 4-component vector of bool)
|
|
0:17 fval4: direct index for structure (layout(offset=48 ) uniform 4-component vector of float)
|
|
0:17 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int ival, layout(offset=16 ) uniform 4-component vector of int ival4, layout(offset=32 ) uniform float fval, layout(offset=48 ) uniform 4-component vector of float fval4})
|
|
0:17 Constant:
|
|
0:17 3 (const uint)
|
|
0:19 Test condition and select (temp void)
|
|
0:19 Condition
|
|
0:19 ival: direct index for structure (layout(offset=0 ) uniform int)
|
|
0:19 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int ival, layout(offset=16 ) uniform 4-component vector of int ival4, layout(offset=32 ) uniform float fval, layout(offset=48 ) uniform 4-component vector of float fval4})
|
|
0:19 Constant:
|
|
0:19 0 (const uint)
|
|
0:19 true case is null
|
|
0:20 Test condition and select (temp void)
|
|
0:20 Condition
|
|
0:20 fval: direct index for structure (layout(offset=32 ) uniform float)
|
|
0:20 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int ival, layout(offset=16 ) uniform 4-component vector of int ival4, layout(offset=32 ) uniform float fval, layout(offset=48 ) uniform 4-component vector of float fval4})
|
|
0:20 Constant:
|
|
0:20 2 (const uint)
|
|
0:20 true case is null
|
|
0:21 Test condition and select (temp void)
|
|
0:21 Condition
|
|
0:21 Negate conditional (temp bool)
|
|
0:21 Convert int to bool (temp bool)
|
|
0:21 ival: direct index for structure (layout(offset=0 ) uniform int)
|
|
0:21 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int ival, layout(offset=16 ) uniform 4-component vector of int ival4, layout(offset=32 ) uniform float fval, layout(offset=48 ) uniform 4-component vector of float fval4})
|
|
0:21 Constant:
|
|
0:21 0 (const uint)
|
|
0:21 true case is null
|
|
0:22 Test condition and select (temp void)
|
|
0:22 Condition
|
|
0:22 Negate conditional (temp bool)
|
|
0:22 Convert float to bool (temp bool)
|
|
0:22 fval: direct index for structure (layout(offset=32 ) uniform float)
|
|
0:22 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int ival, layout(offset=16 ) uniform 4-component vector of int ival4, layout(offset=32 ) uniform float fval, layout(offset=48 ) uniform 4-component vector of float fval4})
|
|
0:22 Constant:
|
|
0:22 2 (const uint)
|
|
0:22 true case is null
|
|
0:25 move second child to first child (temp 4-component vector of float)
|
|
0:25 Color: direct index for structure (temp 4-component vector of float)
|
|
0:25 'psout' (temp structure{temp 4-component vector of float Color})
|
|
0:25 Constant:
|
|
0:25 0 (const int)
|
|
0:25 Constant:
|
|
0:25 1.000000
|
|
0:25 1.000000
|
|
0:25 1.000000
|
|
0:25 1.000000
|
|
0:26 Branch: Return with expression
|
|
0:26 'psout' (temp structure{temp 4-component vector of float Color})
|
|
0:12 Function Definition: main( (temp void)
|
|
0:12 Function Parameters:
|
|
0:? Sequence
|
|
0:12 Sequence
|
|
0:12 move second child to first child (temp 4-component vector of float)
|
|
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
|
0:12 Color: direct index for structure (temp 4-component vector of float)
|
|
0:12 Function Call: @main( (temp structure{temp 4-component vector of float Color})
|
|
0:12 Constant:
|
|
0:12 0 (const int)
|
|
0:? Linker Objects
|
|
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
|
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int ival, layout(offset=16 ) uniform 4-component vector of int ival4, layout(offset=32 ) uniform float fval, layout(offset=48 ) uniform 4-component vector of float fval4})
|
|
|
|
|
|
Linked fragment stage:
|
|
|
|
|
|
Shader version: 450
|
|
gl_FragCoord origin is upper left
|
|
0:? Sequence
|
|
0:12 Function Definition: @main( (temp structure{temp 4-component vector of float Color})
|
|
0:12 Function Parameters:
|
|
0:? Sequence
|
|
0:13 Negate conditional (temp bool)
|
|
0:13 Convert int to bool (temp bool)
|
|
0:13 ival: direct index for structure (layout(offset=0 ) uniform int)
|
|
0:13 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int ival, layout(offset=16 ) uniform 4-component vector of int ival4, layout(offset=32 ) uniform float fval, layout(offset=48 ) uniform 4-component vector of float fval4})
|
|
0:13 Constant:
|
|
0:13 0 (const uint)
|
|
0:14 Negate conditional (temp 4-component vector of bool)
|
|
0:14 Convert int to bool (temp 4-component vector of bool)
|
|
0:14 ival4: direct index for structure (layout(offset=16 ) uniform 4-component vector of int)
|
|
0:14 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int ival, layout(offset=16 ) uniform 4-component vector of int ival4, layout(offset=32 ) uniform float fval, layout(offset=48 ) uniform 4-component vector of float fval4})
|
|
0:14 Constant:
|
|
0:14 1 (const uint)
|
|
0:16 Negate conditional (temp bool)
|
|
0:16 Convert float to bool (temp bool)
|
|
0:16 fval: direct index for structure (layout(offset=32 ) uniform float)
|
|
0:16 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int ival, layout(offset=16 ) uniform 4-component vector of int ival4, layout(offset=32 ) uniform float fval, layout(offset=48 ) uniform 4-component vector of float fval4})
|
|
0:16 Constant:
|
|
0:16 2 (const uint)
|
|
0:17 Negate conditional (temp 4-component vector of bool)
|
|
0:17 Convert float to bool (temp 4-component vector of bool)
|
|
0:17 fval4: direct index for structure (layout(offset=48 ) uniform 4-component vector of float)
|
|
0:17 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int ival, layout(offset=16 ) uniform 4-component vector of int ival4, layout(offset=32 ) uniform float fval, layout(offset=48 ) uniform 4-component vector of float fval4})
|
|
0:17 Constant:
|
|
0:17 3 (const uint)
|
|
0:19 Test condition and select (temp void)
|
|
0:19 Condition
|
|
0:19 ival: direct index for structure (layout(offset=0 ) uniform int)
|
|
0:19 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int ival, layout(offset=16 ) uniform 4-component vector of int ival4, layout(offset=32 ) uniform float fval, layout(offset=48 ) uniform 4-component vector of float fval4})
|
|
0:19 Constant:
|
|
0:19 0 (const uint)
|
|
0:19 true case is null
|
|
0:20 Test condition and select (temp void)
|
|
0:20 Condition
|
|
0:20 fval: direct index for structure (layout(offset=32 ) uniform float)
|
|
0:20 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int ival, layout(offset=16 ) uniform 4-component vector of int ival4, layout(offset=32 ) uniform float fval, layout(offset=48 ) uniform 4-component vector of float fval4})
|
|
0:20 Constant:
|
|
0:20 2 (const uint)
|
|
0:20 true case is null
|
|
0:21 Test condition and select (temp void)
|
|
0:21 Condition
|
|
0:21 Negate conditional (temp bool)
|
|
0:21 Convert int to bool (temp bool)
|
|
0:21 ival: direct index for structure (layout(offset=0 ) uniform int)
|
|
0:21 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int ival, layout(offset=16 ) uniform 4-component vector of int ival4, layout(offset=32 ) uniform float fval, layout(offset=48 ) uniform 4-component vector of float fval4})
|
|
0:21 Constant:
|
|
0:21 0 (const uint)
|
|
0:21 true case is null
|
|
0:22 Test condition and select (temp void)
|
|
0:22 Condition
|
|
0:22 Negate conditional (temp bool)
|
|
0:22 Convert float to bool (temp bool)
|
|
0:22 fval: direct index for structure (layout(offset=32 ) uniform float)
|
|
0:22 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int ival, layout(offset=16 ) uniform 4-component vector of int ival4, layout(offset=32 ) uniform float fval, layout(offset=48 ) uniform 4-component vector of float fval4})
|
|
0:22 Constant:
|
|
0:22 2 (const uint)
|
|
0:22 true case is null
|
|
0:25 move second child to first child (temp 4-component vector of float)
|
|
0:25 Color: direct index for structure (temp 4-component vector of float)
|
|
0:25 'psout' (temp structure{temp 4-component vector of float Color})
|
|
0:25 Constant:
|
|
0:25 0 (const int)
|
|
0:25 Constant:
|
|
0:25 1.000000
|
|
0:25 1.000000
|
|
0:25 1.000000
|
|
0:25 1.000000
|
|
0:26 Branch: Return with expression
|
|
0:26 'psout' (temp structure{temp 4-component vector of float Color})
|
|
0:12 Function Definition: main( (temp void)
|
|
0:12 Function Parameters:
|
|
0:? Sequence
|
|
0:12 Sequence
|
|
0:12 move second child to first child (temp 4-component vector of float)
|
|
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
|
0:12 Color: direct index for structure (temp 4-component vector of float)
|
|
0:12 Function Call: @main( (temp structure{temp 4-component vector of float Color})
|
|
0:12 Constant:
|
|
0:12 0 (const int)
|
|
0:? Linker Objects
|
|
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
|
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int ival, layout(offset=16 ) uniform 4-component vector of int ival4, layout(offset=32 ) uniform float fval, layout(offset=48 ) uniform 4-component vector of float fval4})
|
|
|
|
// Module Version 10000
|
|
// Generated by (magic number): 80001
|
|
// Id's are bound by 82
|
|
|
|
Capability Shader
|
|
1: ExtInstImport "GLSL.std.450"
|
|
MemoryModel Logical GLSL450
|
|
EntryPoint Fragment 4 "main" 79
|
|
ExecutionMode 4 OriginUpperLeft
|
|
Name 4 "main"
|
|
Name 8 "PS_OUTPUT"
|
|
MemberName 8(PS_OUTPUT) 0 "Color"
|
|
Name 10 "@main("
|
|
Name 14 "$Global"
|
|
MemberName 14($Global) 0 "ival"
|
|
MemberName 14($Global) 1 "ival4"
|
|
MemberName 14($Global) 2 "fval"
|
|
MemberName 14($Global) 3 "fval4"
|
|
Name 16 ""
|
|
Name 70 "psout"
|
|
Name 79 "Color"
|
|
MemberDecorate 14($Global) 0 Offset 0
|
|
MemberDecorate 14($Global) 1 Offset 16
|
|
MemberDecorate 14($Global) 2 Offset 32
|
|
MemberDecorate 14($Global) 3 Offset 48
|
|
Decorate 14($Global) Block
|
|
Decorate 16 DescriptorSet 0
|
|
Decorate 79(Color) Location 0
|
|
2: TypeVoid
|
|
3: TypeFunction 2
|
|
6: TypeFloat 32
|
|
7: TypeVector 6(float) 4
|
|
8(PS_OUTPUT): TypeStruct 7(fvec4)
|
|
9: TypeFunction 8(PS_OUTPUT)
|
|
12: TypeInt 32 1
|
|
13: TypeVector 12(int) 4
|
|
14($Global): TypeStruct 12(int) 13(ivec4) 6(float) 7(fvec4)
|
|
15: TypePointer Uniform 14($Global)
|
|
16: 15(ptr) Variable Uniform
|
|
17: 12(int) Constant 0
|
|
18: TypePointer Uniform 12(int)
|
|
21: TypeBool
|
|
22: TypeInt 32 0
|
|
23: 22(int) Constant 0
|
|
26: 12(int) Constant 1
|
|
27: TypePointer Uniform 13(ivec4)
|
|
30: TypeVector 21(bool) 4
|
|
31: TypeVector 22(int) 4
|
|
32: 31(ivec4) ConstantComposite 23 23 23 23
|
|
35: 12(int) Constant 2
|
|
36: TypePointer Uniform 6(float)
|
|
39: 6(float) Constant 0
|
|
42: 12(int) Constant 3
|
|
43: TypePointer Uniform 7(fvec4)
|
|
46: 7(fvec4) ConstantComposite 39 39 39 39
|
|
69: TypePointer Function 8(PS_OUTPUT)
|
|
71: 6(float) Constant 1065353216
|
|
72: 7(fvec4) ConstantComposite 71 71 71 71
|
|
73: TypePointer Function 7(fvec4)
|
|
78: TypePointer Output 7(fvec4)
|
|
79(Color): 78(ptr) Variable Output
|
|
4(main): 2 Function None 3
|
|
5: Label
|
|
80:8(PS_OUTPUT) FunctionCall 10(@main()
|
|
81: 7(fvec4) CompositeExtract 80 0
|
|
Store 79(Color) 81
|
|
Return
|
|
FunctionEnd
|
|
10(@main():8(PS_OUTPUT) Function None 9
|
|
11: Label
|
|
70(psout): 69(ptr) Variable Function
|
|
19: 18(ptr) AccessChain 16 17
|
|
20: 12(int) Load 19
|
|
24: 21(bool) INotEqual 20 23
|
|
25: 21(bool) LogicalNot 24
|
|
28: 27(ptr) AccessChain 16 26
|
|
29: 13(ivec4) Load 28
|
|
33: 30(bvec4) INotEqual 29 32
|
|
34: 30(bvec4) LogicalNot 33
|
|
37: 36(ptr) AccessChain 16 35
|
|
38: 6(float) Load 37
|
|
40: 21(bool) FOrdNotEqual 38 39
|
|
41: 21(bool) LogicalNot 40
|
|
44: 43(ptr) AccessChain 16 42
|
|
45: 7(fvec4) Load 44
|
|
47: 30(bvec4) FOrdNotEqual 45 46
|
|
48: 30(bvec4) LogicalNot 47
|
|
49: 18(ptr) AccessChain 16 17
|
|
50: 12(int) Load 49
|
|
SelectionMerge 52 None
|
|
BranchConditional 50 51 52
|
|
51: Label
|
|
Branch 52
|
|
52: Label
|
|
53: 36(ptr) AccessChain 16 35
|
|
54: 6(float) Load 53
|
|
SelectionMerge 56 None
|
|
BranchConditional 54 55 56
|
|
55: Label
|
|
Branch 56
|
|
56: Label
|
|
57: 18(ptr) AccessChain 16 17
|
|
58: 12(int) Load 57
|
|
59: 21(bool) INotEqual 58 23
|
|
60: 21(bool) LogicalNot 59
|
|
SelectionMerge 62 None
|
|
BranchConditional 60 61 62
|
|
61: Label
|
|
Branch 62
|
|
62: Label
|
|
63: 36(ptr) AccessChain 16 35
|
|
64: 6(float) Load 63
|
|
65: 21(bool) FOrdNotEqual 64 39
|
|
66: 21(bool) LogicalNot 65
|
|
SelectionMerge 68 None
|
|
BranchConditional 66 67 68
|
|
67: Label
|
|
Branch 68
|
|
68: Label
|
|
74: 73(ptr) AccessChain 70(psout) 17
|
|
Store 74 72
|
|
75:8(PS_OUTPUT) Load 70(psout)
|
|
ReturnValue 75
|
|
FunctionEnd
|