Commit f81cf7a
committed
uniformity: test uniformity when a loop body only returns
Consider: loop { s1 continuing { s2 } }
If the statement behaviour of s1 is exactly {Return}, then the statement
behaviour of the entire loop is {Return}. In particular, nonuniformity
effects do not leak out from s2 to the context after or outside of the
whole loop.
See the WGSL spec fix for gpuweb/gpuweb#5100
Test three new statement scenarios, each where s1 starts with `return;`,
but varying where a collective operation is placed:
- immediately after the return statement
- in the continuing block of the same loop
- immediately after the loop, where the continuing block in the loop
has a break-if. This case requires the analysis to avoid using a
Next behaviour from the overall loop.
- immediately after the loop
Fixed: #44761 parent e34f99a commit f81cf7a
1 file changed
+65
-3
lines changedLines changed: 65 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
189 | 199 | | |
190 | 200 | | |
191 | 201 | | |
| |||
236 | 246 | | |
237 | 247 | | |
238 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
239 | 291 | | |
240 | 292 | | |
241 | 293 | | |
| |||
297 | 349 | | |
298 | 350 | | |
299 | 351 | | |
300 | | - | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
301 | 358 | | |
302 | 359 | | |
303 | 360 | | |
| |||
384 | 441 | | |
385 | 442 | | |
386 | 443 | | |
387 | | - | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
388 | 450 | | |
389 | 451 | | |
390 | 452 | | |
| |||
0 commit comments