[−][src]Struct wgpu::Limits
Represents the sets of limits an adapter/device supports.
Limits "better" than the default must be supported by the adapter and requested when requesting a device. If limits "better" than the adapter supports are requested, requesting a device will panic. Once a device is requested, you may only use resources up to the limits requested even if the adapter supports "better" limits.
Requesting limits that are "better" than you need may cause performance to decrease because the implementation needs to support more than is needed. You should ideally only request exactly what you need.
See also: https://gpuweb.github.io/gpuweb/#dictdef-gpulimits
Fields
max_bind_groups: u32
Amount of bind groups that can be attached to a pipeline at the same time. Defaults to 4. Higher is "better".
max_dynamic_uniform_buffers_per_pipeline_layout: u32
Amount of uniform buffer bindings that can be dynamic in a single pipeline. Defaults to 8. Higher is "better".
max_dynamic_storage_buffers_per_pipeline_layout: u32
Amount of storage buffer bindings that can be dynamic in a single pipeline. Defaults to 4. Higher is "better".
max_sampled_textures_per_shader_stage: u32
Amount of sampled textures visible in a single shader stage. Defaults to 16. Higher is "better".
max_samplers_per_shader_stage: u32
Amount of samplers visible in a single shader stage. Defaults to 16. Higher is "better".
max_storage_buffers_per_shader_stage: u32
Amount of storage buffers visible in a single shader stage. Defaults to 4. Higher is "better".
max_storage_textures_per_shader_stage: u32
Amount of storage textures visible in a single shader stage. Defaults to 4. Higher is "better".
max_uniform_buffers_per_shader_stage: u32
Amount of uniform buffers visible in a single shader stage. Defaults to 12. Higher is "better".
max_uniform_buffer_binding_size: u32
Maximum size in bytes of a binding to a uniform buffer. Defaults to 16384. Higher is "better".
max_push_constant_size: u32
Amount of storage available for push constants in bytes. Defaults to 0. Higher is "better".
Requesting more than 0 during device creation requires Features::PUSH_CONSTANTS
to be enabled.
Expect the size to be:
- Vulkan: 128-256 bytes
- DX12: 256 bytes
- Metal: 4096 bytes
- DX11 & OpenGL don't natively support push constants, and are emulated with uniforms, so this number is less useful.
Trait Implementations
impl Clone for Limits
[src]
impl Debug for Limits
[src]
impl Default for Limits
[src]
impl<'de> Deserialize<'de> for Limits
[src]
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Limits, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<Limits, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl Eq for Limits
[src]
impl Hash for Limits
[src]
pub fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Limits
[src]
pub fn cmp(&self, other: &Limits) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Limits> for Limits
[src]
impl PartialOrd<Limits> for Limits
[src]
pub fn partial_cmp(&self, other: &Limits) -> Option<Ordering>
[src]
pub fn lt(&self, other: &Limits) -> bool
[src]
pub fn le(&self, other: &Limits) -> bool
[src]
pub fn gt(&self, other: &Limits) -> bool
[src]
pub fn ge(&self, other: &Limits) -> bool
[src]
impl Serialize for Limits
[src]
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
impl StructuralEq for Limits
[src]
impl StructuralPartialEq for Limits
[src]
Auto Trait Implementations
impl RefUnwindSafe for Limits
impl Send for Limits
impl Sync for Limits
impl Unpin for Limits
impl UnwindSafe for Limits
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,