mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 06:44:14 +00:00
Allow using include_wgsl! in const contexts (#5872)
* include_wgsl! Switch from into() call to construction This allows usage in const contexts. * Describe constification of include_wgsl! in changelog
This commit is contained in:
parent
333ed78529
commit
a7d4d2c79f
@ -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
|
||||
|
@ -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)*))),
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user