Commit 0d9cf42
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
Fixed: #44761 parent e6c5ee9 commit 0d9cf42
1 file changed
+52
-3
lines changedLines changed: 52 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 | + | |
189 | 198 | | |
190 | 199 | | |
191 | 200 | | |
| |||
236 | 245 | | |
237 | 246 | | |
238 | 247 | | |
| 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 | + | |
239 | 278 | | |
240 | 279 | | |
241 | 280 | | |
| |||
297 | 336 | | |
298 | 337 | | |
299 | 338 | | |
300 | | - | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
301 | 345 | | |
302 | 346 | | |
303 | 347 | | |
| |||
384 | 428 | | |
385 | 429 | | |
386 | 430 | | |
387 | | - | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
388 | 437 | | |
389 | 438 | | |
390 | 439 | | |
| |||
0 commit comments