SPV: Generate OpArrayLength with no signedness.

This commit is contained in:
John Kessenich
2018-11-27 09:19:10 -07:00
parent d41a8dca0c
commit e045c23a34
7 changed files with 124 additions and 140 deletions

View File

@@ -323,10 +323,6 @@ gl_FragCoord origin is upper left
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:? 'pos' (layout( location=0) flat in uint)
error: SPIRV-Tools Validation Errors
error: OpStore Pointer <id> '14[size]'s type does not match Object <id> '20's type.
OpStore %size %20
// Module Version 10000
// Generated by (magic number): 80007
// Id's are bound by 114
@@ -370,13 +366,13 @@ error: OpStore Pointer <id> '14[size]'s type does not match Object <id> '20's ty
16(sbuf): TypeStruct 15
17: TypePointer Uniform 16(sbuf)
18(sbuf): 17(ptr) Variable Uniform
19: TypeInt 32 1
21: 19(int) Constant 0
23: 19(int) Constant 2
20: TypeInt 32 1
21: 20(int) Constant 0
23: 20(int) Constant 2
25: TypePointer Uniform 6(int)
29: TypePointer Function 19(int)
29: TypePointer Function 20(int)
32: 6(int) Constant 4
39: 19(int) Constant 1
39: 20(int) Constant 1
43: TypeVector 6(int) 2
45: TypeVector 8(float) 2
47: 8(float) Constant 0
@@ -384,7 +380,7 @@ error: OpStore Pointer <id> '14[size]'s type does not match Object <id> '20's ty
69: TypeVector 6(int) 3
71: TypeVector 8(float) 3
80: 6(int) Constant 12
95: 19(int) Constant 3
95: 20(int) Constant 3
99: TypeVector 6(int) 4
106: TypePointer Input 6(int)
107(pos): 106(ptr) Variable Input
@@ -409,22 +405,22 @@ error: OpStore Pointer <id> '14[size]'s type does not match Object <id> '20's ty
30(byteAddrTemp): 29(ptr) Variable Function
53(byteAddrTemp): 29(ptr) Variable Function
78(byteAddrTemp): 29(ptr) Variable Function
20: 19(int) ArrayLength 18(sbuf) 0
Store 14(size) 20
19: 6(int) ArrayLength 18(sbuf) 0
Store 14(size) 19
22: 6(int) Load 11(pos)
24: 19(int) ShiftRightLogical 22 23
24: 20(int) ShiftRightLogical 22 23
26: 25(ptr) AccessChain 18(sbuf) 21 24
27: 6(int) Load 26
28: 8(float) ConvertUToF 27
31: 6(int) Load 11(pos)
33: 6(int) IAdd 31 32
34: 19(int) ShiftRightLogical 33 23
34: 20(int) ShiftRightLogical 33 23
Store 30(byteAddrTemp) 34
35: 19(int) Load 30(byteAddrTemp)
35: 20(int) Load 30(byteAddrTemp)
36: 25(ptr) AccessChain 18(sbuf) 21 35
37: 6(int) Load 36
38: 19(int) Load 30(byteAddrTemp)
40: 19(int) IAdd 38 39
38: 20(int) Load 30(byteAddrTemp)
40: 20(int) IAdd 38 39
41: 25(ptr) AccessChain 18(sbuf) 21 40
42: 6(int) Load 41
44: 43(ivec2) CompositeConstruct 37 42
@@ -436,17 +432,17 @@ error: OpStore Pointer <id> '14[size]'s type does not match Object <id> '20's ty
52: 9(fvec4) FAdd 51 50
54: 6(int) Load 11(pos)
56: 6(int) IAdd 54 55
57: 19(int) ShiftRightLogical 56 23
57: 20(int) ShiftRightLogical 56 23
Store 53(byteAddrTemp) 57
58: 19(int) Load 53(byteAddrTemp)
58: 20(int) Load 53(byteAddrTemp)
59: 25(ptr) AccessChain 18(sbuf) 21 58
60: 6(int) Load 59
61: 19(int) Load 53(byteAddrTemp)
62: 19(int) IAdd 61 39
61: 20(int) Load 53(byteAddrTemp)
62: 20(int) IAdd 61 39
63: 25(ptr) AccessChain 18(sbuf) 21 62
64: 6(int) Load 63
65: 19(int) Load 53(byteAddrTemp)
66: 19(int) IAdd 65 23
65: 20(int) Load 53(byteAddrTemp)
66: 20(int) IAdd 65 23
67: 25(ptr) AccessChain 18(sbuf) 21 66
68: 6(int) Load 67
70: 69(ivec3) CompositeConstruct 60 64 68
@@ -458,21 +454,21 @@ error: OpStore Pointer <id> '14[size]'s type does not match Object <id> '20's ty
77: 9(fvec4) FAdd 52 76
79: 6(int) Load 11(pos)
81: 6(int) IAdd 79 80
82: 19(int) ShiftRightLogical 81 23
82: 20(int) ShiftRightLogical 81 23
Store 78(byteAddrTemp) 82
83: 19(int) Load 78(byteAddrTemp)
83: 20(int) Load 78(byteAddrTemp)
84: 25(ptr) AccessChain 18(sbuf) 21 83
85: 6(int) Load 84
86: 19(int) Load 78(byteAddrTemp)
87: 19(int) IAdd 86 39
86: 20(int) Load 78(byteAddrTemp)
87: 20(int) IAdd 86 39
88: 25(ptr) AccessChain 18(sbuf) 21 87
89: 6(int) Load 88
90: 19(int) Load 78(byteAddrTemp)
91: 19(int) IAdd 90 23
90: 20(int) Load 78(byteAddrTemp)
91: 20(int) IAdd 90 23
92: 25(ptr) AccessChain 18(sbuf) 21 91
93: 6(int) Load 92
94: 19(int) Load 78(byteAddrTemp)
96: 19(int) IAdd 94 95
94: 20(int) Load 78(byteAddrTemp)
96: 20(int) IAdd 94 95
97: 25(ptr) AccessChain 18(sbuf) 21 96
98: 6(int) Load 97
100: 99(ivec4) CompositeConstruct 85 89 93 98