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.array.multidim.frag
|
||||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
0:? Sequence
|
||||
0:10 Function Definition: main( (temp structure{temp 4-component vector of float Color})
|
||||
0:10 Function Definition: @main( (temp structure{temp 4-component vector of float Color})
|
||||
0:10 Function Parameters:
|
||||
0:? Sequence
|
||||
0:14 move second child to first child (temp 4-component vector of float)
|
||||
@@ -48,15 +48,18 @@ gl_FragCoord origin is upper left
|
||||
0:18 1 (const int)
|
||||
0:18 Constant:
|
||||
0:18 2 (const int)
|
||||
0:19 Sequence
|
||||
0:19 Sequence
|
||||
0:19 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:19 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:19 'psout' (temp structure{temp 4-component vector of float Color})
|
||||
0:19 Constant:
|
||||
0:19 0 (const int)
|
||||
0:19 Branch: Return
|
||||
0:19 Branch: Return with expression
|
||||
0:19 'psout' (temp structure{temp 4-component vector of float Color})
|
||||
0:10 Function Definition: main( (temp void)
|
||||
0:10 Function Parameters:
|
||||
0:? Sequence
|
||||
0:10 Sequence
|
||||
0:10 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:10 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:10 Function Call: @main( (temp structure{temp 4-component vector of float Color})
|
||||
0:10 Constant:
|
||||
0:10 0 (const int)
|
||||
0:? Linker Objects
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 5-element array of 4-element array of 3-element array of float float_array})
|
||||
@@ -68,7 +71,7 @@ Linked fragment stage:
|
||||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
0:? Sequence
|
||||
0:10 Function Definition: main( (temp structure{temp 4-component vector of float Color})
|
||||
0:10 Function Definition: @main( (temp structure{temp 4-component vector of float Color})
|
||||
0:10 Function Parameters:
|
||||
0:? Sequence
|
||||
0:14 move second child to first child (temp 4-component vector of float)
|
||||
@@ -114,97 +117,107 @@ gl_FragCoord origin is upper left
|
||||
0:18 1 (const int)
|
||||
0:18 Constant:
|
||||
0:18 2 (const int)
|
||||
0:19 Sequence
|
||||
0:19 Sequence
|
||||
0:19 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:19 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:19 'psout' (temp structure{temp 4-component vector of float Color})
|
||||
0:19 Constant:
|
||||
0:19 0 (const int)
|
||||
0:19 Branch: Return
|
||||
0:19 Branch: Return with expression
|
||||
0:19 'psout' (temp structure{temp 4-component vector of float Color})
|
||||
0:10 Function Definition: main( (temp void)
|
||||
0:10 Function Parameters:
|
||||
0:? Sequence
|
||||
0:10 Sequence
|
||||
0:10 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:10 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:10 Function Call: @main( (temp structure{temp 4-component vector of float Color})
|
||||
0:10 Constant:
|
||||
0:10 0 (const int)
|
||||
0:? Linker Objects
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 5-element array of 4-element array of 3-element array of float float_array})
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 52
|
||||
// Id's are bound by 57
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 48
|
||||
EntryPoint Fragment 4 "main" 54
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 14 "float4_array_1"
|
||||
Name 23 "$Global"
|
||||
MemberName 23($Global) 0 "float_array"
|
||||
Name 25 ""
|
||||
Name 36 "float4_array_2"
|
||||
Name 41 "PS_OUTPUT"
|
||||
MemberName 41(PS_OUTPUT) 0 "Color"
|
||||
Name 43 "psout"
|
||||
Name 48 "Color"
|
||||
Decorate 18 ArrayStride 16
|
||||
Decorate 20 ArrayStride 48
|
||||
Decorate 22 ArrayStride 192
|
||||
MemberDecorate 23($Global) 0 Offset 0
|
||||
Decorate 23($Global) Block
|
||||
Decorate 25 DescriptorSet 0
|
||||
Decorate 48(Color) Location 0
|
||||
Name 8 "PS_OUTPUT"
|
||||
MemberName 8(PS_OUTPUT) 0 "Color"
|
||||
Name 10 "@main("
|
||||
Name 18 "float4_array_1"
|
||||
Name 27 "$Global"
|
||||
MemberName 27($Global) 0 "float_array"
|
||||
Name 29 ""
|
||||
Name 40 "float4_array_2"
|
||||
Name 46 "psout"
|
||||
Name 54 "Color"
|
||||
Decorate 22 ArrayStride 16
|
||||
Decorate 24 ArrayStride 48
|
||||
Decorate 26 ArrayStride 192
|
||||
MemberDecorate 27($Global) 0 Offset 0
|
||||
Decorate 27($Global) Block
|
||||
Decorate 29 DescriptorSet 0
|
||||
Decorate 54(Color) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 4
|
||||
8: TypeInt 32 0
|
||||
9: 8(int) Constant 3
|
||||
10: TypeArray 7(fvec4) 9
|
||||
11: 8(int) Constant 2
|
||||
12: TypeArray 10 11
|
||||
13: TypePointer Function 12
|
||||
15: TypeInt 32 1
|
||||
16: 15(int) Constant 1
|
||||
17: 15(int) Constant 2
|
||||
18: TypeArray 6(float) 9
|
||||
19: 8(int) Constant 4
|
||||
20: TypeArray 18 19
|
||||
21: 8(int) Constant 5
|
||||
22: TypeArray 20 21
|
||||
23($Global): TypeStruct 22
|
||||
24: TypePointer Uniform 23($Global)
|
||||
25: 24(ptr) Variable Uniform
|
||||
26: 15(int) Constant 0
|
||||
27: 15(int) Constant 3
|
||||
28: TypePointer Uniform 6(float)
|
||||
32: TypePointer Function 7(fvec4)
|
||||
34: TypeArray 10 21
|
||||
35: TypePointer Function 34
|
||||
37: TypePointer Function 10
|
||||
41(PS_OUTPUT): TypeStruct 7(fvec4)
|
||||
42: TypePointer Function 41(PS_OUTPUT)
|
||||
47: TypePointer Output 7(fvec4)
|
||||
48(Color): 47(ptr) Variable Output
|
||||
8(PS_OUTPUT): TypeStruct 7(fvec4)
|
||||
9: TypeFunction 8(PS_OUTPUT)
|
||||
12: TypeInt 32 0
|
||||
13: 12(int) Constant 3
|
||||
14: TypeArray 7(fvec4) 13
|
||||
15: 12(int) Constant 2
|
||||
16: TypeArray 14 15
|
||||
17: TypePointer Function 16
|
||||
19: TypeInt 32 1
|
||||
20: 19(int) Constant 1
|
||||
21: 19(int) Constant 2
|
||||
22: TypeArray 6(float) 13
|
||||
23: 12(int) Constant 4
|
||||
24: TypeArray 22 23
|
||||
25: 12(int) Constant 5
|
||||
26: TypeArray 24 25
|
||||
27($Global): TypeStruct 26
|
||||
28: TypePointer Uniform 27($Global)
|
||||
29: 28(ptr) Variable Uniform
|
||||
30: 19(int) Constant 0
|
||||
31: 19(int) Constant 3
|
||||
32: TypePointer Uniform 6(float)
|
||||
36: TypePointer Function 7(fvec4)
|
||||
38: TypeArray 14 25
|
||||
39: TypePointer Function 38
|
||||
41: TypePointer Function 14
|
||||
45: TypePointer Function 8(PS_OUTPUT)
|
||||
53: TypePointer Output 7(fvec4)
|
||||
54(Color): 53(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
14(float4_array_1): 13(ptr) Variable Function
|
||||
36(float4_array_2): 35(ptr) Variable Function
|
||||
43(psout): 42(ptr) Variable Function
|
||||
29: 28(ptr) AccessChain 25 26 17 27 16
|
||||
30: 6(float) Load 29
|
||||
31: 7(fvec4) CompositeConstruct 30 30 30 30
|
||||
33: 32(ptr) AccessChain 14(float4_array_1) 16 17
|
||||
Store 33 31
|
||||
38: 37(ptr) AccessChain 14(float4_array_1) 26
|
||||
39: 10 Load 38
|
||||
40: 37(ptr) AccessChain 36(float4_array_2) 16
|
||||
Store 40 39
|
||||
44: 32(ptr) AccessChain 14(float4_array_1) 16 17
|
||||
45: 7(fvec4) Load 44
|
||||
46: 32(ptr) AccessChain 43(psout) 26
|
||||
Store 46 45
|
||||
49: 32(ptr) AccessChain 43(psout) 26
|
||||
50: 7(fvec4) Load 49
|
||||
Store 48(Color) 50
|
||||
55:8(PS_OUTPUT) FunctionCall 10(@main()
|
||||
56: 7(fvec4) CompositeExtract 55 0
|
||||
Store 54(Color) 56
|
||||
Return
|
||||
FunctionEnd
|
||||
10(@main():8(PS_OUTPUT) Function None 9
|
||||
11: Label
|
||||
18(float4_array_1): 17(ptr) Variable Function
|
||||
40(float4_array_2): 39(ptr) Variable Function
|
||||
46(psout): 45(ptr) Variable Function
|
||||
33: 32(ptr) AccessChain 29 30 21 31 20
|
||||
34: 6(float) Load 33
|
||||
35: 7(fvec4) CompositeConstruct 34 34 34 34
|
||||
37: 36(ptr) AccessChain 18(float4_array_1) 20 21
|
||||
Store 37 35
|
||||
42: 41(ptr) AccessChain 18(float4_array_1) 30
|
||||
43: 14 Load 42
|
||||
44: 41(ptr) AccessChain 40(float4_array_2) 20
|
||||
Store 44 43
|
||||
47: 36(ptr) AccessChain 18(float4_array_1) 20 21
|
||||
48: 7(fvec4) Load 47
|
||||
49: 36(ptr) AccessChain 46(psout) 30
|
||||
Store 49 48
|
||||
50:8(PS_OUTPUT) Load 46(psout)
|
||||
ReturnValue 50
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user