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,9 +2,9 @@ hlsl.doLoop.frag
|
|||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
0:? Sequence
|
||||
0:2 Function Definition: PixelShaderFunction(vf4; (temp 4-component vector of float)
|
||||
0:2 Function Definition: @PixelShaderFunction(vf4; (temp 4-component vector of float)
|
||||
0:2 Function Parameters:
|
||||
0:2 'input' (layout(location=0 ) in 4-component vector of float)
|
||||
0:2 'input' (in 4-component vector of float)
|
||||
0:? Sequence
|
||||
0:3 Loop with condition not tested first
|
||||
0:3 Loop Condition
|
||||
|
|
@ -20,14 +20,21 @@ gl_FragCoord origin is upper left
|
|||
0:5 Loop Condition
|
||||
0:5 all (temp bool)
|
||||
0:5 Equal (temp 4-component vector of bool)
|
||||
0:5 'input' (layout(location=0 ) in 4-component vector of float)
|
||||
0:5 'input' (layout(location=0 ) in 4-component vector of float)
|
||||
0:5 'input' (in 4-component vector of float)
|
||||
0:5 'input' (in 4-component vector of float)
|
||||
0:5 Loop Body
|
||||
0:5 Sequence
|
||||
0:5 move second child to first child (temp 4-component vector of float)
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
|
||||
0:5 'input' (layout(location=0 ) in 4-component vector of float)
|
||||
0:5 Branch: Return
|
||||
0:5 Branch: Return with expression
|
||||
0:5 'input' (in 4-component vector of float)
|
||||
0:2 Function Definition: PixelShaderFunction( (temp void)
|
||||
0:2 Function Parameters:
|
||||
0:? Sequence
|
||||
0:2 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'input' (temp 4-component vector of float)
|
||||
0:? 'input' (layout(location=0 ) in 4-component vector of float)
|
||||
0:2 move second child to first child (temp 4-component vector of float)
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
|
||||
0:2 Function Call: @PixelShaderFunction(vf4; (temp 4-component vector of float)
|
||||
0:? 'input' (temp 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
|
||||
0:? 'input' (layout(location=0 ) in 4-component vector of float)
|
||||
|
|
@ -39,9 +46,9 @@ Linked fragment stage:
|
|||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
0:? Sequence
|
||||
0:2 Function Definition: PixelShaderFunction(vf4; (temp 4-component vector of float)
|
||||
0:2 Function Definition: @PixelShaderFunction(vf4; (temp 4-component vector of float)
|
||||
0:2 Function Parameters:
|
||||
0:2 'input' (layout(location=0 ) in 4-component vector of float)
|
||||
0:2 'input' (in 4-component vector of float)
|
||||
0:? Sequence
|
||||
0:3 Loop with condition not tested first
|
||||
0:3 Loop Condition
|
||||
|
|
@ -57,77 +64,103 @@ gl_FragCoord origin is upper left
|
|||
0:5 Loop Condition
|
||||
0:5 all (temp bool)
|
||||
0:5 Equal (temp 4-component vector of bool)
|
||||
0:5 'input' (layout(location=0 ) in 4-component vector of float)
|
||||
0:5 'input' (layout(location=0 ) in 4-component vector of float)
|
||||
0:5 'input' (in 4-component vector of float)
|
||||
0:5 'input' (in 4-component vector of float)
|
||||
0:5 Loop Body
|
||||
0:5 Sequence
|
||||
0:5 move second child to first child (temp 4-component vector of float)
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
|
||||
0:5 'input' (layout(location=0 ) in 4-component vector of float)
|
||||
0:5 Branch: Return
|
||||
0:5 Branch: Return with expression
|
||||
0:5 'input' (in 4-component vector of float)
|
||||
0:2 Function Definition: PixelShaderFunction( (temp void)
|
||||
0:2 Function Parameters:
|
||||
0:? Sequence
|
||||
0:2 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'input' (temp 4-component vector of float)
|
||||
0:? 'input' (layout(location=0 ) in 4-component vector of float)
|
||||
0:2 move second child to first child (temp 4-component vector of float)
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
|
||||
0:2 Function Call: @PixelShaderFunction(vf4; (temp 4-component vector of float)
|
||||
0:? 'input' (temp 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
|
||||
0:? 'input' (layout(location=0 ) in 4-component vector of float)
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 33
|
||||
// Id's are bound by 44
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "PixelShaderFunction" 23 25
|
||||
EntryPoint Fragment 4 "PixelShaderFunction" 37 40
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "PixelShaderFunction"
|
||||
Name 23 "@entryPointOutput"
|
||||
Name 25 "input"
|
||||
Decorate 23(@entryPointOutput) Location 0
|
||||
Decorate 25(input) Location 0
|
||||
Name 11 "@PixelShaderFunction(vf4;"
|
||||
Name 10 "input"
|
||||
Name 35 "input"
|
||||
Name 37 "input"
|
||||
Name 40 "@entryPointOutput"
|
||||
Name 41 "param"
|
||||
Decorate 37(input) Location 0
|
||||
Decorate 40(@entryPointOutput) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
10: TypeBool
|
||||
11: 10(bool) ConstantFalse
|
||||
20: TypeFloat 32
|
||||
21: TypeVector 20(float) 4
|
||||
22: TypePointer Output 21(fvec4)
|
||||
23(@entryPointOutput): 22(ptr) Variable Output
|
||||
24: TypePointer Input 21(fvec4)
|
||||
25(input): 24(ptr) Variable Input
|
||||
30: TypeVector 10(bool) 4
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 4
|
||||
8: TypePointer Function 7(fvec4)
|
||||
9: TypeFunction 7(fvec4) 8(ptr)
|
||||
17: TypeBool
|
||||
18: 17(bool) ConstantFalse
|
||||
31: TypeVector 17(bool) 4
|
||||
36: TypePointer Input 7(fvec4)
|
||||
37(input): 36(ptr) Variable Input
|
||||
39: TypePointer Output 7(fvec4)
|
||||
40(@entryPointOutput): 39(ptr) Variable Output
|
||||
4(PixelShaderFunction): 2 Function None 3
|
||||
5: Label
|
||||
Branch 6
|
||||
6: Label
|
||||
LoopMerge 8 9 None
|
||||
Branch 7
|
||||
7: Label
|
||||
Branch 9
|
||||
9: Label
|
||||
BranchConditional 11 6 8
|
||||
8: Label
|
||||
Branch 12
|
||||
35(input): 8(ptr) Variable Function
|
||||
41(param): 8(ptr) Variable Function
|
||||
38: 7(fvec4) Load 37(input)
|
||||
Store 35(input) 38
|
||||
42: 7(fvec4) Load 35(input)
|
||||
Store 41(param) 42
|
||||
43: 7(fvec4) FunctionCall 11(@PixelShaderFunction(vf4;) 41(param)
|
||||
Store 40(@entryPointOutput) 43
|
||||
Return
|
||||
FunctionEnd
|
||||
11(@PixelShaderFunction(vf4;): 7(fvec4) Function None 9
|
||||
10(input): 8(ptr) FunctionParameter
|
||||
12: Label
|
||||
LoopMerge 14 15 None
|
||||
Branch 13
|
||||
13: Label
|
||||
Branch 15
|
||||
15: Label
|
||||
BranchConditional 11 12 14
|
||||
LoopMerge 15 16 None
|
||||
Branch 14
|
||||
14: Label
|
||||
Branch 16
|
||||
16: Label
|
||||
LoopMerge 18 19 None
|
||||
Branch 17
|
||||
17: Label
|
||||
26: 21(fvec4) Load 25(input)
|
||||
Store 23(@entryPointOutput) 26
|
||||
Return
|
||||
BranchConditional 18 13 15
|
||||
15: Label
|
||||
Branch 19
|
||||
19: Label
|
||||
28: 21(fvec4) Load 25(input)
|
||||
29: 21(fvec4) Load 25(input)
|
||||
31: 30(bvec4) FOrdEqual 28 29
|
||||
32: 10(bool) All 31
|
||||
BranchConditional 32 16 18
|
||||
18: Label
|
||||
Return
|
||||
LoopMerge 21 22 None
|
||||
Branch 20
|
||||
20: Label
|
||||
Branch 22
|
||||
22: Label
|
||||
BranchConditional 18 19 21
|
||||
21: Label
|
||||
Branch 23
|
||||
23: Label
|
||||
LoopMerge 25 26 None
|
||||
Branch 24
|
||||
24: Label
|
||||
27: 7(fvec4) Load 10(input)
|
||||
ReturnValue 27
|
||||
26: Label
|
||||
29: 7(fvec4) Load 10(input)
|
||||
30: 7(fvec4) Load 10(input)
|
||||
32: 31(bvec4) FOrdEqual 29 30
|
||||
33: 17(bool) All 32
|
||||
BranchConditional 33 23 25
|
||||
25: Label
|
||||
34: 7(fvec4) Undef
|
||||
ReturnValue 34
|
||||
FunctionEnd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue