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.load.rwbuffer.dx10.frag
|
||||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
0:? Sequence
|
||||
0:22 Function Definition: main( (temp structure{temp 4-component vector of float Color})
|
||||
0:22 Function Definition: @main( (temp structure{temp 4-component vector of float Color})
|
||||
0:22 Function Parameters:
|
||||
0:? Sequence
|
||||
0:25 imageLoad (temp 4-component vector of float)
|
||||
@@ -33,20 +33,23 @@ gl_FragCoord origin is upper left
|
||||
0:29 1.000000
|
||||
0:29 1.000000
|
||||
0:29 1.000000
|
||||
0:31 Sequence
|
||||
0:31 Sequence
|
||||
0:31 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:31 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:31 'psout' (temp structure{temp 4-component vector of float Color})
|
||||
0:31 Constant:
|
||||
0:31 0 (const int)
|
||||
0:31 Branch: Return
|
||||
0:31 Branch: Return with expression
|
||||
0:31 'psout' (temp structure{temp 4-component vector of float Color})
|
||||
0:22 Function Definition: main( (temp void)
|
||||
0:22 Function Parameters:
|
||||
0:? Sequence
|
||||
0:22 Sequence
|
||||
0:22 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:22 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:22 Function Call: @main( (temp structure{temp 4-component vector of float Color})
|
||||
0:22 Constant:
|
||||
0:22 0 (const int)
|
||||
0:? Linker Objects
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:? 'g_tBuffF' (layout(rgba32f ) uniform imageBuffer)
|
||||
0:? 'g_tBuffI' (layout(rgba32i ) uniform iimageBuffer)
|
||||
0:? 'g_tBuffU' (layout(rgba32ui ) uniform uimageBuffer)
|
||||
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 c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||
|
||||
|
||||
@@ -56,7 +59,7 @@ Linked fragment stage:
|
||||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
0:? Sequence
|
||||
0:22 Function Definition: main( (temp structure{temp 4-component vector of float Color})
|
||||
0:22 Function Definition: @main( (temp structure{temp 4-component vector of float Color})
|
||||
0:22 Function Parameters:
|
||||
0:? Sequence
|
||||
0:25 imageLoad (temp 4-component vector of float)
|
||||
@@ -87,114 +90,124 @@ gl_FragCoord origin is upper left
|
||||
0:29 1.000000
|
||||
0:29 1.000000
|
||||
0:29 1.000000
|
||||
0:31 Sequence
|
||||
0:31 Sequence
|
||||
0:31 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:31 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:31 'psout' (temp structure{temp 4-component vector of float Color})
|
||||
0:31 Constant:
|
||||
0:31 0 (const int)
|
||||
0:31 Branch: Return
|
||||
0:31 Branch: Return with expression
|
||||
0:31 'psout' (temp structure{temp 4-component vector of float Color})
|
||||
0:22 Function Definition: main( (temp void)
|
||||
0:22 Function Parameters:
|
||||
0:? Sequence
|
||||
0:22 Sequence
|
||||
0:22 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:22 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:22 Function Call: @main( (temp structure{temp 4-component vector of float Color})
|
||||
0:22 Constant:
|
||||
0:22 0 (const int)
|
||||
0:? Linker Objects
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:? 'g_tBuffF' (layout(rgba32f ) uniform imageBuffer)
|
||||
0:? 'g_tBuffI' (layout(rgba32i ) uniform iimageBuffer)
|
||||
0:? 'g_tBuffU' (layout(rgba32ui ) uniform uimageBuffer)
|
||||
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 c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 52
|
||||
// Id's are bound by 57
|
||||
|
||||
Capability Shader
|
||||
Capability SampledBuffer
|
||||
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 9 "g_tBuffF"
|
||||
Name 15 "$Global"
|
||||
MemberName 15($Global) 0 "c1"
|
||||
MemberName 15($Global) 1 "c2"
|
||||
MemberName 15($Global) 2 "c3"
|
||||
MemberName 15($Global) 3 "c4"
|
||||
MemberName 15($Global) 4 "o1"
|
||||
MemberName 15($Global) 5 "o2"
|
||||
MemberName 15($Global) 6 "o3"
|
||||
MemberName 15($Global) 7 "o4"
|
||||
Name 17 ""
|
||||
Name 27 "g_tBuffU"
|
||||
Name 35 "g_tBuffI"
|
||||
Name 40 "PS_OUTPUT"
|
||||
MemberName 40(PS_OUTPUT) 0 "Color"
|
||||
Name 42 "psout"
|
||||
Name 48 "Color"
|
||||
Decorate 9(g_tBuffF) DescriptorSet 0
|
||||
MemberDecorate 15($Global) 0 Offset 0
|
||||
MemberDecorate 15($Global) 1 Offset 8
|
||||
MemberDecorate 15($Global) 2 Offset 16
|
||||
MemberDecorate 15($Global) 3 Offset 32
|
||||
MemberDecorate 15($Global) 4 Offset 48
|
||||
MemberDecorate 15($Global) 5 Offset 56
|
||||
MemberDecorate 15($Global) 6 Offset 64
|
||||
MemberDecorate 15($Global) 7 Offset 80
|
||||
Decorate 15($Global) Block
|
||||
Decorate 17 DescriptorSet 0
|
||||
Decorate 27(g_tBuffU) DescriptorSet 0
|
||||
Decorate 35(g_tBuffI) DescriptorSet 0
|
||||
Decorate 48(Color) Location 0
|
||||
Name 8 "PS_OUTPUT"
|
||||
MemberName 8(PS_OUTPUT) 0 "Color"
|
||||
Name 10 "@main("
|
||||
Name 14 "g_tBuffF"
|
||||
Name 20 "$Global"
|
||||
MemberName 20($Global) 0 "c1"
|
||||
MemberName 20($Global) 1 "c2"
|
||||
MemberName 20($Global) 2 "c3"
|
||||
MemberName 20($Global) 3 "c4"
|
||||
MemberName 20($Global) 4 "o1"
|
||||
MemberName 20($Global) 5 "o2"
|
||||
MemberName 20($Global) 6 "o3"
|
||||
MemberName 20($Global) 7 "o4"
|
||||
Name 22 ""
|
||||
Name 31 "g_tBuffU"
|
||||
Name 39 "g_tBuffI"
|
||||
Name 45 "psout"
|
||||
Name 54 "Color"
|
||||
Decorate 14(g_tBuffF) DescriptorSet 0
|
||||
MemberDecorate 20($Global) 0 Offset 0
|
||||
MemberDecorate 20($Global) 1 Offset 8
|
||||
MemberDecorate 20($Global) 2 Offset 16
|
||||
MemberDecorate 20($Global) 3 Offset 32
|
||||
MemberDecorate 20($Global) 4 Offset 48
|
||||
MemberDecorate 20($Global) 5 Offset 56
|
||||
MemberDecorate 20($Global) 6 Offset 64
|
||||
MemberDecorate 20($Global) 7 Offset 80
|
||||
Decorate 20($Global) Block
|
||||
Decorate 22 DescriptorSet 0
|
||||
Decorate 31(g_tBuffU) DescriptorSet 0
|
||||
Decorate 39(g_tBuffI) DescriptorSet 0
|
||||
Decorate 54(Color) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeImage 6(float) Buffer nonsampled format:Rgba32f
|
||||
8: TypePointer UniformConstant 7
|
||||
9(g_tBuffF): 8(ptr) Variable UniformConstant
|
||||
11: TypeInt 32 1
|
||||
12: TypeVector 11(int) 2
|
||||
13: TypeVector 11(int) 3
|
||||
14: TypeVector 11(int) 4
|
||||
15($Global): TypeStruct 11(int) 12(ivec2) 13(ivec3) 14(ivec4) 11(int) 12(ivec2) 13(ivec3) 14(ivec4)
|
||||
16: TypePointer Uniform 15($Global)
|
||||
17: 16(ptr) Variable Uniform
|
||||
18: 11(int) Constant 0
|
||||
19: TypePointer Uniform 11(int)
|
||||
22: TypeVector 6(float) 4
|
||||
24: TypeInt 32 0
|
||||
25: TypeImage 24(int) Buffer nonsampled format:Rgba32ui
|
||||
26: TypePointer UniformConstant 25
|
||||
27(g_tBuffU): 26(ptr) Variable UniformConstant
|
||||
31: TypeVector 24(int) 4
|
||||
33: TypeImage 11(int) Buffer nonsampled format:Rgba32i
|
||||
34: TypePointer UniformConstant 33
|
||||
35(g_tBuffI): 34(ptr) Variable UniformConstant
|
||||
40(PS_OUTPUT): TypeStruct 22(fvec4)
|
||||
41: TypePointer Function 40(PS_OUTPUT)
|
||||
43: 6(float) Constant 1065353216
|
||||
44: 22(fvec4) ConstantComposite 43 43 43 43
|
||||
45: TypePointer Function 22(fvec4)
|
||||
47: TypePointer Output 22(fvec4)
|
||||
48(Color): 47(ptr) Variable Output
|
||||
7: TypeVector 6(float) 4
|
||||
8(PS_OUTPUT): TypeStruct 7(fvec4)
|
||||
9: TypeFunction 8(PS_OUTPUT)
|
||||
12: TypeImage 6(float) Buffer nonsampled format:Rgba32f
|
||||
13: TypePointer UniformConstant 12
|
||||
14(g_tBuffF): 13(ptr) Variable UniformConstant
|
||||
16: TypeInt 32 1
|
||||
17: TypeVector 16(int) 2
|
||||
18: TypeVector 16(int) 3
|
||||
19: TypeVector 16(int) 4
|
||||
20($Global): TypeStruct 16(int) 17(ivec2) 18(ivec3) 19(ivec4) 16(int) 17(ivec2) 18(ivec3) 19(ivec4)
|
||||
21: TypePointer Uniform 20($Global)
|
||||
22: 21(ptr) Variable Uniform
|
||||
23: 16(int) Constant 0
|
||||
24: TypePointer Uniform 16(int)
|
||||
28: TypeInt 32 0
|
||||
29: TypeImage 28(int) Buffer nonsampled format:Rgba32ui
|
||||
30: TypePointer UniformConstant 29
|
||||
31(g_tBuffU): 30(ptr) Variable UniformConstant
|
||||
35: TypeVector 28(int) 4
|
||||
37: TypeImage 16(int) Buffer nonsampled format:Rgba32i
|
||||
38: TypePointer UniformConstant 37
|
||||
39(g_tBuffI): 38(ptr) Variable UniformConstant
|
||||
44: TypePointer Function 8(PS_OUTPUT)
|
||||
46: 6(float) Constant 1065353216
|
||||
47: 7(fvec4) ConstantComposite 46 46 46 46
|
||||
48: TypePointer Function 7(fvec4)
|
||||
53: TypePointer Output 7(fvec4)
|
||||
54(Color): 53(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
42(psout): 41(ptr) Variable Function
|
||||
10: 7 Load 9(g_tBuffF)
|
||||
20: 19(ptr) AccessChain 17 18
|
||||
21: 11(int) Load 20
|
||||
23: 22(fvec4) ImageRead 10 21
|
||||
28: 25 Load 27(g_tBuffU)
|
||||
29: 19(ptr) AccessChain 17 18
|
||||
30: 11(int) Load 29
|
||||
32: 31(ivec4) ImageRead 28 30
|
||||
36: 33 Load 35(g_tBuffI)
|
||||
37: 19(ptr) AccessChain 17 18
|
||||
38: 11(int) Load 37
|
||||
39: 14(ivec4) ImageRead 36 38
|
||||
46: 45(ptr) AccessChain 42(psout) 18
|
||||
Store 46 44
|
||||
49: 45(ptr) AccessChain 42(psout) 18
|
||||
50: 22(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
|
||||
45(psout): 44(ptr) Variable Function
|
||||
15: 12 Load 14(g_tBuffF)
|
||||
25: 24(ptr) AccessChain 22 23
|
||||
26: 16(int) Load 25
|
||||
27: 7(fvec4) ImageRead 15 26
|
||||
32: 29 Load 31(g_tBuffU)
|
||||
33: 24(ptr) AccessChain 22 23
|
||||
34: 16(int) Load 33
|
||||
36: 35(ivec4) ImageRead 32 34
|
||||
40: 37 Load 39(g_tBuffI)
|
||||
41: 24(ptr) AccessChain 22 23
|
||||
42: 16(int) Load 41
|
||||
43: 19(ivec4) ImageRead 40 42
|
||||
49: 48(ptr) AccessChain 45(psout) 23
|
||||
Store 49 47
|
||||
50:8(PS_OUTPUT) Load 45(psout)
|
||||
ReturnValue 50
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user