Merge pull request #974 from LoopDawg/anyall-types

HLSL: handle type conversion for any/all intrinsics
This commit is contained in:
John Kessenich 2017-07-05 13:12:08 -06:00 committed by GitHub
commit 33bf7b2f89
4 changed files with 3930 additions and 3800 deletions

View File

@ -11,7 +11,8 @@ local_size = (1, 1, 1)
0:17 'inU1' ( in uint)
0:? Sequence
0:21 all ( temp bool)
0:21 'inF0' ( in float)
0:21 Convert float to bool ( temp bool)
0:21 'inF0' ( in float)
0:24 AtomicAdd ( temp void)
0:24 'gs_ua' ( shared uint)
0:24 'gs_ub' ( shared uint)
@ -92,7 +93,8 @@ local_size = (1, 1, 1)
0:51 'inU1' ( in 2-component vector of uint)
0:? Sequence
0:55 all ( temp bool)
0:55 'inF0' ( in 2-component vector of float)
0:55 Convert float to bool ( temp 2-component vector of bool)
0:55 'inF0' ( in 2-component vector of float)
0:58 AtomicAdd ( temp void)
0:58 'gs_ua2' ( shared 2-component vector of uint)
0:58 'gs_ub2' ( shared 2-component vector of uint)
@ -165,7 +167,8 @@ local_size = (1, 1, 1)
0:78 'inU1' ( in 3-component vector of uint)
0:? Sequence
0:82 all ( temp bool)
0:82 'inF0' ( in 3-component vector of float)
0:82 Convert float to bool ( temp 3-component vector of bool)
0:82 'inF0' ( in 3-component vector of float)
0:85 AtomicAdd ( temp void)
0:85 'gs_ua3' ( shared 3-component vector of uint)
0:85 'gs_ub3' ( shared 3-component vector of uint)
@ -239,7 +242,8 @@ local_size = (1, 1, 1)
0:105 'inU1' ( in 4-component vector of uint)
0:? Sequence
0:109 all ( temp bool)
0:109 'inF0' ( in 4-component vector of float)
0:109 Convert float to bool ( temp 4-component vector of bool)
0:109 'inF0' ( in 4-component vector of float)
0:112 AtomicAdd ( temp void)
0:112 'gs_ua4' ( shared 4-component vector of uint)
0:112 'gs_ub4' ( shared 4-component vector of uint)
@ -367,7 +371,8 @@ local_size = (1, 1, 1)
0:17 'inU1' ( in uint)
0:? Sequence
0:21 all ( temp bool)
0:21 'inF0' ( in float)
0:21 Convert float to bool ( temp bool)
0:21 'inF0' ( in float)
0:24 AtomicAdd ( temp void)
0:24 'gs_ua' ( shared uint)
0:24 'gs_ub' ( shared uint)
@ -448,7 +453,8 @@ local_size = (1, 1, 1)
0:51 'inU1' ( in 2-component vector of uint)
0:? Sequence
0:55 all ( temp bool)
0:55 'inF0' ( in 2-component vector of float)
0:55 Convert float to bool ( temp 2-component vector of bool)
0:55 'inF0' ( in 2-component vector of float)
0:58 AtomicAdd ( temp void)
0:58 'gs_ua2' ( shared 2-component vector of uint)
0:58 'gs_ub2' ( shared 2-component vector of uint)
@ -521,7 +527,8 @@ local_size = (1, 1, 1)
0:78 'inU1' ( in 3-component vector of uint)
0:? Sequence
0:82 all ( temp bool)
0:82 'inF0' ( in 3-component vector of float)
0:82 Convert float to bool ( temp 3-component vector of bool)
0:82 'inF0' ( in 3-component vector of float)
0:85 AtomicAdd ( temp void)
0:85 'gs_ua3' ( shared 3-component vector of uint)
0:85 'gs_ub3' ( shared 3-component vector of uint)
@ -595,7 +602,8 @@ local_size = (1, 1, 1)
0:105 'inU1' ( in 4-component vector of uint)
0:? Sequence
0:109 all ( temp bool)
0:109 'inF0' ( in 4-component vector of float)
0:109 Convert float to bool ( temp 4-component vector of bool)
0:109 'inF0' ( in 4-component vector of float)
0:112 AtomicAdd ( temp void)
0:112 'gs_ua4' ( shared 4-component vector of uint)
0:112 'gs_ub4' ( shared 4-component vector of uint)
@ -709,12 +717,12 @@ local_size = (1, 1, 1)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 255
// Id's are bound by 265
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "ComputeShaderFunction" 227 230 233 237 240 243
EntryPoint GLCompute 4 "ComputeShaderFunction" 237 240 243 247 250 253
ExecutionMode 4 LocalSize 1 1 1
Source HLSL 500
Name 4 "ComputeShaderFunction"
@ -746,44 +754,44 @@ local_size = (1, 1, 1)
Name 55 "inF2"
Name 56 "inU0"
Name 57 "inU1"
Name 64 "gs_ua"
Name 65 "gs_ub"
Name 70 "out_u1"
Name 78 "gs_uc"
Name 107 "gs_ua2"
Name 108 "gs_ub2"
Name 111 "out_u2"
Name 119 "gs_uc2"
Name 148 "gs_ua3"
Name 149 "gs_ub3"
Name 152 "out_u3"
Name 160 "gs_uc3"
Name 188 "gs_ua4"
Name 189 "gs_ub4"
Name 192 "out_u4"
Name 200 "gs_uc4"
Name 225 "inF0"
Name 227 "inF0"
Name 229 "inF1"
Name 230 "inF1"
Name 232 "inF2"
Name 233 "inF2"
Name 235 "inU0"
Name 237 "inU0"
Name 239 "inU1"
Name 240 "inU1"
Name 243 "@entryPointOutput"
Name 244 "param"
Name 246 "param"
Name 248 "param"
Name 250 "param"
Name 252 "param"
Decorate 227(inF0) Location 0
Decorate 230(inF1) Location 1
Decorate 233(inF2) Location 2
Decorate 237(inU0) Location 3
Decorate 240(inU1) Location 4
Decorate 243(@entryPointOutput) Location 0
Name 66 "gs_ua"
Name 67 "gs_ub"
Name 72 "out_u1"
Name 80 "gs_uc"
Name 111 "gs_ua2"
Name 112 "gs_ub2"
Name 115 "out_u2"
Name 123 "gs_uc2"
Name 155 "gs_ua3"
Name 156 "gs_ub3"
Name 159 "out_u3"
Name 167 "gs_uc3"
Name 198 "gs_ua4"
Name 199 "gs_ub4"
Name 202 "out_u4"
Name 210 "gs_uc4"
Name 235 "inF0"
Name 237 "inF0"
Name 239 "inF1"
Name 240 "inF1"
Name 242 "inF2"
Name 243 "inF2"
Name 245 "inU0"
Name 247 "inU0"
Name 249 "inU1"
Name 250 "inU1"
Name 253 "@entryPointOutput"
Name 254 "param"
Name 256 "param"
Name 258 "param"
Name 260 "param"
Name 262 "param"
Decorate 237(inF0) Location 0
Decorate 240(inF1) Location 1
Decorate 243(inF2) Location 2
Decorate 247(inU0) Location 3
Decorate 250(inU1) Location 4
Decorate 253(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -808,75 +816,81 @@ local_size = (1, 1, 1)
51: TypePointer Function 50(ivec4)
52: TypeFunction 48(fvec4) 49(ptr) 49(ptr) 49(ptr) 51(ptr) 51(ptr)
61: TypeBool
63: TypePointer Workgroup 8(int)
64(gs_ua): 63(ptr) Variable Workgroup
65(gs_ub): 63(ptr) Variable Workgroup
67: 8(int) Constant 1
68: 8(int) Constant 0
78(gs_uc): 63(ptr) Variable Workgroup
99: 6(float) Constant 0
106: TypePointer Workgroup 26(ivec2)
107(gs_ua2): 106(ptr) Variable Workgroup
108(gs_ub2): 106(ptr) Variable Workgroup
119(gs_uc2): 106(ptr) Variable Workgroup
140: 6(float) Constant 1065353216
141: 6(float) Constant 1073741824
142: 24(fvec2) ConstantComposite 140 141
147: TypePointer Workgroup 38(ivec3)
148(gs_ua3): 147(ptr) Variable Workgroup
149(gs_ub3): 147(ptr) Variable Workgroup
160(gs_uc3): 147(ptr) Variable Workgroup
181: 6(float) Constant 1077936128
182: 36(fvec3) ConstantComposite 140 141 181
187: TypePointer Workgroup 50(ivec4)
188(gs_ua4): 187(ptr) Variable Workgroup
189(gs_ub4): 187(ptr) Variable Workgroup
200(gs_uc4): 187(ptr) Variable Workgroup
221: 6(float) Constant 1082130432
222: 48(fvec4) ConstantComposite 140 141 181 221
226: TypePointer Input 48(fvec4)
227(inF0): 226(ptr) Variable Input
230(inF1): 226(ptr) Variable Input
233(inF2): 226(ptr) Variable Input
236: TypePointer Input 50(ivec4)
237(inU0): 236(ptr) Variable Input
240(inU1): 236(ptr) Variable Input
242: TypePointer Output 48(fvec4)
243(@entryPointOutput): 242(ptr) Variable Output
62: 6(float) Constant 0
65: TypePointer Workgroup 8(int)
66(gs_ua): 65(ptr) Variable Workgroup
67(gs_ub): 65(ptr) Variable Workgroup
69: 8(int) Constant 1
70: 8(int) Constant 0
80(gs_uc): 65(ptr) Variable Workgroup
106: TypeVector 61(bool) 2
107: 24(fvec2) ConstantComposite 62 62
110: TypePointer Workgroup 26(ivec2)
111(gs_ua2): 110(ptr) Variable Workgroup
112(gs_ub2): 110(ptr) Variable Workgroup
123(gs_uc2): 110(ptr) Variable Workgroup
144: 6(float) Constant 1065353216
145: 6(float) Constant 1073741824
146: 24(fvec2) ConstantComposite 144 145
150: TypeVector 61(bool) 3
151: 36(fvec3) ConstantComposite 62 62 62
154: TypePointer Workgroup 38(ivec3)
155(gs_ua3): 154(ptr) Variable Workgroup
156(gs_ub3): 154(ptr) Variable Workgroup
167(gs_uc3): 154(ptr) Variable Workgroup
188: 6(float) Constant 1077936128
189: 36(fvec3) ConstantComposite 144 145 188
193: TypeVector 61(bool) 4
194: 48(fvec4) ConstantComposite 62 62 62 62
197: TypePointer Workgroup 50(ivec4)
198(gs_ua4): 197(ptr) Variable Workgroup
199(gs_ub4): 197(ptr) Variable Workgroup
210(gs_uc4): 197(ptr) Variable Workgroup
231: 6(float) Constant 1082130432
232: 48(fvec4) ConstantComposite 144 145 188 231
236: TypePointer Input 48(fvec4)
237(inF0): 236(ptr) Variable Input
240(inF1): 236(ptr) Variable Input
243(inF2): 236(ptr) Variable Input
246: TypePointer Input 50(ivec4)
247(inU0): 246(ptr) Variable Input
250(inU1): 246(ptr) Variable Input
252: TypePointer Output 48(fvec4)
253(@entryPointOutput): 252(ptr) Variable Output
4(ComputeShaderFunction): 2 Function None 3
5: Label
225(inF0): 49(ptr) Variable Function
229(inF1): 49(ptr) Variable Function
232(inF2): 49(ptr) Variable Function
235(inU0): 51(ptr) Variable Function
239(inU1): 51(ptr) Variable Function
244(param): 49(ptr) Variable Function
246(param): 49(ptr) Variable Function
248(param): 49(ptr) Variable Function
250(param): 51(ptr) Variable Function
252(param): 51(ptr) Variable Function
228: 48(fvec4) Load 227(inF0)
Store 225(inF0) 228
231: 48(fvec4) Load 230(inF1)
Store 229(inF1) 231
234: 48(fvec4) Load 233(inF2)
Store 232(inF2) 234
238: 50(ivec4) Load 237(inU0)
Store 235(inU0) 238
241: 50(ivec4) Load 240(inU1)
Store 239(inU1) 241
245: 48(fvec4) Load 225(inF0)
Store 244(param) 245
247: 48(fvec4) Load 229(inF1)
Store 246(param) 247
249: 48(fvec4) Load 232(inF2)
Store 248(param) 249
251: 50(ivec4) Load 235(inU0)
Store 250(param) 251
253: 50(ivec4) Load 239(inU1)
Store 252(param) 253
254: 48(fvec4) FunctionCall 58(@ComputeShaderFunction(vf4;vf4;vf4;vu4;vu4;) 244(param) 246(param) 248(param) 250(param) 252(param)
Store 243(@entryPointOutput) 254
235(inF0): 49(ptr) Variable Function
239(inF1): 49(ptr) Variable Function
242(inF2): 49(ptr) Variable Function
245(inU0): 51(ptr) Variable Function
249(inU1): 51(ptr) Variable Function
254(param): 49(ptr) Variable Function
256(param): 49(ptr) Variable Function
258(param): 49(ptr) Variable Function
260(param): 51(ptr) Variable Function
262(param): 51(ptr) Variable Function
238: 48(fvec4) Load 237(inF0)
Store 235(inF0) 238
241: 48(fvec4) Load 240(inF1)
Store 239(inF1) 241
244: 48(fvec4) Load 243(inF2)
Store 242(inF2) 244
248: 50(ivec4) Load 247(inU0)
Store 245(inU0) 248
251: 50(ivec4) Load 250(inU1)
Store 249(inU1) 251
255: 48(fvec4) Load 235(inF0)
Store 254(param) 255
257: 48(fvec4) Load 239(inF1)
Store 256(param) 257
259: 48(fvec4) Load 242(inF2)
Store 258(param) 259
261: 50(ivec4) Load 245(inU0)
Store 260(param) 261
263: 50(ivec4) Load 249(inU1)
Store 262(param) 263
264: 48(fvec4) FunctionCall 58(@ComputeShaderFunction(vf4;vf4;vf4;vu4;vu4;) 254(param) 256(param) 258(param) 260(param) 262(param)
Store 253(@entryPointOutput) 264
Return
FunctionEnd
16(ComputeShaderFunctionS(f1;f1;f1;u1;u1;): 6(float) Function None 10
@ -886,54 +900,55 @@ local_size = (1, 1, 1)
14(inU0): 9(ptr) FunctionParameter
15(inU1): 9(ptr) FunctionParameter
17: Label
70(out_u1): 9(ptr) Variable Function
72(out_u1): 9(ptr) Variable Function
60: 6(float) Load 11(inF0)
62: 61(bool) All 60
66: 8(int) Load 65(gs_ub)
69: 2 AtomicIAdd 64(gs_ua) 67 68 66
71: 8(int) Load 65(gs_ub)
72: 8(int) AtomicIAdd 64(gs_ua) 67 68 71
Store 70(out_u1) 72
73: 8(int) Load 65(gs_ub)
74: 2 AtomicAnd 64(gs_ua) 67 68 73
75: 8(int) Load 65(gs_ub)
76: 8(int) AtomicAnd 64(gs_ua) 67 68 75
Store 70(out_u1) 76
77: 8(int) Load 65(gs_ub)
79: 8(int) Load 78(gs_uc)
80: 8(int) AtomicCompareExchange 64(gs_ua) 67 68 68 79 77
Store 70(out_u1) 80
81: 8(int) Load 65(gs_ub)
82: 8(int) AtomicExchange 64(gs_ua) 67 68 81
Store 70(out_u1) 82
83: 8(int) Load 65(gs_ub)
84: 2 AtomicSMax 64(gs_ua) 67 68 83
85: 8(int) Load 65(gs_ub)
86: 8(int) AtomicUMax 64(gs_ua) 67 68 85
Store 70(out_u1) 86
87: 8(int) Load 65(gs_ub)
88: 2 AtomicSMin 64(gs_ua) 67 68 87
89: 8(int) Load 65(gs_ub)
90: 8(int) AtomicUMin 64(gs_ua) 67 68 89
Store 70(out_u1) 90
91: 8(int) Load 65(gs_ub)
92: 2 AtomicOr 64(gs_ua) 67 68 91
93: 8(int) Load 65(gs_ub)
94: 8(int) AtomicOr 64(gs_ua) 67 68 93
Store 70(out_u1) 94
95: 8(int) Load 65(gs_ub)
96: 2 AtomicXor 64(gs_ua) 67 68 95
97: 8(int) Load 65(gs_ub)
98: 8(int) AtomicXor 64(gs_ua) 67 68 97
Store 70(out_u1) 98
ReturnValue 99
63: 61(bool) FOrdNotEqual 60 62
64: 61(bool) All 63
68: 8(int) Load 67(gs_ub)
71: 2 AtomicIAdd 66(gs_ua) 69 70 68
73: 8(int) Load 67(gs_ub)
74: 8(int) AtomicIAdd 66(gs_ua) 69 70 73
Store 72(out_u1) 74
75: 8(int) Load 67(gs_ub)
76: 2 AtomicAnd 66(gs_ua) 69 70 75
77: 8(int) Load 67(gs_ub)
78: 8(int) AtomicAnd 66(gs_ua) 69 70 77
Store 72(out_u1) 78
79: 8(int) Load 67(gs_ub)
81: 8(int) Load 80(gs_uc)
82: 8(int) AtomicCompareExchange 66(gs_ua) 69 70 70 81 79
Store 72(out_u1) 82
83: 8(int) Load 67(gs_ub)
84: 8(int) AtomicExchange 66(gs_ua) 69 70 83
Store 72(out_u1) 84
85: 8(int) Load 67(gs_ub)
86: 2 AtomicSMax 66(gs_ua) 69 70 85
87: 8(int) Load 67(gs_ub)
88: 8(int) AtomicUMax 66(gs_ua) 69 70 87
Store 72(out_u1) 88
89: 8(int) Load 67(gs_ub)
90: 2 AtomicSMin 66(gs_ua) 69 70 89
91: 8(int) Load 67(gs_ub)
92: 8(int) AtomicUMin 66(gs_ua) 69 70 91
Store 72(out_u1) 92
93: 8(int) Load 67(gs_ub)
94: 2 AtomicOr 66(gs_ua) 69 70 93
95: 8(int) Load 67(gs_ub)
96: 8(int) AtomicOr 66(gs_ua) 69 70 95
Store 72(out_u1) 96
97: 8(int) Load 67(gs_ub)
98: 2 AtomicXor 66(gs_ua) 69 70 97
99: 8(int) Load 67(gs_ub)
100: 8(int) AtomicXor 66(gs_ua) 69 70 99
Store 72(out_u1) 100
ReturnValue 62
FunctionEnd
22(ComputeShaderFunction1(vf1;vf1;vf1;): 6(float) Function None 18
19(inF0): 7(ptr) FunctionParameter
20(inF1): 7(ptr) FunctionParameter
21(inF2): 7(ptr) FunctionParameter
23: Label
ReturnValue 99
ReturnValue 62
FunctionEnd
34(ComputeShaderFunction2(vf2;vf2;vf2;vu2;vu2;): 24(fvec2) Function None 28
29(inF0): 25(ptr) FunctionParameter
@ -942,47 +957,48 @@ local_size = (1, 1, 1)
32(inU0): 27(ptr) FunctionParameter
33(inU1): 27(ptr) FunctionParameter
35: Label
111(out_u2): 27(ptr) Variable Function
104: 24(fvec2) Load 29(inF0)
105: 61(bool) All 104
109: 26(ivec2) Load 108(gs_ub2)
110: 2 AtomicIAdd 107(gs_ua2) 67 68 109
112: 26(ivec2) Load 108(gs_ub2)
113: 26(ivec2) AtomicIAdd 107(gs_ua2) 67 68 112
Store 111(out_u2) 113
114: 26(ivec2) Load 108(gs_ub2)
115: 2 AtomicAnd 107(gs_ua2) 67 68 114
116: 26(ivec2) Load 108(gs_ub2)
117: 26(ivec2) AtomicAnd 107(gs_ua2) 67 68 116
Store 111(out_u2) 117
118: 26(ivec2) Load 108(gs_ub2)
120: 26(ivec2) Load 119(gs_uc2)
121: 26(ivec2) AtomicCompareExchange 107(gs_ua2) 67 68 68 120 118
Store 111(out_u2) 121
122: 26(ivec2) Load 108(gs_ub2)
123: 26(ivec2) AtomicExchange 107(gs_ua2) 67 68 122
Store 111(out_u2) 123
124: 26(ivec2) Load 108(gs_ub2)
125: 2 AtomicSMax 107(gs_ua2) 67 68 124
126: 26(ivec2) Load 108(gs_ub2)
127: 26(ivec2) AtomicUMax 107(gs_ua2) 67 68 126
Store 111(out_u2) 127
128: 26(ivec2) Load 108(gs_ub2)
129: 2 AtomicSMin 107(gs_ua2) 67 68 128
130: 26(ivec2) Load 108(gs_ub2)
131: 26(ivec2) AtomicUMin 107(gs_ua2) 67 68 130
Store 111(out_u2) 131
132: 26(ivec2) Load 108(gs_ub2)
133: 2 AtomicOr 107(gs_ua2) 67 68 132
134: 26(ivec2) Load 108(gs_ub2)
135: 26(ivec2) AtomicOr 107(gs_ua2) 67 68 134
Store 111(out_u2) 135
136: 26(ivec2) Load 108(gs_ub2)
137: 2 AtomicXor 107(gs_ua2) 67 68 136
138: 26(ivec2) Load 108(gs_ub2)
139: 26(ivec2) AtomicXor 107(gs_ua2) 67 68 138
Store 111(out_u2) 139
ReturnValue 142
115(out_u2): 27(ptr) Variable Function
105: 24(fvec2) Load 29(inF0)
108: 106(bvec2) FOrdNotEqual 105 107
109: 61(bool) All 108
113: 26(ivec2) Load 112(gs_ub2)
114: 2 AtomicIAdd 111(gs_ua2) 69 70 113
116: 26(ivec2) Load 112(gs_ub2)
117: 26(ivec2) AtomicIAdd 111(gs_ua2) 69 70 116
Store 115(out_u2) 117
118: 26(ivec2) Load 112(gs_ub2)
119: 2 AtomicAnd 111(gs_ua2) 69 70 118
120: 26(ivec2) Load 112(gs_ub2)
121: 26(ivec2) AtomicAnd 111(gs_ua2) 69 70 120
Store 115(out_u2) 121
122: 26(ivec2) Load 112(gs_ub2)
124: 26(ivec2) Load 123(gs_uc2)
125: 26(ivec2) AtomicCompareExchange 111(gs_ua2) 69 70 70 124 122
Store 115(out_u2) 125
126: 26(ivec2) Load 112(gs_ub2)
127: 26(ivec2) AtomicExchange 111(gs_ua2) 69 70 126
Store 115(out_u2) 127
128: 26(ivec2) Load 112(gs_ub2)
129: 2 AtomicSMax 111(gs_ua2) 69 70 128
130: 26(ivec2) Load 112(gs_ub2)
131: 26(ivec2) AtomicUMax 111(gs_ua2) 69 70 130
Store 115(out_u2) 131
132: 26(ivec2) Load 112(gs_ub2)
133: 2 AtomicSMin 111(gs_ua2) 69 70 132
134: 26(ivec2) Load 112(gs_ub2)
135: 26(ivec2) AtomicUMin 111(gs_ua2) 69 70 134
Store 115(out_u2) 135
136: 26(ivec2) Load 112(gs_ub2)
137: 2 AtomicOr 111(gs_ua2) 69 70 136
138: 26(ivec2) Load 112(gs_ub2)
139: 26(ivec2) AtomicOr 111(gs_ua2) 69 70 138
Store 115(out_u2) 139
140: 26(ivec2) Load 112(gs_ub2)
141: 2 AtomicXor 111(gs_ua2) 69 70 140
142: 26(ivec2) Load 112(gs_ub2)
143: 26(ivec2) AtomicXor 111(gs_ua2) 69 70 142
Store 115(out_u2) 143
ReturnValue 146
FunctionEnd
46(ComputeShaderFunction3(vf3;vf3;vf3;vu3;vu3;): 36(fvec3) Function None 40
41(inF0): 37(ptr) FunctionParameter
@ -991,47 +1007,48 @@ local_size = (1, 1, 1)
44(inU0): 39(ptr) FunctionParameter
45(inU1): 39(ptr) FunctionParameter
47: Label
152(out_u3): 39(ptr) Variable Function
145: 36(fvec3) Load 41(inF0)
146: 61(bool) All 145
150: 38(ivec3) Load 149(gs_ub3)
151: 2 AtomicIAdd 148(gs_ua3) 67 68 150
153: 38(ivec3) Load 149(gs_ub3)
154: 38(ivec3) AtomicIAdd 148(gs_ua3) 67 68 153
Store 152(out_u3) 154
155: 38(ivec3) Load 149(gs_ub3)
156: 2 AtomicAnd 148(gs_ua3) 67 68 155
157: 38(ivec3) Load 149(gs_ub3)
158: 38(ivec3) AtomicAnd 148(gs_ua3) 67 68 157
Store 152(out_u3) 158
159: 38(ivec3) Load 149(gs_ub3)
161: 38(ivec3) Load 160(gs_uc3)
162: 38(ivec3) AtomicCompareExchange 148(gs_ua3) 67 68 68 161 159
Store 152(out_u3) 162
163: 38(ivec3) Load 149(gs_ub3)
164: 38(ivec3) AtomicExchange 148(gs_ua3) 67 68 163
Store 152(out_u3) 164
165: 38(ivec3) Load 149(gs_ub3)
166: 2 AtomicSMax 148(gs_ua3) 67 68 165
167: 38(ivec3) Load 149(gs_ub3)
168: 38(ivec3) AtomicUMax 148(gs_ua3) 67 68 167
Store 152(out_u3) 168
169: 38(ivec3) Load 149(gs_ub3)
170: 2 AtomicSMin 148(gs_ua3) 67 68 169
171: 38(ivec3) Load 149(gs_ub3)
172: 38(ivec3) AtomicUMin 148(gs_ua3) 67 68 171
Store 152(out_u3) 172
173: 38(ivec3) Load 149(gs_ub3)
174: 2 AtomicOr 148(gs_ua3) 67 68 173
175: 38(ivec3) Load 149(gs_ub3)
176: 38(ivec3) AtomicOr 148(gs_ua3) 67 68 175
Store 152(out_u3) 176
177: 38(ivec3) Load 149(gs_ub3)
178: 2 AtomicXor 148(gs_ua3) 67 68 177
179: 38(ivec3) Load 149(gs_ub3)
180: 38(ivec3) AtomicXor 148(gs_ua3) 67 68 179
Store 152(out_u3) 180
ReturnValue 182
159(out_u3): 39(ptr) Variable Function
149: 36(fvec3) Load 41(inF0)
152: 150(bvec3) FOrdNotEqual 149 151
153: 61(bool) All 152
157: 38(ivec3) Load 156(gs_ub3)
158: 2 AtomicIAdd 155(gs_ua3) 69 70 157
160: 38(ivec3) Load 156(gs_ub3)
161: 38(ivec3) AtomicIAdd 155(gs_ua3) 69 70 160
Store 159(out_u3) 161
162: 38(ivec3) Load 156(gs_ub3)
163: 2 AtomicAnd 155(gs_ua3) 69 70 162
164: 38(ivec3) Load 156(gs_ub3)
165: 38(ivec3) AtomicAnd 155(gs_ua3) 69 70 164
Store 159(out_u3) 165
166: 38(ivec3) Load 156(gs_ub3)
168: 38(ivec3) Load 167(gs_uc3)
169: 38(ivec3) AtomicCompareExchange 155(gs_ua3) 69 70 70 168 166
Store 159(out_u3) 169
170: 38(ivec3) Load 156(gs_ub3)
171: 38(ivec3) AtomicExchange 155(gs_ua3) 69 70 170
Store 159(out_u3) 171
172: 38(ivec3) Load 156(gs_ub3)
173: 2 AtomicSMax 155(gs_ua3) 69 70 172
174: 38(ivec3) Load 156(gs_ub3)
175: 38(ivec3) AtomicUMax 155(gs_ua3) 69 70 174
Store 159(out_u3) 175
176: 38(ivec3) Load 156(gs_ub3)
177: 2 AtomicSMin 155(gs_ua3) 69 70 176
178: 38(ivec3) Load 156(gs_ub3)
179: 38(ivec3) AtomicUMin 155(gs_ua3) 69 70 178
Store 159(out_u3) 179
180: 38(ivec3) Load 156(gs_ub3)
181: 2 AtomicOr 155(gs_ua3) 69 70 180
182: 38(ivec3) Load 156(gs_ub3)
183: 38(ivec3) AtomicOr 155(gs_ua3) 69 70 182
Store 159(out_u3) 183
184: 38(ivec3) Load 156(gs_ub3)
185: 2 AtomicXor 155(gs_ua3) 69 70 184
186: 38(ivec3) Load 156(gs_ub3)
187: 38(ivec3) AtomicXor 155(gs_ua3) 69 70 186
Store 159(out_u3) 187
ReturnValue 189
FunctionEnd
58(@ComputeShaderFunction(vf4;vf4;vf4;vu4;vu4;): 48(fvec4) Function None 52
53(inF0): 49(ptr) FunctionParameter
@ -1040,45 +1057,46 @@ local_size = (1, 1, 1)
56(inU0): 51(ptr) FunctionParameter
57(inU1): 51(ptr) FunctionParameter
59: Label
192(out_u4): 51(ptr) Variable Function
185: 48(fvec4) Load 53(inF0)
186: 61(bool) All 185
190: 50(ivec4) Load 189(gs_ub4)
191: 2 AtomicIAdd 188(gs_ua4) 67 68 190
193: 50(ivec4) Load 189(gs_ub4)
194: 50(ivec4) AtomicIAdd 188(gs_ua4) 67 68 193
Store 192(out_u4) 194
195: 50(ivec4) Load 189(gs_ub4)
196: 2 AtomicAnd 188(gs_ua4) 67 68 195
197: 50(ivec4) Load 189(gs_ub4)
198: 50(ivec4) AtomicAnd 188(gs_ua4) 67 68 197
Store 192(out_u4) 198
199: 50(ivec4) Load 189(gs_ub4)
201: 50(ivec4) Load 200(gs_uc4)
202: 50(ivec4) AtomicCompareExchange 188(gs_ua4) 67 68 68 201 199
Store 192(out_u4) 202
203: 50(ivec4) Load 189(gs_ub4)
204: 50(ivec4) AtomicExchange 188(gs_ua4) 67 68 203
Store 192(out_u4) 204
205: 50(ivec4) Load 189(gs_ub4)
206: 2 AtomicSMax 188(gs_ua4) 67 68 205
207: 50(ivec4) Load 189(gs_ub4)
208: 50(ivec4) AtomicUMax 188(gs_ua4) 67 68 207
Store 192(out_u4) 208
209: 50(ivec4) Load 189(gs_ub4)
210: 2 AtomicSMin 188(gs_ua4) 67 68 209
211: 50(ivec4) Load 189(gs_ub4)
212: 50(ivec4) AtomicUMin 188(gs_ua4) 67 68 211
Store 192(out_u4) 212
213: 50(ivec4) Load 189(gs_ub4)
214: 2 AtomicOr 188(gs_ua4) 67 68 213
215: 50(ivec4) Load 189(gs_ub4)
216: 50(ivec4) AtomicOr 188(gs_ua4) 67 68 215
Store 192(out_u4) 216
217: 50(ivec4) Load 189(gs_ub4)
218: 2 AtomicXor 188(gs_ua4) 67 68 217
219: 50(ivec4) Load 189(gs_ub4)
220: 50(ivec4) AtomicXor 188(gs_ua4) 67 68 219
Store 192(out_u4) 220
ReturnValue 222
202(out_u4): 51(ptr) Variable Function
192: 48(fvec4) Load 53(inF0)
195: 193(bvec4) FOrdNotEqual 192 194
196: 61(bool) All 195
200: 50(ivec4) Load 199(gs_ub4)
201: 2 AtomicIAdd 198(gs_ua4) 69 70 200
203: 50(ivec4) Load 199(gs_ub4)
204: 50(ivec4) AtomicIAdd 198(gs_ua4) 69 70 203
Store 202(out_u4) 204
205: 50(ivec4) Load 199(gs_ub4)
206: 2 AtomicAnd 198(gs_ua4) 69 70 205
207: 50(ivec4) Load 199(gs_ub4)
208: 50(ivec4) AtomicAnd 198(gs_ua4) 69 70 207
Store 202(out_u4) 208
209: 50(ivec4) Load 199(gs_ub4)
211: 50(ivec4) Load 210(gs_uc4)
212: 50(ivec4) AtomicCompareExchange 198(gs_ua4) 69 70 70 211 209
Store 202(out_u4) 212
213: 50(ivec4) Load 199(gs_ub4)
214: 50(ivec4) AtomicExchange 198(gs_ua4) 69 70 213
Store 202(out_u4) 214
215: 50(ivec4) Load 199(gs_ub4)
216: 2 AtomicSMax 198(gs_ua4) 69 70 215
217: 50(ivec4) Load 199(gs_ub4)
218: 50(ivec4) AtomicUMax 198(gs_ua4) 69 70 217
Store 202(out_u4) 218
219: 50(ivec4) Load 199(gs_ub4)
220: 2 AtomicSMin 198(gs_ua4) 69 70 219
221: 50(ivec4) Load 199(gs_ub4)
222: 50(ivec4) AtomicUMin 198(gs_ua4) 69 70 221
Store 202(out_u4) 222
223: 50(ivec4) Load 199(gs_ub4)
224: 2 AtomicOr 198(gs_ua4) 69 70 223
225: 50(ivec4) Load 199(gs_ub4)
226: 50(ivec4) AtomicOr 198(gs_ua4) 69 70 225
Store 202(out_u4) 226
227: 50(ivec4) Load 199(gs_ub4)
228: 2 AtomicXor 198(gs_ua4) 69 70 227
229: 50(ivec4) Load 199(gs_ub4)
230: 50(ivec4) AtomicXor 198(gs_ua4) 69 70 229
Store 202(out_u4) 230
ReturnValue 232
FunctionEnd

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -4101,6 +4101,28 @@ void HlslParseContext::decomposeIntrinsic(const TSourceLoc& loc, TIntermTyped*&
break;
}
case EOpAny: // fall through
case EOpAll:
{
TIntermTyped* typedArg = arguments->getAsTyped();
// HLSL allows float/etc types here, and the SPIR-V opcode requires a bool.
// We'll convert here. Note that for efficiency, we could add a smarter
// decomposition for some type cases, e.g, maybe by decomposing a dot product.
if (typedArg->getType().getBasicType() != EbtBool) {
const TType boolType(EbtBool, EvqTemporary,
typedArg->getVectorSize(),
typedArg->getMatrixCols(),
typedArg->getMatrixRows(),
typedArg->isVector());
typedArg = intermediate.addConversion(EOpConstructBool, boolType, typedArg);
node->getAsUnaryNode()->setOperand(typedArg);
}
break;
}
case EOpSaturate:
{
// saturate(a) -> clamp(a,0,1)