diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fc326c30c..a2ea1b8fa5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -131,6 +131,10 @@ By @atlv24 in [#5383](https://github.com/gfx-rs/wgpu/pull/5383) - Implement `WGSL`'s `unpack4xI8`,`unpack4xU8`,`pack4xI8` and `pack4xU8`. By @VlaDexa in [#5424](https://github.com/gfx-rs/wgpu/pull/5424) - Began work adding support for atomics to the SPIR-V frontend. Tracking issue is [here](https://github.com/gfx-rs/wgpu/issues/4489). By @schell in [#5702](https://github.com/gfx-rs/wgpu/pull/5702). +#### WebGPU + +- `include_wgsl!` is now callable in const contexts by @9SMTM6 in [#5872](https://github.com/gfx-rs/wgpu/pull/5872) + ### Changes #### General diff --git a/wgpu/src/macros.rs b/wgpu/src/macros.rs index f1a15e764e..594388528f 100644 --- a/wgpu/src/macros.rs +++ b/wgpu/src/macros.rs @@ -95,7 +95,7 @@ macro_rules! include_wgsl { //log::info!("including '{}'", $($token)*); $crate::ShaderModuleDescriptor { label: Some($($token)*), - source: $crate::ShaderSource::Wgsl(include_str!($($token)*).into()), + source: $crate::ShaderSource::Wgsl(std::borrow::Cow::Borrowed(include_str!($($token)*))), } } };