SPV: Change barrier emission to conform to Khronos decisions.

The memory model group agreed to these definitions for how
to map GLSL barrier, memoryBarrier, etc. With HLSL following suit.
This commit is contained in:
John Kessenich
2017-12-11 04:02:24 -07:00
parent 070aaeafcd
commit 8297936dd6
19 changed files with 600 additions and 520 deletions

View File

@@ -357,12 +357,12 @@ triangle order = cw
// Module Version 10000
// Generated by (magic number): 80002
// Id's are bound by 128
// Id's are bound by 127
Capability Tessellation
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint TessellationControl 4 "main" 72 76 79 83 111 124
EntryPoint TessellationControl 4 "main" 72 76 79 83 110 123
ExecutionMode 4 OutputVertices 3
ExecutionMode 4 Triangles
ExecutionMode 4 SpacingEqual
@@ -404,8 +404,8 @@ triangle order = cw
Name 102 "@patchConstantResult"
Name 103 "param"
Name 105 "param"
Name 111 "@patchConstantOutput.edges"
Name 124 "@patchConstantOutput.inside"
Name 110 "@patchConstantOutput.edges"
Name 123 "@patchConstantOutput.inside"
MemberDecorate 33(TessellationBuffer) 0 Offset 0
MemberDecorate 33(TessellationBuffer) 1 Offset 4
Decorate 33(TessellationBuffer) Block
@@ -415,10 +415,10 @@ triangle order = cw
Decorate 76(pointId) BuiltIn InvocationId
Decorate 79(patchId) BuiltIn PrimitiveId
Decorate 83(@entryPointOutput) Location 0
Decorate 111(@patchConstantOutput.edges) Patch
Decorate 111(@patchConstantOutput.edges) BuiltIn TessLevelOuter
Decorate 124(@patchConstantOutput.inside) Patch
Decorate 124(@patchConstantOutput.inside) BuiltIn TessLevelInner
Decorate 110(@patchConstantOutput.edges) Patch
Decorate 110(@patchConstantOutput.edges) BuiltIn TessLevelOuter
Decorate 123(@patchConstantOutput.inside) Patch
Decorate 123(@patchConstantOutput.inside) BuiltIn TessLevelInner
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -458,17 +458,16 @@ triangle order = cw
83(@entryPointOutput): 82(ptr) Variable Output
92: TypePointer Output 22(HullOutputType)
94: 10(int) Constant 2
95: 10(int) Constant 1
95: 10(int) Constant 4
96: 10(int) Constant 0
98: TypeBool
108: 10(int) Constant 4
109: TypeArray 6(float) 108
110: TypePointer Output 109
111(@patchConstantOutput.edges): 110(ptr) Variable Output
114: TypePointer Output 6(float)
122: TypeArray 6(float) 94
123: TypePointer Output 122
124(@patchConstantOutput.inside): 123(ptr) Variable Output
108: TypeArray 6(float) 95
109: TypePointer Output 108
110(@patchConstantOutput.edges): 109(ptr) Variable Output
113: TypePointer Output 6(float)
121: TypeArray 6(float) 94
122: TypePointer Output 121
123(@patchConstantOutput.inside): 122(ptr) Variable Output
4(main): 2 Function None 3
5: Label
70(patch): 13(ptr) Variable Function
@@ -508,22 +507,22 @@ triangle order = cw
Store 105(param) 106
107:16(ConstantOutputType) FunctionCall 20(ColorPatchConstantFunction(struct-HullInputType-vf3-vf41[3];u1;) 103(param) 105(param)
Store 102(@patchConstantResult) 107
112: 39(ptr) AccessChain 102(@patchConstantResult) 32 32
113: 6(float) Load 112
115: 114(ptr) AccessChain 111(@patchConstantOutput.edges) 32
Store 115 113
116: 39(ptr) AccessChain 102(@patchConstantResult) 32 41
117: 6(float) Load 116
118: 114(ptr) AccessChain 111(@patchConstantOutput.edges) 41
Store 118 117
119: 39(ptr) AccessChain 102(@patchConstantResult) 32 45
120: 6(float) Load 119
121: 114(ptr) AccessChain 111(@patchConstantOutput.edges) 45
Store 121 120
125: 39(ptr) AccessChain 102(@patchConstantResult) 41
126: 6(float) Load 125
127: 114(ptr) AccessChain 124(@patchConstantOutput.inside) 32
Store 127 126
111: 39(ptr) AccessChain 102(@patchConstantResult) 32 32
112: 6(float) Load 111
114: 113(ptr) AccessChain 110(@patchConstantOutput.edges) 32
Store 114 112
115: 39(ptr) AccessChain 102(@patchConstantResult) 32 41
116: 6(float) Load 115
117: 113(ptr) AccessChain 110(@patchConstantOutput.edges) 41
Store 117 116
118: 39(ptr) AccessChain 102(@patchConstantResult) 32 45
119: 6(float) Load 118
120: 113(ptr) AccessChain 110(@patchConstantOutput.edges) 45
Store 120 119
124: 39(ptr) AccessChain 102(@patchConstantResult) 41
125: 6(float) Load 124
126: 113(ptr) AccessChain 123(@patchConstantOutput.inside) 32
Store 126 125
Branch 101
101: Label
Return