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,7 +2,7 @@ hlsl.type.half.frag
|
||||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
0:? Sequence
|
||||
0:3 Function Definition: main( (temp 4-component vector of float)
|
||||
0:3 Function Definition: @main( (temp 4-component vector of float)
|
||||
0:3 Function Parameters:
|
||||
0:? Sequence
|
||||
0:4 Sequence
|
||||
@@ -36,15 +36,18 @@ gl_FragCoord origin is upper left
|
||||
0:8 4.000000
|
||||
0:8 4.000000
|
||||
0:8 4.000000
|
||||
0:10 Sequence
|
||||
0:10 move second child to first child (temp 4-component vector of float)
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
|
||||
0:10 Constant:
|
||||
0:10 0.000000
|
||||
0:10 0.000000
|
||||
0:10 0.000000
|
||||
0:10 0.000000
|
||||
0:10 Branch: Return
|
||||
0:10 Branch: Return with expression
|
||||
0:10 Constant:
|
||||
0:10 0.000000
|
||||
0:10 0.000000
|
||||
0:10 0.000000
|
||||
0:10 0.000000
|
||||
0:3 Function Definition: main( (temp void)
|
||||
0:3 Function Parameters:
|
||||
0:? Sequence
|
||||
0:3 move second child to first child (temp 4-component vector of float)
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
|
||||
0:3 Function Call: @main( (temp 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
|
||||
|
||||
@@ -55,7 +58,7 @@ Linked fragment stage:
|
||||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
0:? Sequence
|
||||
0:3 Function Definition: main( (temp 4-component vector of float)
|
||||
0:3 Function Definition: @main( (temp 4-component vector of float)
|
||||
0:3 Function Parameters:
|
||||
0:? Sequence
|
||||
0:4 Sequence
|
||||
@@ -89,73 +92,83 @@ gl_FragCoord origin is upper left
|
||||
0:8 4.000000
|
||||
0:8 4.000000
|
||||
0:8 4.000000
|
||||
0:10 Sequence
|
||||
0:10 move second child to first child (temp 4-component vector of float)
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
|
||||
0:10 Constant:
|
||||
0:10 0.000000
|
||||
0:10 0.000000
|
||||
0:10 0.000000
|
||||
0:10 0.000000
|
||||
0:10 Branch: Return
|
||||
0:10 Branch: Return with expression
|
||||
0:10 Constant:
|
||||
0:10 0.000000
|
||||
0:10 0.000000
|
||||
0:10 0.000000
|
||||
0:10 0.000000
|
||||
0:3 Function Definition: main( (temp void)
|
||||
0:3 Function Parameters:
|
||||
0:? Sequence
|
||||
0:3 move second child to first child (temp 4-component vector of float)
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
|
||||
0:3 Function Call: @main( (temp 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 31
|
||||
// Id's are bound by 36
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 28
|
||||
EntryPoint Fragment 4 "main" 34
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 8 "h0"
|
||||
Name 10 "h1"
|
||||
Name 14 "h2"
|
||||
Name 19 "h3"
|
||||
Name 24 "h4"
|
||||
Name 28 "@entryPointOutput"
|
||||
Decorate 8(h0) RelaxedPrecision
|
||||
Decorate 10(h1) RelaxedPrecision
|
||||
Decorate 14(h2) RelaxedPrecision
|
||||
Decorate 19(h3) RelaxedPrecision
|
||||
Decorate 24(h4) RelaxedPrecision
|
||||
Decorate 28(@entryPointOutput) Location 0
|
||||
Name 9 "@main("
|
||||
Name 12 "h0"
|
||||
Name 14 "h1"
|
||||
Name 18 "h2"
|
||||
Name 23 "h3"
|
||||
Name 27 "h4"
|
||||
Name 34 "@entryPointOutput"
|
||||
Decorate 12(h0) RelaxedPrecision
|
||||
Decorate 14(h1) RelaxedPrecision
|
||||
Decorate 18(h2) RelaxedPrecision
|
||||
Decorate 23(h3) RelaxedPrecision
|
||||
Decorate 27(h4) RelaxedPrecision
|
||||
Decorate 34(@entryPointOutput) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypePointer Function 6(float)
|
||||
9: 6(float) Constant 0
|
||||
11: 6(float) Constant 1065353216
|
||||
12: TypeVector 6(float) 2
|
||||
13: TypePointer Function 12(fvec2)
|
||||
15: 6(float) Constant 1073741824
|
||||
16: 12(fvec2) ConstantComposite 15 15
|
||||
17: TypeVector 6(float) 3
|
||||
18: TypePointer Function 17(fvec3)
|
||||
20: 6(float) Constant 1077936128
|
||||
21: 17(fvec3) ConstantComposite 20 20 20
|
||||
22: TypeVector 6(float) 4
|
||||
23: TypePointer Function 22(fvec4)
|
||||
25: 6(float) Constant 1082130432
|
||||
26: 22(fvec4) ConstantComposite 25 25 25 25
|
||||
27: TypePointer Output 22(fvec4)
|
||||
28(@entryPointOutput): 27(ptr) Variable Output
|
||||
29: 22(fvec4) ConstantComposite 9 9 9 9
|
||||
7: TypeVector 6(float) 4
|
||||
8: TypeFunction 7(fvec4)
|
||||
11: TypePointer Function 6(float)
|
||||
13: 6(float) Constant 0
|
||||
15: 6(float) Constant 1065353216
|
||||
16: TypeVector 6(float) 2
|
||||
17: TypePointer Function 16(fvec2)
|
||||
19: 6(float) Constant 1073741824
|
||||
20: 16(fvec2) ConstantComposite 19 19
|
||||
21: TypeVector 6(float) 3
|
||||
22: TypePointer Function 21(fvec3)
|
||||
24: 6(float) Constant 1077936128
|
||||
25: 21(fvec3) ConstantComposite 24 24 24
|
||||
26: TypePointer Function 7(fvec4)
|
||||
28: 6(float) Constant 1082130432
|
||||
29: 7(fvec4) ConstantComposite 28 28 28 28
|
||||
30: 7(fvec4) ConstantComposite 13 13 13 13
|
||||
33: TypePointer Output 7(fvec4)
|
||||
34(@entryPointOutput): 33(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(h0): 7(ptr) Variable Function
|
||||
10(h1): 7(ptr) Variable Function
|
||||
14(h2): 13(ptr) Variable Function
|
||||
19(h3): 18(ptr) Variable Function
|
||||
24(h4): 23(ptr) Variable Function
|
||||
Store 8(h0) 9
|
||||
Store 10(h1) 11
|
||||
Store 14(h2) 16
|
||||
Store 19(h3) 21
|
||||
Store 24(h4) 26
|
||||
Store 28(@entryPointOutput) 29
|
||||
35: 7(fvec4) FunctionCall 9(@main()
|
||||
Store 34(@entryPointOutput) 35
|
||||
Return
|
||||
FunctionEnd
|
||||
9(@main(): 7(fvec4) Function None 8
|
||||
10: Label
|
||||
12(h0): 11(ptr) Variable Function
|
||||
14(h1): 11(ptr) Variable Function
|
||||
18(h2): 17(ptr) Variable Function
|
||||
23(h3): 22(ptr) Variable Function
|
||||
27(h4): 26(ptr) Variable Function
|
||||
Store 12(h0) 13
|
||||
Store 14(h1) 15
|
||||
Store 18(h2) 20
|
||||
Store 23(h3) 25
|
||||
Store 27(h4) 29
|
||||
ReturnValue 30
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user