HLSL: Fix #1332: consistently use uint for counter buf typing.

This commit is contained in:
John Kessenich
2018-04-10 11:57:20 -06:00
parent 1dcd162399
commit 6ae18707f9
9 changed files with 345 additions and 347 deletions

View File

@@ -16,12 +16,12 @@ local_size = (1, 1, 1)
0:14 0 (const uint)
0:14 add ( temp uint)
0:14 AtomicAdd ( temp uint)
0:14 @count: direct index for structure ( temp int)
0:14 'csb@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:14 @count: direct index for structure ( temp uint)
0:14 'csb@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer uint @count})
0:14 Constant:
0:14 0 (const int)
0:14 Constant:
0:14 -1 (const int)
0:14 4294967295 (const uint)
0:14 Constant:
0:14 -1 (const int)
0:15 Sequence
@@ -83,7 +83,7 @@ local_size = (1, 1, 1)
0:? Linker Objects
0:? 'outtx' (layout( rgba32f) uniform image2D)
0:? 'csb' (layout( binding=1 row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp 4-component vector of float color, temp 2-component vector of uint threadId} @data})
0:? 'csb@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:? 'csb@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer uint @count})
0:? 'rwsb' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:? 'nThreadId' ( in 3-component vector of uint GlobalInvocationID)
@@ -108,12 +108,12 @@ local_size = (1, 1, 1)
0:14 0 (const uint)
0:14 add ( temp uint)
0:14 AtomicAdd ( temp uint)
0:14 @count: direct index for structure ( temp int)
0:14 'csb@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:14 @count: direct index for structure ( temp uint)
0:14 'csb@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer uint @count})
0:14 Constant:
0:14 0 (const int)
0:14 Constant:
0:14 -1 (const int)
0:14 4294967295 (const uint)
0:14 Constant:
0:14 -1 (const int)
0:15 Sequence
@@ -175,18 +175,18 @@ local_size = (1, 1, 1)
0:? Linker Objects
0:? 'outtx' (layout( rgba32f) uniform image2D)
0:? 'csb' (layout( binding=1 row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp 4-component vector of float color, temp 2-component vector of uint threadId} @data})
0:? 'csb@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:? 'csb@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer uint @count})
0:? 'rwsb' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:? 'nThreadId' ( in 3-component vector of uint GlobalInvocationID)
// Module Version 10000
// Generated by (magic number): 80006
// Id's are bound by 84
// Id's are bound by 85
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main" 79
EntryPoint GLCompute 4 "main" 80
ExecutionMode 4 LocalSize 1 1 1
Source HLSL 500
Name 4 "main"
@@ -205,15 +205,15 @@ local_size = (1, 1, 1)
Name 26 "csb@count"
MemberName 26(csb@count) 0 "@count"
Name 28 "csb@count"
Name 48 "coord"
Name 52 "storeTemp"
Name 57 "outtx"
Name 63 "rwsb"
MemberName 63(rwsb) 0 "@data"
Name 65 "rwsb"
Name 77 "nThreadId"
Name 79 "nThreadId"
Name 81 "param"
Name 49 "coord"
Name 53 "storeTemp"
Name 58 "outtx"
Name 64 "rwsb"
MemberName 64(rwsb) 0 "@data"
Name 66 "rwsb"
Name 78 "nThreadId"
Name 80 "nThreadId"
Name 82 "param"
MemberDecorate 19(sb_t) 0 Offset 0
MemberDecorate 19(sb_t) 1 Offset 16
Decorate 20 ArrayStride 32
@@ -224,12 +224,12 @@ local_size = (1, 1, 1)
MemberDecorate 26(csb@count) 0 Offset 0
Decorate 26(csb@count) BufferBlock
Decorate 28(csb@count) DescriptorSet 0
Decorate 57(outtx) DescriptorSet 0
Decorate 62 ArrayStride 16
MemberDecorate 63(rwsb) 0 Offset 0
Decorate 63(rwsb) BufferBlock
Decorate 65(rwsb) DescriptorSet 0
Decorate 79(nThreadId) BuiltIn GlobalInvocationId
Decorate 58(outtx) DescriptorSet 0
Decorate 63 ArrayStride 16
MemberDecorate 64(rwsb) 0 Offset 0
Decorate 64(rwsb) BufferBlock
Decorate 66(rwsb) DescriptorSet 0
Decorate 80(nThreadId) BuiltIn GlobalInvocationId
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
@@ -248,79 +248,80 @@ local_size = (1, 1, 1)
23(csb): 22(ptr) Variable Uniform
24: TypeInt 32 1
25: 24(int) Constant 0
26(csb@count): TypeStruct 24(int)
26(csb@count): TypeStruct 6(int)
27: TypePointer Uniform 26(csb@count)
28(csb@count): 27(ptr) Variable Uniform
29: TypePointer Uniform 24(int)
31: 24(int) Constant 4294967295
29: TypePointer Uniform 6(int)
31: 6(int) Constant 4294967295
32: 6(int) Constant 1
33: 6(int) Constant 0
36: TypePointer Uniform 19(sb_t)
40: TypePointer Function 14(fvec4)
43: 24(int) Constant 1
44: TypePointer Function 15(ivec2)
46: TypeVector 13(float) 2
47: TypePointer Function 46(fvec2)
55: TypeImage 13(float) 2D nonsampled format:Rgba32f
56: TypePointer UniformConstant 55
57(outtx): 56(ptr) Variable UniformConstant
62: TypeRuntimeArray 14(fvec4)
63(rwsb): TypeStruct 62
64: TypePointer Uniform 63(rwsb)
65(rwsb): 64(ptr) Variable Uniform
66: TypePointer Function 13(float)
73: TypePointer Uniform 14(fvec4)
78: TypePointer Input 7(ivec3)
79(nThreadId): 78(ptr) Variable Input
35: 24(int) Constant 4294967295
37: TypePointer Uniform 19(sb_t)
41: TypePointer Function 14(fvec4)
44: 24(int) Constant 1
45: TypePointer Function 15(ivec2)
47: TypeVector 13(float) 2
48: TypePointer Function 47(fvec2)
56: TypeImage 13(float) 2D nonsampled format:Rgba32f
57: TypePointer UniformConstant 56
58(outtx): 57(ptr) Variable UniformConstant
63: TypeRuntimeArray 14(fvec4)
64(rwsb): TypeStruct 63
65: TypePointer Uniform 64(rwsb)
66(rwsb): 65(ptr) Variable Uniform
67: TypePointer Function 13(float)
74: TypePointer Uniform 14(fvec4)
79: TypePointer Input 7(ivec3)
80(nThreadId): 79(ptr) Variable Input
4(main): 2 Function None 3
5: Label
77(nThreadId): 8(ptr) Variable Function
81(param): 8(ptr) Variable Function
80: 7(ivec3) Load 79(nThreadId)
Store 77(nThreadId) 80
82: 7(ivec3) Load 77(nThreadId)
Store 81(param) 82
83: 2 FunctionCall 11(@main(vu3;) 81(param)
78(nThreadId): 8(ptr) Variable Function
82(param): 8(ptr) Variable Function
81: 7(ivec3) Load 80(nThreadId)
Store 78(nThreadId) 81
83: 7(ivec3) Load 78(nThreadId)
Store 82(param) 83
84: 2 FunctionCall 11(@main(vu3;) 82(param)
Return
FunctionEnd
11(@main(vu3;): 2 Function None 9
10(nThreadId): 8(ptr) FunctionParameter
12: Label
18(data): 17(ptr) Variable Function
48(coord): 47(ptr) Variable Function
52(storeTemp): 40(ptr) Variable Function
49(coord): 48(ptr) Variable Function
53(storeTemp): 41(ptr) Variable Function
30: 29(ptr) AccessChain 28(csb@count) 25
34: 6(int) AtomicIAdd 30 32 33 31
35: 6(int) IAdd 34 31
37: 36(ptr) AccessChain 23(csb) 25 35
38: 19(sb_t) Load 37
39: 14(fvec4) CompositeExtract 38 0
41: 40(ptr) AccessChain 18(data) 25
Store 41 39
42: 15(ivec2) CompositeExtract 38 1
45: 44(ptr) AccessChain 18(data) 43
Store 45 42
49: 44(ptr) AccessChain 18(data) 43
50: 15(ivec2) Load 49
51: 46(fvec2) ConvertUToF 50
Store 48(coord) 51
53: 40(ptr) AccessChain 18(data) 25
54: 14(fvec4) Load 53
Store 52(storeTemp) 54
58: 55 Load 57(outtx)
59: 46(fvec2) Load 48(coord)
60: 15(ivec2) ConvertFToU 59
61: 14(fvec4) Load 52(storeTemp)
ImageWrite 58 60 61
67: 66(ptr) AccessChain 48(coord) 33
68: 13(float) Load 67
69: 6(int) ConvertFToU 68
70: 66(ptr) AccessChain 48(coord) 32
71: 13(float) Load 70
72: 6(int) ConvertFToU 71
74: 73(ptr) AccessChain 65(rwsb) 25 72
75: 14(fvec4) Load 74
76: 73(ptr) AccessChain 65(rwsb) 25 69
Store 76 75
36: 6(int) IAdd 34 35
38: 37(ptr) AccessChain 23(csb) 25 36
39: 19(sb_t) Load 38
40: 14(fvec4) CompositeExtract 39 0
42: 41(ptr) AccessChain 18(data) 25
Store 42 40
43: 15(ivec2) CompositeExtract 39 1
46: 45(ptr) AccessChain 18(data) 44
Store 46 43
50: 45(ptr) AccessChain 18(data) 44
51: 15(ivec2) Load 50
52: 47(fvec2) ConvertUToF 51
Store 49(coord) 52
54: 41(ptr) AccessChain 18(data) 25
55: 14(fvec4) Load 54
Store 53(storeTemp) 55
59: 56 Load 58(outtx)
60: 47(fvec2) Load 49(coord)
61: 15(ivec2) ConvertFToU 60
62: 14(fvec4) Load 53(storeTemp)
ImageWrite 59 61 62
68: 67(ptr) AccessChain 49(coord) 33
69: 13(float) Load 68
70: 6(int) ConvertFToU 69
71: 67(ptr) AccessChain 49(coord) 32
72: 13(float) Load 71
73: 6(int) ConvertFToU 72
75: 74(ptr) AccessChain 66(rwsb) 25 73
76: 14(fvec4) Load 75
77: 74(ptr) AccessChain 66(rwsb) 25 70
Store 77 76
Return
FunctionEnd