From dd73743e784e05a52d545ea9061e0acbbb0e0f13 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Sun, 24 Aug 2025 14:37:19 -0400 Subject: [PATCH] =?UTF-8?q?fix(wgsl-in):=20accept=20trailing=20comma=20in?= =?UTF-8?q?=20`@blend=5Fsrc(=E2=80=A6)`=20attr.=20(#8137)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++++ cts_runner/test.lst | 1 + naga/src/front/wgsl/parse/mod.rs | 1 + 3 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4dc11874..be4e1630a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -121,6 +121,10 @@ This allows using precompiled shaders without manually checking which backend's - Fixed a bug where access to matrices with 2 rows would not work in some cases. By @andyleiserson in [#7438](https://github.com/gfx-rs/wgpu/pull/7438). +#### Naga + +- [wgsl-in] Allow a trailing comma in `@blend_src(…)` attributes. By @ErichDonGubler in [#8137](https://github.com/gfx-rs/wgpu/pull/8137). + ## v26.0.4 (2025-08-07) ### Bug Fixes diff --git a/cts_runner/test.lst b/cts_runner/test.lst index 082d348a2..e681322a5 100644 --- a/cts_runner/test.lst +++ b/cts_runner/test.lst @@ -58,6 +58,7 @@ webgpu:api,validation,encoding,programmable,pipeline_bind_group_compat:bind_grou webgpu:api,validation,encoding,programmable,pipeline_bind_group_compat:buffer_binding,render_pipeline:* webgpu:api,validation,encoding,programmable,pipeline_bind_group_compat:sampler_binding,render_pipeline:* webgpu:api,validation,encoding,queries,general:occlusion_query,query_index:* +webgpu:shader,validation,extension,dual_source_blending:blend_src_syntax_validation:* webgpu:api,validation,image_copy,buffer_texture_copies:depth_stencil_format,copy_usage_and_aspect:* webgpu:api,validation,image_copy,buffer_texture_copies:depth_stencil_format,copy_buffer_size:* fails-if(dx12) webgpu:api,validation,image_copy,buffer_texture_copies:depth_stencil_format,copy_buffer_offset:format="depth32float";aspect="depth-only";copyType="CopyT2B" diff --git a/naga/src/front/wgsl/parse/mod.rs b/naga/src/front/wgsl/parse/mod.rs index cf4dd4d4b..c7f81005e 100644 --- a/naga/src/front/wgsl/parse/mod.rs +++ b/naga/src/front/wgsl/parse/mod.rs @@ -235,6 +235,7 @@ impl<'a> BindingParser<'a> { lexer.expect(Token::Paren('('))?; self.blend_src .set(parser.general_expression(lexer, ctx)?, name_span)?; + lexer.skip(Token::Separator(',')); lexer.expect(Token::Paren(')'))?; } _ => return Err(Box::new(Error::UnknownAttribute(name_span))),