HLSL: Wrap the entry-point; need to write 'in' args, and support 'inout' args.
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
This commit is contained in:
parent
18adbdbbb8
commit
02467d8d94
171 changed files with 37604 additions and 32679 deletions
|
|
@ -2,7 +2,7 @@ hlsl.pp.line.frag
|
|||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
0:? Sequence
|
||||
0:4 Function Definition: main( (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||
0:4 Function Definition: @main( (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||
0:4 Function Parameters:
|
||||
0:? Sequence
|
||||
0:124 Sequence
|
||||
|
|
@ -31,21 +31,27 @@ gl_FragCoord origin is upper left
|
|||
0:127 1 (const int)
|
||||
0:127 Constant:
|
||||
0:127 1.000000
|
||||
0:129 Sequence
|
||||
0:129 Sequence
|
||||
0:129 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:129 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:129 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||
0:129 Constant:
|
||||
0:129 0 (const int)
|
||||
0:129 move second child to first child (temp float)
|
||||
0:? 'Depth' (out float FragDepth)
|
||||
0:129 Depth: direct index for structure (temp float)
|
||||
0:129 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||
0:129 Constant:
|
||||
0:129 1 (const int)
|
||||
0:129 Branch: Return
|
||||
0:129 Branch: Return with expression
|
||||
0:129 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||
0:4 Function Definition: main( (temp void)
|
||||
0:4 Function Parameters:
|
||||
0:? Sequence
|
||||
0:4 Sequence
|
||||
0:4 move second child to first child (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||
0:4 'flattenTemp' (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||
0:4 Function Call: @main( (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||
0:4 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:4 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:4 'flattenTemp' (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||
0:4 Constant:
|
||||
0:4 0 (const int)
|
||||
0:4 move second child to first child (temp float)
|
||||
0:? 'Depth' (out float FragDepth)
|
||||
0:4 Depth: direct index for structure (temp float)
|
||||
0:4 'flattenTemp' (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||
0:4 Constant:
|
||||
0:4 1 (const int)
|
||||
0:? Linker Objects
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:? 'Depth' (out float FragDepth)
|
||||
|
|
@ -57,7 +63,7 @@ Linked fragment stage:
|
|||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
0:? Sequence
|
||||
0:4 Function Definition: main( (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||
0:4 Function Definition: @main( (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||
0:4 Function Parameters:
|
||||
0:? Sequence
|
||||
0:124 Sequence
|
||||
|
|
@ -86,80 +92,97 @@ gl_FragCoord origin is upper left
|
|||
0:127 1 (const int)
|
||||
0:127 Constant:
|
||||
0:127 1.000000
|
||||
0:129 Sequence
|
||||
0:129 Sequence
|
||||
0:129 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:129 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:129 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||
0:129 Constant:
|
||||
0:129 0 (const int)
|
||||
0:129 move second child to first child (temp float)
|
||||
0:? 'Depth' (out float FragDepth)
|
||||
0:129 Depth: direct index for structure (temp float)
|
||||
0:129 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||
0:129 Constant:
|
||||
0:129 1 (const int)
|
||||
0:129 Branch: Return
|
||||
0:129 Branch: Return with expression
|
||||
0:129 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||
0:4 Function Definition: main( (temp void)
|
||||
0:4 Function Parameters:
|
||||
0:? Sequence
|
||||
0:4 Sequence
|
||||
0:4 move second child to first child (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||
0:4 'flattenTemp' (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||
0:4 Function Call: @main( (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||
0:4 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:4 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:4 'flattenTemp' (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||
0:4 Constant:
|
||||
0:4 0 (const int)
|
||||
0:4 move second child to first child (temp float)
|
||||
0:? 'Depth' (out float FragDepth)
|
||||
0:4 Depth: direct index for structure (temp float)
|
||||
0:4 'flattenTemp' (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||
0:4 Constant:
|
||||
0:4 1 (const int)
|
||||
0:? Linker Objects
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:? 'Depth' (out float FragDepth)
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 35
|
||||
// Id's are bound by 42
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 27 31
|
||||
EntryPoint Fragment 4 "main" 35 39
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 8 "thisLineIs"
|
||||
Name 12 "PS_OUTPUT"
|
||||
MemberName 12(PS_OUTPUT) 0 "Color"
|
||||
MemberName 12(PS_OUTPUT) 1 "Depth"
|
||||
Name 14 "psout"
|
||||
Name 27 "Color"
|
||||
Name 31 "Depth"
|
||||
Decorate 27(Color) Location 0
|
||||
Decorate 31(Depth) BuiltIn FragDepth
|
||||
Name 8 "PS_OUTPUT"
|
||||
MemberName 8(PS_OUTPUT) 0 "Color"
|
||||
MemberName 8(PS_OUTPUT) 1 "Depth"
|
||||
Name 10 "@main("
|
||||
Name 14 "thisLineIs"
|
||||
Name 17 "psout"
|
||||
Name 32 "flattenTemp"
|
||||
Name 35 "Color"
|
||||
Name 39 "Depth"
|
||||
Decorate 35(Color) Location 0
|
||||
Decorate 39(Depth) BuiltIn FragDepth
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 1
|
||||
7: TypePointer Function 6(int)
|
||||
9: 6(int) Constant 124
|
||||
10: TypeFloat 32
|
||||
11: TypeVector 10(float) 4
|
||||
12(PS_OUTPUT): TypeStruct 11(fvec4) 10(float)
|
||||
13: TypePointer Function 12(PS_OUTPUT)
|
||||
15: 6(int) Constant 0
|
||||
18: 10(float) Constant 0
|
||||
19: 10(float) Constant 1065353216
|
||||
21: TypePointer Function 11(fvec4)
|
||||
23: 6(int) Constant 1
|
||||
24: TypePointer Function 10(float)
|
||||
26: TypePointer Output 11(fvec4)
|
||||
27(Color): 26(ptr) Variable Output
|
||||
30: TypePointer Output 10(float)
|
||||
31(Depth): 30(ptr) Variable Output
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 4
|
||||
8(PS_OUTPUT): TypeStruct 7(fvec4) 6(float)
|
||||
9: TypeFunction 8(PS_OUTPUT)
|
||||
12: TypeInt 32 1
|
||||
13: TypePointer Function 12(int)
|
||||
15: 12(int) Constant 124
|
||||
16: TypePointer Function 8(PS_OUTPUT)
|
||||
18: 12(int) Constant 0
|
||||
21: 6(float) Constant 0
|
||||
22: 6(float) Constant 1065353216
|
||||
24: TypePointer Function 7(fvec4)
|
||||
26: 12(int) Constant 1
|
||||
27: TypePointer Function 6(float)
|
||||
34: TypePointer Output 7(fvec4)
|
||||
35(Color): 34(ptr) Variable Output
|
||||
38: TypePointer Output 6(float)
|
||||
39(Depth): 38(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(thisLineIs): 7(ptr) Variable Function
|
||||
14(psout): 13(ptr) Variable Function
|
||||
Store 8(thisLineIs) 9
|
||||
16: 6(int) Load 8(thisLineIs)
|
||||
17: 10(float) ConvertSToF 16
|
||||
20: 11(fvec4) CompositeConstruct 17 18 18 19
|
||||
22: 21(ptr) AccessChain 14(psout) 15
|
||||
Store 22 20
|
||||
25: 24(ptr) AccessChain 14(psout) 23
|
||||
Store 25 19
|
||||
28: 21(ptr) AccessChain 14(psout) 15
|
||||
29: 11(fvec4) Load 28
|
||||
Store 27(Color) 29
|
||||
32: 24(ptr) AccessChain 14(psout) 23
|
||||
33: 10(float) Load 32
|
||||
Store 31(Depth) 33
|
||||
32(flattenTemp): 16(ptr) Variable Function
|
||||
33:8(PS_OUTPUT) FunctionCall 10(@main()
|
||||
Store 32(flattenTemp) 33
|
||||
36: 24(ptr) AccessChain 32(flattenTemp) 18
|
||||
37: 7(fvec4) Load 36
|
||||
Store 35(Color) 37
|
||||
40: 27(ptr) AccessChain 32(flattenTemp) 26
|
||||
41: 6(float) Load 40
|
||||
Store 39(Depth) 41
|
||||
Return
|
||||
FunctionEnd
|
||||
10(@main():8(PS_OUTPUT) Function None 9
|
||||
11: Label
|
||||
14(thisLineIs): 13(ptr) Variable Function
|
||||
17(psout): 16(ptr) Variable Function
|
||||
Store 14(thisLineIs) 15
|
||||
19: 12(int) Load 14(thisLineIs)
|
||||
20: 6(float) ConvertSToF 19
|
||||
23: 7(fvec4) CompositeConstruct 20 21 21 22
|
||||
25: 24(ptr) AccessChain 17(psout) 18
|
||||
Store 25 23
|
||||
28: 27(ptr) AccessChain 17(psout) 26
|
||||
Store 28 22
|
||||
29:8(PS_OUTPUT) Load 17(psout)
|
||||
ReturnValue 29
|
||||
FunctionEnd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue