pub struct BindTarget {
pub buffer: u32,
pub texture: u32,
pub sampler: u32,
pub count: Option<NonZeroU32>,
}msl only.Expand description
The MSL target to bind a resource to.
A single SPIR-V binding may bind to multiple registers for multiple resource types.
The count field indicates the number of resources consumed by this binding, if the binding represents an array of resources.
If the resource array is a run-time-sized array, which are legal in GLSL or SPIR-V, this value will be used to declare the array size in MSL, which does not support run-time-sized arrays.
If using MSL 2.0 argument buffers (for iOS only) the resource is not a storage image,
the binding reference we remap to will become an [[id(N)]] attribute within
the argument buffer index specified in
ResourceBinding::ArgumentBuffer.
For resources which are bound in the “classic” MSL 1.0 way or discrete descriptors, the remap will
become a [[buffer(N)]], [[texture(N)]] or [[sampler(N)]] depending on the resource types used.
Fields§
§buffer: u32The buffer index to bind to, if applicable.
texture: u32The texture index to bind to, if applicable.
sampler: u32The sampler index to bind to, if applicable.
count: Option<NonZeroU32>The number of resources consumed by this binding, if the binding is an array of resources.
Trait Implementations§
Source§impl Clone for BindTarget
impl Clone for BindTarget
Source§fn clone(&self) -> BindTarget
fn clone(&self) -> BindTarget
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more