Skip to content

Commit

Permalink
docs(msl-out): note that Dawn also avoids loop UB like we do
Browse files Browse the repository at this point in the history
  • Loading branch information
ErichDonGubler authored and jimblandy committed Sep 18, 2024
1 parent 3fda684 commit f942cee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions naga/src/back/msl/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,9 @@ impl<W: Write> Writer<W> {
///
/// To make our output a bit more legible, we pull the condition out into a
/// preprocessor macro defined at the top of the module.
///
/// This approach is also used by Chromium WebGPU's Dawn shader compiler, as of
/// <https://github.com/google/dawn/commit/ffd485c685040edb1e678165dcbf0e841cfa0298>.
fn emit_loop_reachable_macro(&mut self) -> BackendResult {
if !self.loop_reachable_macro_name.is_empty() {
return Ok(());
Expand Down

0 comments on commit f942cee

Please sign in to comment.