Expand description
Types and functions which define our public api and their helper functionality.
§Conventions
Each major type gets its own module. The module is laid out as follows:
- The type itself
implblock for the typeDropimplementation for the type (if needed)- Descriptor types and their subtypes.
- Any non-public helper types or functions.
§Imports
Because our public api is “flat” (i.e. all types are directly under the wgpu module),
we use a single crate::* import at the top of each module to bring in all the types in
the public api. This is done to:
- Avoid having to write out a long list of imports for each module.
- Allow docs to be written naturally, without needing to worry about needing dedicated doc imports.
- Treat wgpu-types types and wgpu-core types as a single set.
Re-exports§
pub use adapter::*;pub use bind_group::*;pub use bind_group_layout::*;pub use blas::*;pub use buffer::*;pub use command_buffer::*;pub use command_encoder::*;pub use common_pipeline::*;pub use compute_pass::*;pub use compute_pipeline::*;pub use device::*;pub use external_texture::*;pub use instance::*;pub use pipeline_cache::*;pub use pipeline_layout::*;pub use query_set::*;pub use queue::*;pub use render_bundle::*;pub use render_bundle_encoder::*;pub use render_pass::*;pub use render_pipeline::*;pub use sampler::*;pub use shader_module::*;pub use surface::*;pub use surface_texture::*;pub use texture::*;pub use texture_view::*;pub use tlas::*;
Modules§
- adapter 🔒
- bind_
group 🔒 - bind_
group_ 🔒layout - blas 🔒
- buffer 🔒
- command_
buffer 🔒 - command_
buffer_ 🔒actions - Not a root type, but common types for command buffer deferral actions.
- command_
encoder 🔒 - common_
pipeline 🔒 - compute_
pass 🔒 - compute_
pipeline 🔒 - device 🔒
- external_
texture 🔒 - instance 🔒
- pipeline_
cache 🔒 - pipeline_
layout 🔒 - query_
set 🔒 - queue 🔒
- render_
bundle 🔒 - render_
bundle_ 🔒encoder - render_
pass 🔒 - render_
pipeline 🔒 - sampler 🔒
- shader_
module 🔒 - surface 🔒
- surface_
texture 🔒 - texture 🔒
- texture_
view 🔒 - tlas 🔒
Structs§
- Phantom
Drop 🔒 - A cute utility type that works just like
PhantomData, but also implementsDrop. This forces any lifetimes that are associated with the type to be used until theDropimpl is ran. This prevents lifetimes from being shortened.
Type Aliases§
- Label
- Object debugging label.