From 5a61833fa6c5251c15c704f00b95aad009ee1c10 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Tue, 7 Oct 2025 09:43:11 -0400 Subject: [PATCH] =?UTF-8?q?refactor:=20`Interface::check=5Fstage`:=20use?= =?UTF-8?q?=20`concat!(=E2=80=A6)`=20for=20non-invariant=20`@builtin(posit?= =?UTF-8?q?ion)`=20warning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wgpu-core/src/validation.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/wgpu-core/src/validation.rs b/wgpu-core/src/validation.rs index 2c2f4b36c..e29f088a9 100644 --- a/wgpu-core/src/validation.rs +++ b/wgpu-core/src/validation.rs @@ -1332,10 +1332,18 @@ impl Interface { if let Varying::BuiltIn(naga::BuiltIn::Position { invariant: false }) = *output { log::warn!( - "Vertex shader with entry point {entry_point_name} outputs a @builtin(position) without the @invariant \ - attribute and is used in a pipeline with {cmp:?}. On some machines, this can cause bad artifacting as {cmp:?} assumes \ - the values output from the vertex shader exactly match the value in the depth buffer. The @invariant attribute on the \ - @builtin(position) vertex output ensures that the exact same pixel depths are used every render." + concat!( + "Vertex shader with entry point {} outputs a ", + "@builtin(position) without the @invariant attribute and ", + "is used in a pipeline with {cmp:?}. On some machines, ", + "this can cause bad artifacting as {cmp:?} assumes the ", + "values output from the vertex shader exactly match the ", + "value in the depth buffer. The @invariant attribute on the ", + "@builtin(position) vertex output ensures that the exact ", + "same pixel depths are used every render." + ), + entry_point_name, + cmp = cmp ); } }