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:
@@ -2,9 +2,9 @@ hlsl.scope.frag
|
||||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
0:? Sequence
|
||||
0:2 Function Definition: PixelShaderFunction(vf4; (temp void)
|
||||
0:2 Function Definition: @PixelShaderFunction(vf4; (temp void)
|
||||
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:4 'x' (temp int)
|
||||
0:? Sequence
|
||||
@@ -37,6 +37,14 @@ gl_FragCoord origin is upper left
|
||||
0:29 Constant:
|
||||
0:29 0 (const int)
|
||||
0:27 No loop body
|
||||
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 Function Call: @PixelShaderFunction(vf4; (temp void)
|
||||
0:? 'input' (temp 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'input' (layout(location=0 ) in 4-component vector of float)
|
||||
|
||||
@@ -47,9 +55,9 @@ Linked fragment stage:
|
||||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
0:? Sequence
|
||||
0:2 Function Definition: PixelShaderFunction(vf4; (temp void)
|
||||
0:2 Function Definition: @PixelShaderFunction(vf4; (temp void)
|
||||
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:4 'x' (temp int)
|
||||
0:? Sequence
|
||||
@@ -82,75 +90,101 @@ gl_FragCoord origin is upper left
|
||||
0:29 Constant:
|
||||
0:29 0 (const int)
|
||||
0:27 No loop body
|
||||
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 Function Call: @PixelShaderFunction(vf4; (temp void)
|
||||
0:? 'input' (temp 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'input' (layout(location=0 ) in 4-component vector of float)
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 39
|
||||
// Id's are bound by 49
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "PixelShaderFunction" 38
|
||||
EntryPoint Fragment 4 "PixelShaderFunction" 44
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "PixelShaderFunction"
|
||||
Name 8 "x"
|
||||
Name 11 "x"
|
||||
Name 14 "x"
|
||||
Name 11 "@PixelShaderFunction(vf4;"
|
||||
Name 10 "input"
|
||||
Name 15 "x"
|
||||
Name 17 "x"
|
||||
Name 38 "input"
|
||||
Decorate 38(input) Location 0
|
||||
Name 20 "x"
|
||||
Name 23 "x"
|
||||
Name 42 "input"
|
||||
Name 44 "input"
|
||||
Name 46 "param"
|
||||
Decorate 44(input) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 1
|
||||
7: TypePointer Function 6(int)
|
||||
9: TypeFloat 32
|
||||
10: TypePointer Function 9(float)
|
||||
12: TypeBool
|
||||
13: TypePointer Function 12(bool)
|
||||
15: TypeVector 9(float) 3
|
||||
16: TypePointer Function 15(fvec3)
|
||||
19: 6(int) Constant 0
|
||||
36: TypeVector 9(float) 4
|
||||
37: TypePointer Input 36(fvec4)
|
||||
38(input): 37(ptr) Variable Input
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 4
|
||||
8: TypePointer Function 7(fvec4)
|
||||
9: TypeFunction 2 8(ptr)
|
||||
13: TypeInt 32 1
|
||||
14: TypePointer Function 13(int)
|
||||
16: TypePointer Function 6(float)
|
||||
18: TypeBool
|
||||
19: TypePointer Function 18(bool)
|
||||
21: TypeVector 6(float) 3
|
||||
22: TypePointer Function 21(fvec3)
|
||||
25: 13(int) Constant 0
|
||||
43: TypePointer Input 7(fvec4)
|
||||
44(input): 43(ptr) Variable Input
|
||||
4(PixelShaderFunction): 2 Function None 3
|
||||
5: Label
|
||||
8(x): 7(ptr) Variable Function
|
||||
11(x): 10(ptr) Variable Function
|
||||
14(x): 13(ptr) Variable Function
|
||||
17(x): 16(ptr) Variable Function
|
||||
18: 6(int) Load 8(x)
|
||||
20: 12(bool) SGreaterThan 18 19
|
||||
SelectionMerge 22 None
|
||||
BranchConditional 20 21 22
|
||||
21: Label
|
||||
Branch 22
|
||||
22: Label
|
||||
Branch 23
|
||||
23: Label
|
||||
LoopMerge 25 26 None
|
||||
Branch 27
|
||||
27: Label
|
||||
28: 6(int) Load 8(x)
|
||||
29: 12(bool) SGreaterThan 28 19
|
||||
BranchConditional 29 24 25
|
||||
24: Label
|
||||
Branch 26
|
||||
26: Label
|
||||
Branch 23
|
||||
25: Label
|
||||
Branch 30
|
||||
30: Label
|
||||
LoopMerge 32 33 None
|
||||
Branch 31
|
||||
31: Label
|
||||
Branch 33
|
||||
33: Label
|
||||
34: 6(int) Load 8(x)
|
||||
35: 12(bool) SGreaterThan 34 19
|
||||
BranchConditional 35 30 32
|
||||
32: Label
|
||||
42(input): 8(ptr) Variable Function
|
||||
46(param): 8(ptr) Variable Function
|
||||
45: 7(fvec4) Load 44(input)
|
||||
Store 42(input) 45
|
||||
47: 7(fvec4) Load 42(input)
|
||||
Store 46(param) 47
|
||||
48: 2 FunctionCall 11(@PixelShaderFunction(vf4;) 46(param)
|
||||
Return
|
||||
FunctionEnd
|
||||
11(@PixelShaderFunction(vf4;): 2 Function None 9
|
||||
10(input): 8(ptr) FunctionParameter
|
||||
12: Label
|
||||
15(x): 14(ptr) Variable Function
|
||||
17(x): 16(ptr) Variable Function
|
||||
20(x): 19(ptr) Variable Function
|
||||
23(x): 22(ptr) Variable Function
|
||||
24: 13(int) Load 15(x)
|
||||
26: 18(bool) SGreaterThan 24 25
|
||||
SelectionMerge 28 None
|
||||
BranchConditional 26 27 28
|
||||
27: Label
|
||||
Branch 28
|
||||
28: Label
|
||||
Branch 29
|
||||
29: Label
|
||||
LoopMerge 31 32 None
|
||||
Branch 33
|
||||
33: Label
|
||||
34: 13(int) Load 15(x)
|
||||
35: 18(bool) SGreaterThan 34 25
|
||||
BranchConditional 35 30 31
|
||||
30: Label
|
||||
Branch 32
|
||||
32: Label
|
||||
Branch 29
|
||||
31: Label
|
||||
Branch 36
|
||||
36: Label
|
||||
LoopMerge 38 39 None
|
||||
Branch 37
|
||||
37: Label
|
||||
Branch 39
|
||||
39: Label
|
||||
40: 13(int) Load 15(x)
|
||||
41: 18(bool) SGreaterThan 40 25
|
||||
BranchConditional 41 36 38
|
||||
38: Label
|
||||
Return
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user