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

@ -13,12 +13,12 @@ gl_FragCoord origin is upper left
0:8 Constant:
0:8 0 (const uint)
0:8 AtomicAdd ( temp uint)
0:8 @count: direct index for structure ( temp int)
0:8 'sbuf_a@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:8 @count: direct index for structure ( temp uint)
0:8 'sbuf_a@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer uint @count})
0:8 Constant:
0:8 0 (const int)
0:8 Constant:
0:8 1 (const int)
0:8 1 (const uint)
0:? Constant:
0:? 1.000000
0:? 2.000000
@ -32,12 +32,12 @@ gl_FragCoord origin is upper left
0:10 0 (const uint)
0:10 add ( temp uint)
0:10 AtomicAdd ( temp uint)
0:10 @count: direct index for structure ( temp int)
0:10 'sbuf_c@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:10 @count: direct index for structure ( temp uint)
0:10 'sbuf_c@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer uint @count})
0:10 Constant:
0:10 0 (const int)
0:10 Constant:
0:10 -1 (const int)
0:10 4294967295 (const uint)
0:10 Constant:
0:10 -1 (const int)
0:7 Function Definition: main( ( temp void)
@ -52,9 +52,9 @@ gl_FragCoord origin is upper left
0:? 'pos' ( temp uint)
0:? Linker Objects
0:? 'sbuf_a' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:? 'sbuf_a@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:? 'sbuf_a@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer uint @count})
0:? 'sbuf_c' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:? 'sbuf_c@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:? 'sbuf_c@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer uint @count})
0:? 'sbuf_unused' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:? 'pos' (layout( location=0) flat in uint)
@ -77,12 +77,12 @@ gl_FragCoord origin is upper left
0:8 Constant:
0:8 0 (const uint)
0:8 AtomicAdd ( temp uint)
0:8 @count: direct index for structure ( temp int)
0:8 'sbuf_a@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:8 @count: direct index for structure ( temp uint)
0:8 'sbuf_a@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer uint @count})
0:8 Constant:
0:8 0 (const int)
0:8 Constant:
0:8 1 (const int)
0:8 1 (const uint)
0:? Constant:
0:? 1.000000
0:? 2.000000
@ -96,12 +96,12 @@ gl_FragCoord origin is upper left
0:10 0 (const uint)
0:10 add ( temp uint)
0:10 AtomicAdd ( temp uint)
0:10 @count: direct index for structure ( temp int)
0:10 'sbuf_c@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:10 @count: direct index for structure ( temp uint)
0:10 'sbuf_c@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer uint @count})
0:10 Constant:
0:10 0 (const int)
0:10 Constant:
0:10 -1 (const int)
0:10 4294967295 (const uint)
0:10 Constant:
0:10 -1 (const int)
0:7 Function Definition: main( ( temp void)
@ -116,9 +116,9 @@ gl_FragCoord origin is upper left
0:? 'pos' ( temp uint)
0:? Linker Objects
0:? 'sbuf_a' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:? 'sbuf_a@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:? 'sbuf_a@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer uint @count})
0:? 'sbuf_c' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:? 'sbuf_c@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:? 'sbuf_c@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer uint @count})
0:? 'sbuf_unused' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:? 'pos' (layout( location=0) flat in uint)
@ -142,8 +142,8 @@ gl_FragCoord origin is upper left
Name 20 "sbuf_a@count"
MemberName 20(sbuf_a@count) 0 "@count"
Name 22 "sbuf_a@count"
Name 36 "sbuf_c"
Name 37 "sbuf_c@count"
Name 35 "sbuf_c"
Name 36 "sbuf_c@count"
Name 46 "pos"
Name 48 "pos"
Name 51 "@entryPointOutput"
@ -156,8 +156,8 @@ gl_FragCoord origin is upper left
MemberDecorate 20(sbuf_a@count) 0 Offset 0
Decorate 20(sbuf_a@count) BufferBlock
Decorate 22(sbuf_a@count) DescriptorSet 0
Decorate 36(sbuf_c) DescriptorSet 0
Decorate 37(sbuf_c@count) DescriptorSet 0
Decorate 35(sbuf_c) DescriptorSet 0
Decorate 36(sbuf_c@count) DescriptorSet 0
Decorate 48(pos) Flat
Decorate 48(pos) Location 0
Decorate 51(@entryPointOutput) Location 0
@ -175,22 +175,22 @@ gl_FragCoord origin is upper left
17(sbuf_a): 16(ptr) Variable Uniform
18: TypeInt 32 1
19: 18(int) Constant 0
20(sbuf_a@count): TypeStruct 18(int)
20(sbuf_a@count): TypeStruct 6(int)
21: TypePointer Uniform 20(sbuf_a@count)
22(sbuf_a@count): 21(ptr) Variable Uniform
23: TypePointer Uniform 18(int)
25: 18(int) Constant 1
26: 6(int) Constant 1
27: 6(int) Constant 0
29: 8(float) Constant 1065353216
30: 8(float) Constant 1073741824
31: 8(float) Constant 1077936128
32: 8(float) Constant 1082130432
33: 9(fvec4) ConstantComposite 29 30 31 32
34: TypePointer Uniform 9(fvec4)
36(sbuf_c): 16(ptr) Variable Uniform
37(sbuf_c@count): 21(ptr) Variable Uniform
39: 18(int) Constant 4294967295
23: TypePointer Uniform 6(int)
25: 6(int) Constant 1
26: 6(int) Constant 0
28: 8(float) Constant 1065353216
29: 8(float) Constant 1073741824
30: 8(float) Constant 1077936128
31: 8(float) Constant 1082130432
32: 9(fvec4) ConstantComposite 28 29 30 31
33: TypePointer Uniform 9(fvec4)
35(sbuf_c): 16(ptr) Variable Uniform
36(sbuf_c@count): 21(ptr) Variable Uniform
38: 6(int) Constant 4294967295
40: 18(int) Constant 4294967295
47: TypePointer Input 6(int)
48(pos): 47(ptr) Variable Input
50: TypePointer Output 9(fvec4)
@ -212,13 +212,13 @@ gl_FragCoord origin is upper left
11(pos): 7(ptr) FunctionParameter
13: Label
24: 23(ptr) AccessChain 22(sbuf_a@count) 19
28: 6(int) AtomicIAdd 24 26 27 25
35: 34(ptr) AccessChain 17(sbuf_a) 19 28
Store 35 33
38: 23(ptr) AccessChain 37(sbuf_c@count) 19
40: 6(int) AtomicIAdd 38 26 27 39
41: 6(int) IAdd 40 39
42: 34(ptr) AccessChain 36(sbuf_c) 19 41
27: 6(int) AtomicIAdd 24 25 26 25
34: 33(ptr) AccessChain 17(sbuf_a) 19 27
Store 34 32
37: 23(ptr) AccessChain 36(sbuf_c@count) 19
39: 6(int) AtomicIAdd 37 25 26 38
41: 6(int) IAdd 39 40
42: 33(ptr) AccessChain 35(sbuf_c) 19 41
43: 9(fvec4) Load 42
ReturnValue 43
FunctionEnd