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

@@ -53,44 +53,45 @@ local_size = (1, 1, 1)
// Module Version 10000
// Generated by (magic number): 80002
// Id's are bound by 22
// Id's are bound by 23
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "ComputeShaderFunction" 20
EntryPoint GLCompute 4 "ComputeShaderFunction" 21
ExecutionMode 4 LocalSize 1 1 1
Source HLSL 500
Name 4 "ComputeShaderFunction"
Name 8 "@ComputeShaderFunction("
Name 20 "@entryPointOutput"
Decorate 20(@entryPointOutput) Location 0
Name 21 "@entryPointOutput"
Decorate 21(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeFunction 6(float)
10: TypeInt 32 0
11: 10(int) Constant 1
12: 10(int) Constant 4048
13: 10(int) Constant 512
12: 10(int) Constant 4040
13: 10(int) Constant 4048
14: 10(int) Constant 2
15: 10(int) Constant 256
16: 6(float) Constant 0
19: TypePointer Output 6(float)
20(@entryPointOutput): 19(ptr) Variable Output
15: 10(int) Constant 512
16: 10(int) Constant 256
17: 6(float) Constant 0
20: TypePointer Output 6(float)
21(@entryPointOutput): 20(ptr) Variable Output
4(ComputeShaderFunction): 2 Function None 3
5: Label
21: 6(float) FunctionCall 8(@ComputeShaderFunction()
Store 20(@entryPointOutput) 21
22: 6(float) FunctionCall 8(@ComputeShaderFunction()
Store 21(@entryPointOutput) 22
Return
FunctionEnd
8(@ComputeShaderFunction(): 6(float) Function None 7
9: Label
MemoryBarrier 11 12
ControlBarrier 11 11 12
MemoryBarrier 11 13
ControlBarrier 11 11 13
MemoryBarrier 14 15
ControlBarrier 14 14 15
ReturnValue 16
MemoryBarrier 14 12
ControlBarrier 11 11 15
MemoryBarrier 14 16
ControlBarrier 14 14 16
ReturnValue 17
FunctionEnd