wgpu/naga/tests/out
Jim Blandy 0b82776947 [naga msl-out] Avoid UB by making all loops bounded.
In MSL output, avoid undefined behavior due to unbounded loops by
adding an unpredictable, never-actually-taken `break` to the bottom of
each loop body, rather than adding an unpredictable,
never-actually-taken branch over each loop.

This will probably have more of a performance impact, because it
affects each iteration of the loop, but unlike branching over the
loop, which leaves infinite loops (and thus undefined behavior) in the
output, this actually ensures that no loop presented to Metal is
unbounded, so that there is no undefined behavior present that the
optimizer could use to make unwelcome inferences.

Fixes #6528.
2024-11-18 14:10:50 -08:00
..
analysis refactor(wgsl-in): track diagnostic directives in func. analysis 2024-11-12 08:49:02 -05:00
dot [naga] Use new NonMaxU32 type for Handle indices. 2024-06-21 10:09:03 +02:00
glsl [naga] Implement quantizeToF16 (#6519) 2024-11-12 12:05:19 +01:00
hlsl [wgsl-in] Ensure textureSampleLevel's level argument is an integer for depth textures (#6529) 2024-11-18 12:05:04 +00:00
ir fix(wgsl-in): include user and unknown rules in diagnostic(…) tracking 2024-11-18 17:10:07 -05:00
msl [naga msl-out] Avoid UB by making all loops bounded. 2024-11-18 14:10:50 -08:00
spv [wgsl-in] Ensure textureSampleLevel's level argument is an integer for depth textures (#6529) 2024-11-18 12:05:04 +00:00
wgsl [wgsl-in] Reject invalid texture types for textureSampleBias (#6566) 2024-11-18 17:37:52 +01:00