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

@ -0,0 +1,46 @@
spv.barrier.vert
// Module Version 10000
// Generated by (magic number): 80002
// Id's are bound by 24
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 9 15
Source GLSL 450
Name 4 "main"
Name 9 "c0"
Name 15 "c1"
Decorate 9(c0) Location 0
Decorate 15(c1) Location 1
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8: TypePointer Output 7(fvec4)
9(c0): 8(ptr) Variable Output
10: 6(float) Constant 1065353216
11: 7(fvec4) ConstantComposite 10 10 10 10
12: TypeInt 32 0
13: 12(int) Constant 1
14: 12(int) Constant 4040
15(c1): 8(ptr) Variable Output
16: 12(int) Constant 72
20: 12(int) Constant 2056
4(main): 2 Function None 3
5: Label
Store 9(c0) 11
MemoryBarrier 13 14
Store 15(c1) 11
MemoryBarrier 13 16
17: 7(fvec4) Load 9(c0)
18: 7(fvec4) CompositeConstruct 10 10 10 10
19: 7(fvec4) FAdd 17 18
Store 9(c0) 19
MemoryBarrier 13 20
21: 7(fvec4) Load 9(c0)
22: 7(fvec4) CompositeConstruct 10 10 10 10
23: 7(fvec4) FAdd 21 22
Store 9(c0) 23
Return
FunctionEnd