mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 00:03:29 +00:00
Update some docs containing OpenGL or GLSL references (#6271)
This commit is contained in:
parent
a21c0e2696
commit
d79ebc4db3
@ -126,6 +126,10 @@ By @bradwerth [#6216](https://github.com/gfx-rs/wgpu/pull/6216).
|
|||||||
|
|
||||||
- Change the inconsistent `DropGuard` based API on Vulkan and GLES to a consistent, callback-based one. By @jerzywilczek in [#6164](https://github.com/gfx-rs/wgpu/pull/6164)
|
- Change the inconsistent `DropGuard` based API on Vulkan and GLES to a consistent, callback-based one. By @jerzywilczek in [#6164](https://github.com/gfx-rs/wgpu/pull/6164)
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
|
||||||
|
- Removed some OpenGL and Vulkan references from `wgpu-types` documentation. Fixed Storage texel types in examples. By @Nelarius in [#6271](https://github.com/gfx-rs/wgpu/pull/6271)
|
||||||
|
|
||||||
### Dependency Updates
|
### Dependency Updates
|
||||||
|
|
||||||
#### GLES
|
#### GLES
|
||||||
|
@ -568,7 +568,7 @@ bitflags::bitflags! {
|
|||||||
/// may also create uniform arrays of storage textures.
|
/// may also create uniform arrays of storage textures.
|
||||||
///
|
///
|
||||||
/// ex.
|
/// ex.
|
||||||
/// - `var textures: array<texture_storage_2d<f32, write>, 10>` (WGSL)
|
/// - `var textures: array<texture_storage_2d<r32float, write>, 10>` (WGSL)
|
||||||
/// - `uniform image2D textures[10]` (GLSL)
|
/// - `uniform image2D textures[10]` (GLSL)
|
||||||
///
|
///
|
||||||
/// This capability allows them to exist and to be indexed by dynamically uniform
|
/// This capability allows them to exist and to be indexed by dynamically uniform
|
||||||
@ -1959,12 +1959,13 @@ impl TextureViewDimension {
|
|||||||
|
|
||||||
/// Alpha blend factor.
|
/// Alpha blend factor.
|
||||||
///
|
///
|
||||||
/// Alpha blending is very complicated: see the OpenGL or Vulkan spec for more information.
|
|
||||||
///
|
|
||||||
/// Corresponds to [WebGPU `GPUBlendFactor`](
|
/// Corresponds to [WebGPU `GPUBlendFactor`](
|
||||||
/// https://gpuweb.github.io/gpuweb/#enumdef-gpublendfactor).
|
/// https://gpuweb.github.io/gpuweb/#enumdef-gpublendfactor). Values using `Src1`
|
||||||
/// Values using S1 requires [`Features::DUAL_SOURCE_BLENDING`] and can only be
|
/// require [`Features::DUAL_SOURCE_BLENDING`] and can only be used with the first
|
||||||
/// used with the first render target.
|
/// render target.
|
||||||
|
///
|
||||||
|
/// For further details on how the blend factors are applied, see the analogous
|
||||||
|
/// functionality in OpenGL: <https://www.khronos.org/opengl/wiki/Blending#Blending_Parameters>.
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Copy, Clone, Debug, Hash, Eq, PartialEq)]
|
#[derive(Copy, Clone, Debug, Hash, Eq, PartialEq)]
|
||||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||||
@ -2024,10 +2025,11 @@ impl BlendFactor {
|
|||||||
|
|
||||||
/// Alpha blend operation.
|
/// Alpha blend operation.
|
||||||
///
|
///
|
||||||
/// Alpha blending is very complicated: see the OpenGL or Vulkan spec for more information.
|
|
||||||
///
|
|
||||||
/// Corresponds to [WebGPU `GPUBlendOperation`](
|
/// Corresponds to [WebGPU `GPUBlendOperation`](
|
||||||
/// https://gpuweb.github.io/gpuweb/#enumdef-gpublendoperation).
|
/// https://gpuweb.github.io/gpuweb/#enumdef-gpublendoperation).
|
||||||
|
///
|
||||||
|
/// For further details on how the blend operations are applied, see
|
||||||
|
/// the analogous functionality in OpenGL: <https://www.khronos.org/opengl/wiki/Blending#Blend_Equations>.
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Copy, Clone, Debug, Default, Hash, Eq, PartialEq)]
|
#[derive(Copy, Clone, Debug, Default, Hash, Eq, PartialEq)]
|
||||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||||
@ -2102,8 +2104,6 @@ impl Default for BlendComponent {
|
|||||||
/// Describe the blend state of a render pipeline,
|
/// Describe the blend state of a render pipeline,
|
||||||
/// within [`ColorTargetState`].
|
/// within [`ColorTargetState`].
|
||||||
///
|
///
|
||||||
/// See the OpenGL or Vulkan spec for more information.
|
|
||||||
///
|
|
||||||
/// Corresponds to [WebGPU `GPUBlendState`](
|
/// Corresponds to [WebGPU `GPUBlendState`](
|
||||||
/// https://gpuweb.github.io/gpuweb/#dictdef-gpublendstate).
|
/// https://gpuweb.github.io/gpuweb/#dictdef-gpublendstate).
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
@ -6543,7 +6543,7 @@ pub enum StorageTextureAccess {
|
|||||||
/// Example WGSL syntax:
|
/// Example WGSL syntax:
|
||||||
/// ```rust,ignore
|
/// ```rust,ignore
|
||||||
/// @group(0) @binding(0)
|
/// @group(0) @binding(0)
|
||||||
/// var my_storage_image: texture_storage_2d<f32, write>;
|
/// var my_storage_image: texture_storage_2d<r32float, write>;
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// Example GLSL syntax:
|
/// Example GLSL syntax:
|
||||||
@ -6560,7 +6560,7 @@ pub enum StorageTextureAccess {
|
|||||||
/// Example WGSL syntax:
|
/// Example WGSL syntax:
|
||||||
/// ```rust,ignore
|
/// ```rust,ignore
|
||||||
/// @group(0) @binding(0)
|
/// @group(0) @binding(0)
|
||||||
/// var my_storage_image: texture_storage_2d<f32, read>;
|
/// var my_storage_image: texture_storage_2d<r32float, read>;
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// Example GLSL syntax:
|
/// Example GLSL syntax:
|
||||||
@ -6577,7 +6577,7 @@ pub enum StorageTextureAccess {
|
|||||||
/// Example WGSL syntax:
|
/// Example WGSL syntax:
|
||||||
/// ```rust,ignore
|
/// ```rust,ignore
|
||||||
/// @group(0) @binding(0)
|
/// @group(0) @binding(0)
|
||||||
/// var my_storage_image: texture_storage_2d<f32, read_write>;
|
/// var my_storage_image: texture_storage_2d<r32float, read_write>;
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// Example GLSL syntax:
|
/// Example GLSL syntax:
|
||||||
@ -6701,8 +6701,8 @@ pub enum BindingType {
|
|||||||
/// Dimension of the texture view that is going to be sampled.
|
/// Dimension of the texture view that is going to be sampled.
|
||||||
view_dimension: TextureViewDimension,
|
view_dimension: TextureViewDimension,
|
||||||
/// True if the texture has a sample count greater than 1. If this is true,
|
/// True if the texture has a sample count greater than 1. If this is true,
|
||||||
/// the texture must be read from shaders with `texture1DMS`, `texture2DMS`, or `texture3DMS`,
|
/// the texture must be declared as `texture_multisampled_2d` or
|
||||||
/// depending on `dimension`.
|
/// `texture_depth_multisampled_2d` in the shader, and read using `textureLoad`.
|
||||||
multisampled: bool,
|
multisampled: bool,
|
||||||
},
|
},
|
||||||
/// A storage texture.
|
/// A storage texture.
|
||||||
@ -6710,15 +6710,16 @@ pub enum BindingType {
|
|||||||
/// Example WGSL syntax:
|
/// Example WGSL syntax:
|
||||||
/// ```rust,ignore
|
/// ```rust,ignore
|
||||||
/// @group(0) @binding(0)
|
/// @group(0) @binding(0)
|
||||||
/// var my_storage_image: texture_storage_2d<f32, write>;
|
/// var my_storage_image: texture_storage_2d<r32float, write>;
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// Example GLSL syntax:
|
/// Example GLSL syntax:
|
||||||
/// ```cpp,ignore
|
/// ```cpp,ignore
|
||||||
/// layout(set=0, binding=0, r32f) writeonly uniform image2D myStorageImage;
|
/// layout(set=0, binding=0, r32f) writeonly uniform image2D myStorageImage;
|
||||||
/// ```
|
/// ```
|
||||||
/// Note that the texture format must be specified in the shader as well.
|
/// Note that the texture format must be specified in the shader, along with the
|
||||||
/// A list of valid formats can be found in the specification here: <https://www.khronos.org/registry/OpenGL/specs/gl/GLSLangSpec.4.60.html#layout-qualifiers>
|
/// access mode. For WGSL, the format must be one of the enumerants in the list
|
||||||
|
/// of [storage texel formats](https://gpuweb.github.io/gpuweb/wgsl/#storage-texel-formats).
|
||||||
///
|
///
|
||||||
/// Corresponds to [WebGPU `GPUStorageTextureBindingLayout`](
|
/// Corresponds to [WebGPU `GPUStorageTextureBindingLayout`](
|
||||||
/// https://gpuweb.github.io/gpuweb/#dictdef-gpustoragetexturebindinglayout).
|
/// https://gpuweb.github.io/gpuweb/#dictdef-gpustoragetexturebindinglayout).
|
||||||
|
@ -40,8 +40,8 @@ pub struct PipelineLayoutDescriptor<'a> {
|
|||||||
/// "set = 0", second entry will provide all the bindings for "set = 1" etc.
|
/// "set = 0", second entry will provide all the bindings for "set = 1" etc.
|
||||||
pub bind_group_layouts: &'a [&'a BindGroupLayout],
|
pub bind_group_layouts: &'a [&'a BindGroupLayout],
|
||||||
/// Set of push constant ranges this pipeline uses. Each shader stage that uses push constants
|
/// Set of push constant ranges this pipeline uses. Each shader stage that uses push constants
|
||||||
/// must define the range in push constant memory that corresponds to its single `layout(push_constant)`
|
/// must define the range in push constant memory that corresponds to its single `var<push_constant>`
|
||||||
/// uniform block.
|
/// buffer.
|
||||||
///
|
///
|
||||||
/// If this array is non-empty, the [`Features::PUSH_CONSTANTS`] must be enabled.
|
/// If this array is non-empty, the [`Features::PUSH_CONSTANTS`] must be enabled.
|
||||||
pub push_constant_ranges: &'a [PushConstantRange],
|
pub push_constant_ranges: &'a [PushConstantRange],
|
||||||
|
Loading…
Reference in New Issue
Block a user