From f942ceef9bb04606cc02747de7386297de1edb7d Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Wed, 18 Sep 2024 10:54:45 -0400 Subject: [PATCH] docs(msl-out): note that Dawn also avoids loop UB like we do --- naga/src/back/msl/writer.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/naga/src/back/msl/writer.rs b/naga/src/back/msl/writer.rs index a7374915c9..e09ca557a9 100644 --- a/naga/src/back/msl/writer.rs +++ b/naga/src/back/msl/writer.rs @@ -782,6 +782,9 @@ impl Writer { /// /// 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 + /// . fn emit_loop_reachable_macro(&mut self) -> BackendResult { if !self.loop_reachable_macro_name.is_empty() { return Ok(());