WIP: HLSL: add Append/ConsumeBuffer support

This commit is contained in:
steve-lunarg
2017-04-13 18:42:58 -06:00
parent 8e26feb8f2
commit 12bc9aa9ce
6 changed files with 361 additions and 63 deletions

View File

@@ -54,11 +54,14 @@ gl_FragCoord origin is upper left
0:16 Sequence
0:16 move second child to first child ( temp uint)
0:16 'c2' ( temp uint)
0:16 AtomicAdd ( temp uint)
0:16 @count: direct index for structure ( temp int)
0:16 'sbuf_rw_d@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:16 add ( temp uint)
0:16 AtomicAdd ( temp uint)
0:16 @count: direct index for structure ( temp int)
0:16 'sbuf_rw_d@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:16 Constant:
0:16 0 (const int)
0:16 Constant:
0:16 0 (const int)
0:16 -1 (const int)
0:16 Constant:
0:16 -1 (const int)
0:18 Branch: Return with expression
@@ -155,11 +158,14 @@ gl_FragCoord origin is upper left
0:16 Sequence
0:16 move second child to first child ( temp uint)
0:16 'c2' ( temp uint)
0:16 AtomicAdd ( temp uint)
0:16 @count: direct index for structure ( temp int)
0:16 'sbuf_rw_d@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:16 add ( temp uint)
0:16 AtomicAdd ( temp uint)
0:16 @count: direct index for structure ( temp int)
0:16 'sbuf_rw_d@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:16 Constant:
0:16 0 (const int)
0:16 Constant:
0:16 0 (const int)
0:16 -1 (const int)
0:16 Constant:
0:16 -1 (const int)
0:18 Branch: Return with expression
@@ -199,12 +205,12 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 69
// Id's are bound by 70
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 62 65
EntryPoint Fragment 4 "main" 63 66
ExecutionMode 4 OriginUpperLeft
Source HLSL 500
Name 4 "main"
@@ -222,10 +228,10 @@ gl_FragCoord origin is upper left
Name 36 "sbuf_rw_i@count"
Name 42 "c2"
Name 43 "sbuf_rw_d@count"
Name 60 "pos"
Name 62 "pos"
Name 65 "@entryPointOutput"
Name 66 "param"
Name 61 "pos"
Name 63 "pos"
Name 66 "@entryPointOutput"
Name 67 "param"
Decorate 19 ArrayStride 16
MemberDecorate 20(sbuf_rw_i) 0 Offset 0
Decorate 20(sbuf_rw_i) BufferBlock
@@ -236,8 +242,8 @@ gl_FragCoord origin is upper left
Decorate 34(sbuf_rw_i@count) BufferBlock
Decorate 36(sbuf_rw_i@count) DescriptorSet 0
Decorate 43(sbuf_rw_d@count) DescriptorSet 0
Decorate 62(pos) Location 0
Decorate 65(@entryPointOutput) Location 0
Decorate 63(pos) Location 0
Decorate 66(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
@@ -270,20 +276,20 @@ gl_FragCoord origin is upper left
40: 6(int) Constant 1
43(sbuf_rw_d@count): 35(ptr) Variable Uniform
45: 23(int) Constant 4294967295
61: TypePointer Input 6(int)
62(pos): 61(ptr) Variable Input
64: TypePointer Output 9(fvec4)
65(@entryPointOutput): 64(ptr) Variable Output
62: TypePointer Input 6(int)
63(pos): 62(ptr) Variable Input
65: TypePointer Output 9(fvec4)
66(@entryPointOutput): 65(ptr) Variable Output
4(main): 2 Function None 3
5: Label
60(pos): 7(ptr) Variable Function
66(param): 7(ptr) Variable Function
63: 6(int) Load 62(pos)
Store 60(pos) 63
67: 6(int) Load 60(pos)
Store 66(param) 67
68: 9(fvec4) FunctionCall 12(@main(u1;) 66(param)
Store 65(@entryPointOutput) 68
61(pos): 7(ptr) Variable Function
67(param): 7(ptr) Variable Function
64: 6(int) Load 63(pos)
Store 61(pos) 64
68: 6(int) Load 61(pos)
Store 67(param) 68
69: 9(fvec4) FunctionCall 12(@main(u1;) 67(param)
Store 66(@entryPointOutput) 69
Return
FunctionEnd
12(@main(u1;): 9(fvec4) Function None 10
@@ -300,17 +306,18 @@ gl_FragCoord origin is upper left
Store 33(c1) 41
44: 37(ptr) AccessChain 43(sbuf_rw_d@count) 24
46: 6(int) AtomicIAdd 44 40 17 45
Store 42(c2) 46
47: 7(ptr) AccessChain 16(result) 17
48: 6(int) Load 47
49: 8(float) ConvertUToF 48
50: 7(ptr) AccessChain 16(result) 40
51: 6(int) Load 50
52: 8(float) ConvertUToF 51
53: 6(int) Load 33(c1)
54: 8(float) ConvertUToF 53
55: 6(int) Load 42(c2)
56: 8(float) ConvertUToF 55
57: 9(fvec4) CompositeConstruct 49 52 54 56
ReturnValue 57
47: 6(int) IAdd 46 45
Store 42(c2) 47
48: 7(ptr) AccessChain 16(result) 17
49: 6(int) Load 48
50: 8(float) ConvertUToF 49
51: 7(ptr) AccessChain 16(result) 40
52: 6(int) Load 51
53: 8(float) ConvertUToF 52
54: 6(int) Load 33(c1)
55: 8(float) ConvertUToF 54
56: 6(int) Load 42(c2)
57: 8(float) ConvertUToF 56
58: 9(fvec4) CompositeConstruct 50 53 55 57
ReturnValue 58
FunctionEnd