mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
[naga doc] Fix broken links in Naga bitflags types.
Fix links in documentation for types defined using the `bitflags!` macro. As described in [bitflags#407], for some reason, `cargo doc` doesn't check for broken links in documentation for types or members defined using `bitflags::bitflags!`. [bitflags#407]: https://github.com/bitflags/bitflags/issues/407
This commit is contained in:
parent
dd86dcf8f8
commit
91e4be314c
@ -271,10 +271,11 @@ bitflags::bitflags! {
|
|||||||
///
|
///
|
||||||
/// Note that these exactly correspond to the SPIR-V "Ray Flags" mask, and
|
/// Note that these exactly correspond to the SPIR-V "Ray Flags" mask, and
|
||||||
/// the SPIR-V backend passes them directly through to the
|
/// the SPIR-V backend passes them directly through to the
|
||||||
/// `OpRayQueryInitializeKHR` instruction. (We have to choose something, so
|
/// [`OpRayQueryInitializeKHR`][op] instruction. (We have to choose something, so
|
||||||
/// we might as well make one back end's life easier.)
|
/// we might as well make one back end's life easier.)
|
||||||
///
|
///
|
||||||
/// [`RayDesc`]: crate::Module::generate_ray_desc_type
|
/// [`RayDesc`]: crate::Module::generate_ray_desc_type
|
||||||
|
/// [op]: https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#OpRayQueryInitializeKHR
|
||||||
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
|
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
|
||||||
pub struct RayFlag: u32 {
|
pub struct RayFlag: u32 {
|
||||||
const OPAQUE = 0x01;
|
const OPAQUE = 0x01;
|
||||||
|
|||||||
@ -682,16 +682,29 @@ bitflags::bitflags! {
|
|||||||
pub struct WriterFlags: u32 {
|
pub struct WriterFlags: u32 {
|
||||||
/// Include debug labels for everything.
|
/// Include debug labels for everything.
|
||||||
const DEBUG = 0x1;
|
const DEBUG = 0x1;
|
||||||
/// Flip Y coordinate of `BuiltIn::Position` output.
|
|
||||||
|
/// Flip Y coordinate of [`BuiltIn::Position`] output.
|
||||||
|
///
|
||||||
|
/// [`BuiltIn::Position`]: crate::BuiltIn::Position
|
||||||
const ADJUST_COORDINATE_SPACE = 0x2;
|
const ADJUST_COORDINATE_SPACE = 0x2;
|
||||||
/// Emit `OpName` for input/output locations.
|
|
||||||
|
/// Emit [`OpName`][op] for input/output locations.
|
||||||
|
///
|
||||||
/// Contrary to spec, some drivers treat it as semantic, not allowing
|
/// Contrary to spec, some drivers treat it as semantic, not allowing
|
||||||
/// any conflicts.
|
/// any conflicts.
|
||||||
|
///
|
||||||
|
/// [op]: https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#OpName
|
||||||
const LABEL_VARYINGS = 0x4;
|
const LABEL_VARYINGS = 0x4;
|
||||||
/// Emit `PointSize` output builtin to vertex shaders, which is
|
|
||||||
|
/// Emit [`PointSize`] output builtin to vertex shaders, which is
|
||||||
/// required for drawing with `PointList` topology.
|
/// required for drawing with `PointList` topology.
|
||||||
|
///
|
||||||
|
/// [`PointSize`]: crate::BuiltIn::PointSize
|
||||||
const FORCE_POINT_SIZE = 0x8;
|
const FORCE_POINT_SIZE = 0x8;
|
||||||
/// Clamp `BuiltIn::FragDepth` output between 0 and 1.
|
|
||||||
|
/// Clamp [`BuiltIn::FragDepth`] output between 0 and 1.
|
||||||
|
///
|
||||||
|
/// [`BuiltIn::FragDepth`]: crate::BuiltIn::FragDepth
|
||||||
const CLAMP_FRAG_DEPTH = 0x10;
|
const CLAMP_FRAG_DEPTH = 0x10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -73,9 +73,9 @@ bitflags::bitflags! {
|
|||||||
const STANDARD = 1 << 0;
|
const STANDARD = 1 << 0;
|
||||||
/// Request overloads that use the double type
|
/// Request overloads that use the double type
|
||||||
const DOUBLE = 1 << 1;
|
const DOUBLE = 1 << 1;
|
||||||
/// Request overloads that use samplerCubeArray(Shadow)
|
/// Request overloads that use `samplerCubeArray(Shadow)`
|
||||||
const CUBE_TEXTURES_ARRAY = 1 << 2;
|
const CUBE_TEXTURES_ARRAY = 1 << 2;
|
||||||
/// Request overloads that use sampler2DMSArray
|
/// Request overloads that use `sampler2DMSArray`
|
||||||
const D2_MULTI_TEXTURES_ARRAY = 1 << 3;
|
const D2_MULTI_TEXTURES_ARRAY = 1 << 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2218,7 +2218,7 @@ pub fn sampled_to_depth(
|
|||||||
}
|
}
|
||||||
|
|
||||||
bitflags::bitflags! {
|
bitflags::bitflags! {
|
||||||
/// Influences the operation `texture_args_generator`
|
/// Influences the operation [`texture_args_generator`]
|
||||||
struct TextureArgsOptions: u32 {
|
struct TextureArgsOptions: u32 {
|
||||||
/// Generates multisampled variants of images
|
/// Generates multisampled variants of images
|
||||||
const MULTI = 1 << 0;
|
const MULTI = 1 << 0;
|
||||||
|
|||||||
@ -1335,9 +1335,9 @@ bitflags::bitflags! {
|
|||||||
#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
|
#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
|
||||||
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
|
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
|
||||||
pub struct Barrier: u32 {
|
pub struct Barrier: u32 {
|
||||||
/// Barrier affects all `AddressSpace::Storage` accesses.
|
/// Barrier affects all [`AddressSpace::Storage`] accesses.
|
||||||
const STORAGE = 1 << 0;
|
const STORAGE = 1 << 0;
|
||||||
/// Barrier affects all `AddressSpace::WorkGroup` accesses.
|
/// Barrier affects all [`AddressSpace::WorkGroup`] accesses.
|
||||||
const WORK_GROUP = 1 << 1;
|
const WORK_GROUP = 1 << 1;
|
||||||
/// Barrier synchronizes execution across all invocations within a subgroup that exectue this instruction.
|
/// Barrier synchronizes execution across all invocations within a subgroup that exectue this instruction.
|
||||||
const SUB_GROUP = 1 << 2;
|
const SUB_GROUP = 1 << 2;
|
||||||
|
|||||||
@ -70,8 +70,10 @@ bitflags::bitflags! {
|
|||||||
/// subsequent statements within the current function (only!)
|
/// subsequent statements within the current function (only!)
|
||||||
/// to be executed in a non-uniform control flow.
|
/// to be executed in a non-uniform control flow.
|
||||||
const MAY_RETURN = 0x1;
|
const MAY_RETURN = 0x1;
|
||||||
/// Control flow may be killed. Anything after `Statement::Kill` is
|
/// Control flow may be killed. Anything after [`Statement::Kill`] is
|
||||||
/// considered inside non-uniform context.
|
/// considered inside non-uniform context.
|
||||||
|
///
|
||||||
|
/// [`Statement::Kill`]: crate::Statement::Kill
|
||||||
const MAY_KILL = 0x2;
|
const MAY_KILL = 0x2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -78,11 +78,15 @@ bitflags::bitflags! {
|
|||||||
#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
|
#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))]
|
||||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||||
pub struct Capabilities: u32 {
|
pub struct Capabilities: u32 {
|
||||||
/// Support for [`AddressSpace:PushConstant`].
|
/// Support for [`AddressSpace::PushConstant`][1].
|
||||||
|
///
|
||||||
|
/// [1]: crate::AddressSpace::PushConstant
|
||||||
const PUSH_CONSTANT = 0x1;
|
const PUSH_CONSTANT = 0x1;
|
||||||
/// Float values with width = 8.
|
/// Float values with width = 8.
|
||||||
const FLOAT64 = 0x2;
|
const FLOAT64 = 0x2;
|
||||||
/// Support for [`Builtin:PrimitiveIndex`].
|
/// Support for [`BuiltIn::PrimitiveIndex`][1].
|
||||||
|
///
|
||||||
|
/// [1]: crate::BuiltIn::PrimitiveIndex
|
||||||
const PRIMITIVE_INDEX = 0x4;
|
const PRIMITIVE_INDEX = 0x4;
|
||||||
/// Support for non-uniform indexing of sampled textures and storage buffer arrays.
|
/// Support for non-uniform indexing of sampled textures and storage buffer arrays.
|
||||||
const SAMPLED_TEXTURE_AND_STORAGE_BUFFER_ARRAY_NON_UNIFORM_INDEXING = 0x8;
|
const SAMPLED_TEXTURE_AND_STORAGE_BUFFER_ARRAY_NON_UNIFORM_INDEXING = 0x8;
|
||||||
@ -90,17 +94,26 @@ bitflags::bitflags! {
|
|||||||
const UNIFORM_BUFFER_AND_STORAGE_TEXTURE_ARRAY_NON_UNIFORM_INDEXING = 0x10;
|
const UNIFORM_BUFFER_AND_STORAGE_TEXTURE_ARRAY_NON_UNIFORM_INDEXING = 0x10;
|
||||||
/// Support for non-uniform indexing of samplers.
|
/// Support for non-uniform indexing of samplers.
|
||||||
const SAMPLER_NON_UNIFORM_INDEXING = 0x20;
|
const SAMPLER_NON_UNIFORM_INDEXING = 0x20;
|
||||||
/// Support for [`Builtin::ClipDistance`].
|
/// Support for [`BuiltIn::ClipDistance`].
|
||||||
|
///
|
||||||
|
/// [`BuiltIn::ClipDistance`]: crate::BuiltIn::ClipDistance
|
||||||
const CLIP_DISTANCE = 0x40;
|
const CLIP_DISTANCE = 0x40;
|
||||||
/// Support for [`Builtin::CullDistance`].
|
/// Support for [`BuiltIn::CullDistance`].
|
||||||
|
///
|
||||||
|
/// [`BuiltIn::CullDistance`]: crate::BuiltIn::CullDistance
|
||||||
const CULL_DISTANCE = 0x80;
|
const CULL_DISTANCE = 0x80;
|
||||||
/// Support for 16-bit normalized storage texture formats.
|
/// Support for 16-bit normalized storage texture formats.
|
||||||
const STORAGE_TEXTURE_16BIT_NORM_FORMATS = 0x100;
|
const STORAGE_TEXTURE_16BIT_NORM_FORMATS = 0x100;
|
||||||
/// Support for [`BuiltIn::ViewIndex`].
|
/// Support for [`BuiltIn::ViewIndex`].
|
||||||
|
///
|
||||||
|
/// [`BuiltIn::ViewIndex`]: crate::BuiltIn::ViewIndex
|
||||||
const MULTIVIEW = 0x200;
|
const MULTIVIEW = 0x200;
|
||||||
/// Support for `early_depth_test`.
|
/// Support for `early_depth_test`.
|
||||||
const EARLY_DEPTH_TEST = 0x400;
|
const EARLY_DEPTH_TEST = 0x400;
|
||||||
/// Support for [`Builtin::SampleIndex`] and [`Sampling::Sample`].
|
/// Support for [`BuiltIn::SampleIndex`] and [`Sampling::Sample`].
|
||||||
|
///
|
||||||
|
/// [`BuiltIn::SampleIndex`]: crate::BuiltIn::SampleIndex
|
||||||
|
/// [`Sampling::Sample`]: crate::Sampling::Sample
|
||||||
const MULTISAMPLED_SHADING = 0x800;
|
const MULTISAMPLED_SHADING = 0x800;
|
||||||
/// Support for ray queries and acceleration structures.
|
/// Support for ray queries and acceleration structures.
|
||||||
const RAY_QUERY = 0x1000;
|
const RAY_QUERY = 0x1000;
|
||||||
|
|||||||
@ -16,23 +16,27 @@ bitflags::bitflags! {
|
|||||||
/// This flag is required on types of local variables, function
|
/// This flag is required on types of local variables, function
|
||||||
/// arguments, array elements, and struct members.
|
/// arguments, array elements, and struct members.
|
||||||
///
|
///
|
||||||
/// This includes all types except `Image`, `Sampler`,
|
/// This includes all types except [`Image`], [`Sampler`],
|
||||||
/// and some `Pointer` types.
|
/// and some [`Pointer`] types.
|
||||||
|
///
|
||||||
|
/// [`Image`]: crate::TypeInner::Image
|
||||||
|
/// [`Sampler`]: crate::TypeInner::Sampler
|
||||||
|
/// [`Pointer`]: crate::TypeInner::Pointer
|
||||||
const DATA = 0x1;
|
const DATA = 0x1;
|
||||||
|
|
||||||
/// The data type has a size known by pipeline creation time.
|
/// The data type has a size known by pipeline creation time.
|
||||||
///
|
///
|
||||||
/// Unsized types are quite restricted. The only unsized types permitted
|
/// Unsized types are quite restricted. The only unsized types permitted
|
||||||
/// by Naga, other than the non-[`DATA`] types like [`Image`] and
|
/// by Naga, other than the non-[`DATA`] types like [`Image`] and
|
||||||
/// [`Sampler`], are dynamically-sized [`Array`s], and [`Struct`s] whose
|
/// [`Sampler`], are dynamically-sized [`Array`]s, and [`Struct`]s whose
|
||||||
/// last members are such arrays. See the documentation for those types
|
/// last members are such arrays. See the documentation for those types
|
||||||
/// for details.
|
/// for details.
|
||||||
///
|
///
|
||||||
/// [`DATA`]: TypeFlags::DATA
|
/// [`DATA`]: TypeFlags::DATA
|
||||||
/// [`Image`]: crate::Type::Image
|
/// [`Image`]: crate::TypeInner::Image
|
||||||
/// [`Sampler`]: crate::Type::Sampler
|
/// [`Sampler`]: crate::TypeInner::Sampler
|
||||||
/// [`Array`]: crate::Type::Array
|
/// [`Array`]: crate::TypeInner::Array
|
||||||
/// [`Struct`]: crate::Type::struct
|
/// [`Struct`]: crate::TypeInner::Struct
|
||||||
const SIZED = 0x2;
|
const SIZED = 0x2;
|
||||||
|
|
||||||
/// The data can be copied around.
|
/// The data can be copied around.
|
||||||
@ -43,6 +47,8 @@ bitflags::bitflags! {
|
|||||||
/// This covers anything that can be in [`Location`] binding:
|
/// This covers anything that can be in [`Location`] binding:
|
||||||
/// non-bool scalars and vectors, matrices, and structs and
|
/// non-bool scalars and vectors, matrices, and structs and
|
||||||
/// arrays containing only interface types.
|
/// arrays containing only interface types.
|
||||||
|
///
|
||||||
|
/// [`Location`]: crate::Binding::Location
|
||||||
const IO_SHAREABLE = 0x8;
|
const IO_SHAREABLE = 0x8;
|
||||||
|
|
||||||
/// Can be used for host-shareable structures.
|
/// Can be used for host-shareable structures.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user