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.promote.atomic.frag
|
||||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
0:? Sequence
|
||||
0:5 Function Definition: main( (temp 4-component vector of float)
|
||||
0:5 Function Definition: @main( (temp 4-component vector of float)
|
||||
0:5 Function Parameters:
|
||||
0:? Sequence
|
||||
0:13 move second child to first child (temp int)
|
||||
@@ -13,18 +13,21 @@ gl_FragCoord origin is upper left
|
||||
0:13 'Loc' (temp int)
|
||||
0:13 Convert int to uint (temp uint)
|
||||
0:13 'Inc' (temp int)
|
||||
0:15 Sequence
|
||||
0:15 move second child to first child (temp 4-component vector of float)
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
|
||||
0:? Constant:
|
||||
0:? 0.000000
|
||||
0:? 0.000000
|
||||
0:? 0.000000
|
||||
0:? 0.000000
|
||||
0:15 Branch: Return
|
||||
0:15 Branch: Return with expression
|
||||
0:? Constant:
|
||||
0:? 0.000000
|
||||
0:? 0.000000
|
||||
0:? 0.000000
|
||||
0:? 0.000000
|
||||
0:5 Function Definition: main( (temp void)
|
||||
0:5 Function Parameters:
|
||||
0:? Sequence
|
||||
0:5 move second child to first child (temp 4-component vector of float)
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
|
||||
0:5 Function Call: @main( (temp 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
|
||||
0:? 's_uintbuff' (layout(r32ui ) uniform uimageBuffer)
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
@@ -33,7 +36,7 @@ Linked fragment stage:
|
||||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
0:? Sequence
|
||||
0:5 Function Definition: main( (temp 4-component vector of float)
|
||||
0:5 Function Definition: @main( (temp 4-component vector of float)
|
||||
0:5 Function Parameters:
|
||||
0:? Sequence
|
||||
0:13 move second child to first child (temp int)
|
||||
@@ -44,66 +47,76 @@ gl_FragCoord origin is upper left
|
||||
0:13 'Loc' (temp int)
|
||||
0:13 Convert int to uint (temp uint)
|
||||
0:13 'Inc' (temp int)
|
||||
0:15 Sequence
|
||||
0:15 move second child to first child (temp 4-component vector of float)
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
|
||||
0:? Constant:
|
||||
0:? 0.000000
|
||||
0:? 0.000000
|
||||
0:? 0.000000
|
||||
0:? 0.000000
|
||||
0:15 Branch: Return
|
||||
0:15 Branch: Return with expression
|
||||
0:? Constant:
|
||||
0:? 0.000000
|
||||
0:? 0.000000
|
||||
0:? 0.000000
|
||||
0:? 0.000000
|
||||
0:5 Function Definition: main( (temp void)
|
||||
0:5 Function Parameters:
|
||||
0:? Sequence
|
||||
0:5 move second child to first child (temp 4-component vector of float)
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
|
||||
0:5 Function Call: @main( (temp 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
|
||||
0:? 's_uintbuff' (layout(r32ui ) uniform uimageBuffer)
|
||||
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
|
||||
Capability SampledBuffer
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 27
|
||||
EntryPoint Fragment 4 "main" 34
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 8 "Orig"
|
||||
Name 12 "s_uintbuff"
|
||||
Name 13 "Loc"
|
||||
Name 15 "Inc"
|
||||
Name 27 "@entryPointOutput"
|
||||
Decorate 12(s_uintbuff) DescriptorSet 0
|
||||
Decorate 27(@entryPointOutput) Location 0
|
||||
Name 9 "@main("
|
||||
Name 13 "Orig"
|
||||
Name 17 "s_uintbuff"
|
||||
Name 18 "Loc"
|
||||
Name 20 "Inc"
|
||||
Name 34 "@entryPointOutput"
|
||||
Decorate 17(s_uintbuff) DescriptorSet 0
|
||||
Decorate 34(@entryPointOutput) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 1
|
||||
7: TypePointer Function 6(int)
|
||||
9: TypeInt 32 0
|
||||
10: TypeImage 9(int) Buffer nonsampled format:R32ui
|
||||
11: TypePointer UniformConstant 10
|
||||
12(s_uintbuff): 11(ptr) Variable UniformConstant
|
||||
18: 9(int) Constant 0
|
||||
19: TypePointer Image 9(int)
|
||||
21: 9(int) Constant 1
|
||||
24: TypeFloat 32
|
||||
25: TypeVector 24(float) 4
|
||||
26: TypePointer Output 25(fvec4)
|
||||
27(@entryPointOutput): 26(ptr) Variable Output
|
||||
28: 24(float) Constant 0
|
||||
29: 25(fvec4) ConstantComposite 28 28 28 28
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 4
|
||||
8: TypeFunction 7(fvec4)
|
||||
11: TypeInt 32 1
|
||||
12: TypePointer Function 11(int)
|
||||
14: TypeInt 32 0
|
||||
15: TypeImage 14(int) Buffer nonsampled format:R32ui
|
||||
16: TypePointer UniformConstant 15
|
||||
17(s_uintbuff): 16(ptr) Variable UniformConstant
|
||||
23: 14(int) Constant 0
|
||||
24: TypePointer Image 14(int)
|
||||
26: 14(int) Constant 1
|
||||
29: 6(float) Constant 0
|
||||
30: 7(fvec4) ConstantComposite 29 29 29 29
|
||||
33: TypePointer Output 7(fvec4)
|
||||
34(@entryPointOutput): 33(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(Orig): 7(ptr) Variable Function
|
||||
13(Loc): 7(ptr) Variable Function
|
||||
15(Inc): 7(ptr) Variable Function
|
||||
14: 6(int) Load 13(Loc)
|
||||
16: 6(int) Load 15(Inc)
|
||||
17: 9(int) Bitcast 16
|
||||
20: 19(ptr) ImageTexelPointer 12(s_uintbuff) 14 18
|
||||
22: 9(int) AtomicIAdd 20 21 18 17
|
||||
23: 6(int) Bitcast 22
|
||||
Store 8(Orig) 23
|
||||
Store 27(@entryPointOutput) 29
|
||||
35: 7(fvec4) FunctionCall 9(@main()
|
||||
Store 34(@entryPointOutput) 35
|
||||
Return
|
||||
FunctionEnd
|
||||
9(@main(): 7(fvec4) Function None 8
|
||||
10: Label
|
||||
13(Orig): 12(ptr) Variable Function
|
||||
18(Loc): 12(ptr) Variable Function
|
||||
20(Inc): 12(ptr) Variable Function
|
||||
19: 11(int) Load 18(Loc)
|
||||
21: 11(int) Load 20(Inc)
|
||||
22: 14(int) Bitcast 21
|
||||
25: 24(ptr) ImageTexelPointer 17(s_uintbuff) 19 23
|
||||
27: 14(int) AtomicIAdd 25 26 23 22
|
||||
28: 11(int) Bitcast 27
|
||||
Store 13(Orig) 28
|
||||
ReturnValue 30
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user