mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-21 22:33:49 +00:00
Give short example of WGSL push_constant
syntax. (#5393)
This commit is contained in:
parent
a63bec8cd6
commit
fe91958010
@ -56,6 +56,7 @@ By @cwfitzgerald in [#5325](https://github.com/gfx-rs/wgpu/pull/5325).
|
||||
- Document Wayland specific behavior related to `SurfaceTexture::present`. By @i509VCB in [#5092](https://github.com/gfx-rs/wgpu/pull/5092).
|
||||
- Add mention of primitive restart in the description of `PrimitiveState::strip_index_format`. By @cpsdqs in [#5350](https://github.com/gfx-rs/wgpu/pull/5350)
|
||||
- Document precise behaviour of `SourceLocation`. By @stefnotch in [#5386](https://github.com/gfx-rs/wgpu/pull/5386)
|
||||
- Give short example of WGSL `push_constant` syntax. By @waywardmonkeys in [#5393](https://github.com/gfx-rs/wgpu/pull/5393)
|
||||
|
||||
### New features
|
||||
|
||||
|
@ -682,7 +682,14 @@ bitflags::bitflags! {
|
||||
/// Allows the user to call [`RenderPass::set_push_constants`], provide a non-empty array
|
||||
/// to [`PipelineLayoutDescriptor`], and provide a non-zero limit to [`Limits::max_push_constant_size`].
|
||||
///
|
||||
/// A block of push constants can be declared with `layout(push_constant) uniform Name {..}` in shaders.
|
||||
/// A block of push constants can be declared in WGSL with `var<push_constant>`:
|
||||
///
|
||||
/// ```rust,ignore
|
||||
/// struct PushConstants { example: f32, }
|
||||
/// var<push_constant> c: PushConstants;
|
||||
/// ```
|
||||
///
|
||||
/// In GLSL, this corresponds to `layout(push_constant) uniform Name {..}`.
|
||||
///
|
||||
/// Supported platforms:
|
||||
/// - DX12
|
||||
|
Loading…
Reference in New Issue
Block a user