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:
@@ -10,7 +10,7 @@ gl_FragCoord origin is upper left
|
||||
0:? 1.000000
|
||||
0:? 2.000000
|
||||
0:? 3.000000
|
||||
0:7 Function Definition: main( (temp 4-component vector of float)
|
||||
0:7 Function Definition: @main( (temp 4-component vector of float)
|
||||
0:7 Function Parameters:
|
||||
0:? Sequence
|
||||
0:8 Sequence
|
||||
@@ -81,19 +81,22 @@ gl_FragCoord origin is upper left
|
||||
0:14 'tc2' (temp 2-component vector of int)
|
||||
0:14 'storeTemp' (temp 3-component vector of float)
|
||||
0:14 'storeTemp' (temp 3-component vector of float)
|
||||
0:27 Sequence
|
||||
0:27 move second child to first child (temp 4-component vector of float)
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
|
||||
0:27 Constant:
|
||||
0:27 0.000000
|
||||
0:27 0.000000
|
||||
0:27 0.000000
|
||||
0:27 0.000000
|
||||
0:27 Branch: Return
|
||||
0:27 Branch: Return with expression
|
||||
0:27 Constant:
|
||||
0:27 0.000000
|
||||
0:27 0.000000
|
||||
0:27 0.000000
|
||||
0:27 0.000000
|
||||
0:7 Function Definition: main( (temp void)
|
||||
0:7 Function Parameters:
|
||||
0:? Sequence
|
||||
0:7 move second child to first child (temp 4-component vector of float)
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
|
||||
0:7 Function Call: @main( (temp 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
|
||||
0:? 'rwtx' (layout(rgba32f ) uniform image2D)
|
||||
0:? 'buf' (layout(rgba32f ) uniform imageBuffer)
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
@@ -110,7 +113,7 @@ gl_FragCoord origin is upper left
|
||||
0:? 1.000000
|
||||
0:? 2.000000
|
||||
0:? 3.000000
|
||||
0:7 Function Definition: main( (temp 4-component vector of float)
|
||||
0:7 Function Definition: @main( (temp 4-component vector of float)
|
||||
0:7 Function Parameters:
|
||||
0:? Sequence
|
||||
0:8 Sequence
|
||||
@@ -181,106 +184,116 @@ gl_FragCoord origin is upper left
|
||||
0:14 'tc2' (temp 2-component vector of int)
|
||||
0:14 'storeTemp' (temp 3-component vector of float)
|
||||
0:14 'storeTemp' (temp 3-component vector of float)
|
||||
0:27 Sequence
|
||||
0:27 move second child to first child (temp 4-component vector of float)
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
|
||||
0:27 Constant:
|
||||
0:27 0.000000
|
||||
0:27 0.000000
|
||||
0:27 0.000000
|
||||
0:27 0.000000
|
||||
0:27 Branch: Return
|
||||
0:27 Branch: Return with expression
|
||||
0:27 Constant:
|
||||
0:27 0.000000
|
||||
0:27 0.000000
|
||||
0:27 0.000000
|
||||
0:27 0.000000
|
||||
0:7 Function Definition: main( (temp void)
|
||||
0:7 Function Parameters:
|
||||
0:? Sequence
|
||||
0:7 move second child to first child (temp 4-component vector of float)
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
|
||||
0:7 Function Call: @main( (temp 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
|
||||
0:? 'rwtx' (layout(rgba32f ) uniform image2D)
|
||||
0:? 'buf' (layout(rgba32f ) uniform imageBuffer)
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 58
|
||||
// Id's are bound by 63
|
||||
|
||||
Capability Shader
|
||||
Capability SampledBuffer
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 51
|
||||
EntryPoint Fragment 4 "main" 58
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 9 "SomeValue("
|
||||
Name 20 "tc2"
|
||||
Name 24 "tc"
|
||||
Name 26 "storeTemp"
|
||||
Name 31 "rwtx"
|
||||
Name 35 "storeTemp"
|
||||
Name 42 "storeTemp"
|
||||
Name 51 "@entryPointOutput"
|
||||
Name 57 "buf"
|
||||
Decorate 31(rwtx) DescriptorSet 0
|
||||
Decorate 51(@entryPointOutput) Location 0
|
||||
Decorate 57(buf) DescriptorSet 0
|
||||
Name 13 "@main("
|
||||
Name 24 "tc2"
|
||||
Name 28 "tc"
|
||||
Name 30 "storeTemp"
|
||||
Name 35 "rwtx"
|
||||
Name 39 "storeTemp"
|
||||
Name 46 "storeTemp"
|
||||
Name 58 "@entryPointOutput"
|
||||
Name 62 "buf"
|
||||
Decorate 35(rwtx) DescriptorSet 0
|
||||
Decorate 58(@entryPointOutput) Location 0
|
||||
Decorate 62(buf) DescriptorSet 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 3
|
||||
8: TypeFunction 7(fvec3)
|
||||
11: 6(float) Constant 1065353216
|
||||
12: 6(float) Constant 1073741824
|
||||
13: 6(float) Constant 1077936128
|
||||
14: 7(fvec3) ConstantComposite 11 12 13
|
||||
17: TypeInt 32 1
|
||||
18: TypeVector 17(int) 2
|
||||
19: TypePointer Function 18(ivec2)
|
||||
21: 17(int) Constant 0
|
||||
22: 18(ivec2) ConstantComposite 21 21
|
||||
23: TypePointer Function 17(int)
|
||||
25: TypePointer Function 7(fvec3)
|
||||
29: TypeImage 6(float) 2D nonsampled format:Rgba32f
|
||||
30: TypePointer UniformConstant 29
|
||||
31(rwtx): 30(ptr) Variable UniformConstant
|
||||
43: 7(fvec3) ConstantComposite 12 12 12
|
||||
49: TypeVector 6(float) 4
|
||||
50: TypePointer Output 49(fvec4)
|
||||
51(@entryPointOutput): 50(ptr) Variable Output
|
||||
52: 6(float) Constant 0
|
||||
53: 49(fvec4) ConstantComposite 52 52 52 52
|
||||
55: TypeImage 6(float) Buffer nonsampled format:Rgba32f
|
||||
56: TypePointer UniformConstant 55
|
||||
57(buf): 56(ptr) Variable UniformConstant
|
||||
11: TypeVector 6(float) 4
|
||||
12: TypeFunction 11(fvec4)
|
||||
15: 6(float) Constant 1065353216
|
||||
16: 6(float) Constant 1073741824
|
||||
17: 6(float) Constant 1077936128
|
||||
18: 7(fvec3) ConstantComposite 15 16 17
|
||||
21: TypeInt 32 1
|
||||
22: TypeVector 21(int) 2
|
||||
23: TypePointer Function 22(ivec2)
|
||||
25: 21(int) Constant 0
|
||||
26: 22(ivec2) ConstantComposite 25 25
|
||||
27: TypePointer Function 21(int)
|
||||
29: TypePointer Function 7(fvec3)
|
||||
33: TypeImage 6(float) 2D nonsampled format:Rgba32f
|
||||
34: TypePointer UniformConstant 33
|
||||
35(rwtx): 34(ptr) Variable UniformConstant
|
||||
47: 7(fvec3) ConstantComposite 16 16 16
|
||||
53: 6(float) Constant 0
|
||||
54: 11(fvec4) ConstantComposite 53 53 53 53
|
||||
57: TypePointer Output 11(fvec4)
|
||||
58(@entryPointOutput): 57(ptr) Variable Output
|
||||
60: TypeImage 6(float) Buffer nonsampled format:Rgba32f
|
||||
61: TypePointer UniformConstant 60
|
||||
62(buf): 61(ptr) Variable UniformConstant
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
20(tc2): 19(ptr) Variable Function
|
||||
24(tc): 23(ptr) Variable Function
|
||||
26(storeTemp): 25(ptr) Variable Function
|
||||
35(storeTemp): 25(ptr) Variable Function
|
||||
42(storeTemp): 25(ptr) Variable Function
|
||||
Store 20(tc2) 22
|
||||
Store 24(tc) 21
|
||||
27: 7(fvec3) Load 26(storeTemp)
|
||||
28: 7(fvec3) VectorShuffle 27 14 5 4 3
|
||||
Store 26(storeTemp) 28
|
||||
32: 29 Load 31(rwtx)
|
||||
33: 18(ivec2) Load 20(tc2)
|
||||
34: 7(fvec3) Load 26(storeTemp)
|
||||
ImageWrite 32 33 34
|
||||
36: 7(fvec3) FunctionCall 9(SomeValue()
|
||||
37: 7(fvec3) Load 35(storeTemp)
|
||||
38: 7(fvec3) VectorShuffle 37 36 5 4 3
|
||||
Store 35(storeTemp) 38
|
||||
39: 29 Load 31(rwtx)
|
||||
40: 18(ivec2) Load 20(tc2)
|
||||
41: 7(fvec3) Load 35(storeTemp)
|
||||
ImageWrite 39 40 41
|
||||
44: 7(fvec3) Load 42(storeTemp)
|
||||
45: 7(fvec3) VectorShuffle 44 43 5 4 3
|
||||
Store 42(storeTemp) 45
|
||||
46: 29 Load 31(rwtx)
|
||||
47: 18(ivec2) Load 20(tc2)
|
||||
48: 7(fvec3) Load 42(storeTemp)
|
||||
ImageWrite 46 47 48
|
||||
Store 51(@entryPointOutput) 53
|
||||
59: 11(fvec4) FunctionCall 13(@main()
|
||||
Store 58(@entryPointOutput) 59
|
||||
Return
|
||||
FunctionEnd
|
||||
9(SomeValue(): 7(fvec3) Function None 8
|
||||
10: Label
|
||||
ReturnValue 14
|
||||
ReturnValue 18
|
||||
FunctionEnd
|
||||
13(@main(): 11(fvec4) Function None 12
|
||||
14: Label
|
||||
24(tc2): 23(ptr) Variable Function
|
||||
28(tc): 27(ptr) Variable Function
|
||||
30(storeTemp): 29(ptr) Variable Function
|
||||
39(storeTemp): 29(ptr) Variable Function
|
||||
46(storeTemp): 29(ptr) Variable Function
|
||||
Store 24(tc2) 26
|
||||
Store 28(tc) 25
|
||||
31: 7(fvec3) Load 30(storeTemp)
|
||||
32: 7(fvec3) VectorShuffle 31 18 5 4 3
|
||||
Store 30(storeTemp) 32
|
||||
36: 33 Load 35(rwtx)
|
||||
37: 22(ivec2) Load 24(tc2)
|
||||
38: 7(fvec3) Load 30(storeTemp)
|
||||
ImageWrite 36 37 38
|
||||
40: 7(fvec3) FunctionCall 9(SomeValue()
|
||||
41: 7(fvec3) Load 39(storeTemp)
|
||||
42: 7(fvec3) VectorShuffle 41 40 5 4 3
|
||||
Store 39(storeTemp) 42
|
||||
43: 33 Load 35(rwtx)
|
||||
44: 22(ivec2) Load 24(tc2)
|
||||
45: 7(fvec3) Load 39(storeTemp)
|
||||
ImageWrite 43 44 45
|
||||
48: 7(fvec3) Load 46(storeTemp)
|
||||
49: 7(fvec3) VectorShuffle 48 47 5 4 3
|
||||
Store 46(storeTemp) 49
|
||||
50: 33 Load 35(rwtx)
|
||||
51: 22(ivec2) Load 24(tc2)
|
||||
52: 7(fvec3) Load 46(storeTemp)
|
||||
ImageWrite 50 51 52
|
||||
ReturnValue 54
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user