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,7 +2,7 @@ hlsl.intrinsics.promote.down.frag
|
|||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
0:? Sequence
|
||||
0:15 Function Definition: main( (temp structure{temp 4-component vector of float color})
|
||||
0:15 Function Definition: @main( (temp structure{temp 4-component vector of float color})
|
||||
0:15 Function Parameters:
|
||||
0:? Sequence
|
||||
0:16 Sequence
|
||||
|
|
@ -33,15 +33,18 @@ gl_FragCoord origin is upper left
|
|||
0:? 0.000000
|
||||
0:? 0.000000
|
||||
0:? 0.000000
|
||||
0:21 Sequence
|
||||
0:21 Sequence
|
||||
0:21 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:21 color: direct index for structure (temp 4-component vector of float)
|
||||
0:21 'ps_output' (temp structure{temp 4-component vector of float color})
|
||||
0:21 Constant:
|
||||
0:21 0 (const int)
|
||||
0:21 Branch: Return
|
||||
0:21 Branch: Return with expression
|
||||
0:21 'ps_output' (temp structure{temp 4-component vector of float color})
|
||||
0:15 Function Definition: main( (temp void)
|
||||
0:15 Function Parameters:
|
||||
0:? Sequence
|
||||
0:15 Sequence
|
||||
0:15 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:15 color: direct index for structure (temp 4-component vector of float)
|
||||
0:15 Function Call: @main( (temp structure{temp 4-component vector of float color})
|
||||
0:15 Constant:
|
||||
0:15 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 int i, layout(offset=4 ) uniform uint u, layout(offset=8 ) uniform float f, layout(offset=12 ) uniform bool b, layout(offset=16 ) uniform 2-component vector of int i2, layout(offset=24 ) uniform 2-component vector of uint u2, layout(offset=32 ) uniform 2-component vector of float f2, layout(offset=40 ) uniform 2-component vector of bool b2})
|
||||
|
|
@ -53,7 +56,7 @@ Linked fragment stage:
|
|||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
0:? Sequence
|
||||
0:15 Function Definition: main( (temp structure{temp 4-component vector of float color})
|
||||
0:15 Function Definition: @main( (temp structure{temp 4-component vector of float color})
|
||||
0:15 Function Parameters:
|
||||
0:? Sequence
|
||||
0:16 Sequence
|
||||
|
|
@ -84,101 +87,111 @@ gl_FragCoord origin is upper left
|
|||
0:? 0.000000
|
||||
0:? 0.000000
|
||||
0:? 0.000000
|
||||
0:21 Sequence
|
||||
0:21 Sequence
|
||||
0:21 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:21 color: direct index for structure (temp 4-component vector of float)
|
||||
0:21 'ps_output' (temp structure{temp 4-component vector of float color})
|
||||
0:21 Constant:
|
||||
0:21 0 (const int)
|
||||
0:21 Branch: Return
|
||||
0:21 Branch: Return with expression
|
||||
0:21 'ps_output' (temp structure{temp 4-component vector of float color})
|
||||
0:15 Function Definition: main( (temp void)
|
||||
0:15 Function Parameters:
|
||||
0:? Sequence
|
||||
0:15 Sequence
|
||||
0:15 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:15 color: direct index for structure (temp 4-component vector of float)
|
||||
0:15 Function Call: @main( (temp structure{temp 4-component vector of float color})
|
||||
0:15 Constant:
|
||||
0:15 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 int i, layout(offset=4 ) uniform uint u, layout(offset=8 ) uniform float f, layout(offset=12 ) uniform bool b, layout(offset=16 ) uniform 2-component vector of int i2, layout(offset=24 ) uniform 2-component vector of uint u2, layout(offset=32 ) uniform 2-component vector of float f2, layout(offset=40 ) uniform 2-component vector of bool b2})
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 45
|
||||
// Id's are bound by 50
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 41
|
||||
EntryPoint Fragment 4 "main" 47
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 8 "r00"
|
||||
Name 14 "$Global"
|
||||
MemberName 14($Global) 0 "i"
|
||||
MemberName 14($Global) 1 "u"
|
||||
MemberName 14($Global) 2 "f"
|
||||
MemberName 14($Global) 3 "b"
|
||||
MemberName 14($Global) 4 "i2"
|
||||
MemberName 14($Global) 5 "u2"
|
||||
MemberName 14($Global) 6 "f2"
|
||||
MemberName 14($Global) 7 "b2"
|
||||
Name 16 ""
|
||||
Name 24 "r01"
|
||||
Name 32 "PS_OUTPUT"
|
||||
MemberName 32(PS_OUTPUT) 0 "color"
|
||||
Name 34 "ps_output"
|
||||
Name 41 "color"
|
||||
MemberDecorate 14($Global) 0 Offset 0
|
||||
MemberDecorate 14($Global) 1 Offset 4
|
||||
MemberDecorate 14($Global) 2 Offset 8
|
||||
MemberDecorate 14($Global) 3 Offset 12
|
||||
MemberDecorate 14($Global) 4 Offset 16
|
||||
MemberDecorate 14($Global) 5 Offset 24
|
||||
MemberDecorate 14($Global) 6 Offset 32
|
||||
MemberDecorate 14($Global) 7 Offset 40
|
||||
Decorate 14($Global) Block
|
||||
Decorate 16 DescriptorSet 0
|
||||
Decorate 41(color) Location 0
|
||||
Name 8 "PS_OUTPUT"
|
||||
MemberName 8(PS_OUTPUT) 0 "color"
|
||||
Name 10 "@main("
|
||||
Name 14 "r00"
|
||||
Name 19 "$Global"
|
||||
MemberName 19($Global) 0 "i"
|
||||
MemberName 19($Global) 1 "u"
|
||||
MemberName 19($Global) 2 "f"
|
||||
MemberName 19($Global) 3 "b"
|
||||
MemberName 19($Global) 4 "i2"
|
||||
MemberName 19($Global) 5 "u2"
|
||||
MemberName 19($Global) 6 "f2"
|
||||
MemberName 19($Global) 7 "b2"
|
||||
Name 21 ""
|
||||
Name 29 "r01"
|
||||
Name 37 "ps_output"
|
||||
Name 47 "color"
|
||||
MemberDecorate 19($Global) 0 Offset 0
|
||||
MemberDecorate 19($Global) 1 Offset 4
|
||||
MemberDecorate 19($Global) 2 Offset 8
|
||||
MemberDecorate 19($Global) 3 Offset 12
|
||||
MemberDecorate 19($Global) 4 Offset 16
|
||||
MemberDecorate 19($Global) 5 Offset 24
|
||||
MemberDecorate 19($Global) 6 Offset 32
|
||||
MemberDecorate 19($Global) 7 Offset 40
|
||||
Decorate 19($Global) Block
|
||||
Decorate 21 DescriptorSet 0
|
||||
Decorate 47(color) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
7: TypePointer Function 6(int)
|
||||
9: TypeInt 32 1
|
||||
10: TypeFloat 32
|
||||
11: TypeVector 9(int) 2
|
||||
12: TypeVector 6(int) 2
|
||||
13: TypeVector 10(float) 2
|
||||
14($Global): TypeStruct 9(int) 6(int) 10(float) 6(int) 11(ivec2) 12(ivec2) 13(fvec2) 12(ivec2)
|
||||
15: TypePointer Uniform 14($Global)
|
||||
16: 15(ptr) Variable Uniform
|
||||
17: 9(int) Constant 2
|
||||
18: TypePointer Uniform 10(float)
|
||||
23: TypePointer Function 12(ivec2)
|
||||
25: 9(int) Constant 6
|
||||
26: TypePointer Uniform 13(fvec2)
|
||||
31: TypeVector 10(float) 4
|
||||
32(PS_OUTPUT): TypeStruct 31(fvec4)
|
||||
33: TypePointer Function 32(PS_OUTPUT)
|
||||
35: 9(int) Constant 0
|
||||
36: 10(float) Constant 0
|
||||
37: 31(fvec4) ConstantComposite 36 36 36 36
|
||||
38: TypePointer Function 31(fvec4)
|
||||
40: TypePointer Output 31(fvec4)
|
||||
41(color): 40(ptr) Variable Output
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 4
|
||||
8(PS_OUTPUT): TypeStruct 7(fvec4)
|
||||
9: TypeFunction 8(PS_OUTPUT)
|
||||
12: TypeInt 32 0
|
||||
13: TypePointer Function 12(int)
|
||||
15: TypeInt 32 1
|
||||
16: TypeVector 15(int) 2
|
||||
17: TypeVector 12(int) 2
|
||||
18: TypeVector 6(float) 2
|
||||
19($Global): TypeStruct 15(int) 12(int) 6(float) 12(int) 16(ivec2) 17(ivec2) 18(fvec2) 17(ivec2)
|
||||
20: TypePointer Uniform 19($Global)
|
||||
21: 20(ptr) Variable Uniform
|
||||
22: 15(int) Constant 2
|
||||
23: TypePointer Uniform 6(float)
|
||||
28: TypePointer Function 17(ivec2)
|
||||
30: 15(int) Constant 6
|
||||
31: TypePointer Uniform 18(fvec2)
|
||||
36: TypePointer Function 8(PS_OUTPUT)
|
||||
38: 15(int) Constant 0
|
||||
39: 6(float) Constant 0
|
||||
40: 7(fvec4) ConstantComposite 39 39 39 39
|
||||
41: TypePointer Function 7(fvec4)
|
||||
46: TypePointer Output 7(fvec4)
|
||||
47(color): 46(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(r00): 7(ptr) Variable Function
|
||||
24(r01): 23(ptr) Variable Function
|
||||
34(ps_output): 33(ptr) Variable Function
|
||||
19: 18(ptr) AccessChain 16 17
|
||||
20: 10(float) Load 19
|
||||
21: 6(int) ConvertFToU 20
|
||||
22: 6(int) BitCount 21
|
||||
Store 8(r00) 22
|
||||
27: 26(ptr) AccessChain 16 25
|
||||
28: 13(fvec2) Load 27
|
||||
29: 12(ivec2) ConvertFToU 28
|
||||
30: 12(ivec2) BitReverse 29
|
||||
Store 24(r01) 30
|
||||
39: 38(ptr) AccessChain 34(ps_output) 35
|
||||
Store 39 37
|
||||
42: 38(ptr) AccessChain 34(ps_output) 35
|
||||
43: 31(fvec4) Load 42
|
||||
Store 41(color) 43
|
||||
48:8(PS_OUTPUT) FunctionCall 10(@main()
|
||||
49: 7(fvec4) CompositeExtract 48 0
|
||||
Store 47(color) 49
|
||||
Return
|
||||
FunctionEnd
|
||||
10(@main():8(PS_OUTPUT) Function None 9
|
||||
11: Label
|
||||
14(r00): 13(ptr) Variable Function
|
||||
29(r01): 28(ptr) Variable Function
|
||||
37(ps_output): 36(ptr) Variable Function
|
||||
24: 23(ptr) AccessChain 21 22
|
||||
25: 6(float) Load 24
|
||||
26: 12(int) ConvertFToU 25
|
||||
27: 12(int) BitCount 26
|
||||
Store 14(r00) 27
|
||||
32: 31(ptr) AccessChain 21 30
|
||||
33: 18(fvec2) Load 32
|
||||
34: 17(ivec2) ConvertFToU 33
|
||||
35: 17(ivec2) BitReverse 34
|
||||
Store 29(r01) 35
|
||||
42: 41(ptr) AccessChain 37(ps_output) 38
|
||||
Store 42 40
|
||||
43:8(PS_OUTPUT) Load 37(ps_output)
|
||||
ReturnValue 43
|
||||
FunctionEnd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue