pub struct DeviceCapabilities {
pub preferred_surface_format: TextureFormat,
pub preferred_render_target_format: TextureFormat,
pub supported_surface_formats: Vec<TextureFormat>,
pub supported_render_target_formats: Vec<TextureFormat>,
pub has_zero_copy_storage_readback: bool,
pub buffer_resize_cost: BufferResizeCost,
pub buffer_page_size: u64,
pub buffer_decommit_supported: bool,
pub host_sidecar_on_submit_worker: bool,
pub split_compute_partitions_on_barrier_cost: bool,
pub fuse_upload_with_compute_partitions: bool,
}Expand description
Device capabilities and format preferences.
Use this to query the optimal formats and limits for your use case.
Fields§
§preferred_surface_format: TextureFormatPreferred format for window surfaces (swapchains).
For windowed apps, use this for RenderPipelineDesc::target_format.
preferred_render_target_format: TextureFormatPreferred format for off-screen render targets. For headless rendering (video encoding, CPU readback), use this format.
supported_surface_formats: Vec<TextureFormat>Formats supported for window surfaces.
supported_render_target_formats: Vec<TextureFormat>Formats supported for render targets.
has_zero_copy_storage_readback: boolWhether crate::types::BufferFlags::CPU_READABLE scattered buffers can be read from CPU
without a GPU copy.
true on Vulkan (HOST_VISIBLE storage) and Metal (Shared storage). false on Direct3D 12
(requires GPU copy to a READBACK heap).
buffer_resize_cost: BufferResizeCostHow costly in-place buffer resize (resize_to) is on this device.
buffer_page_size: u64Sparse / tile page size when applicable; informational for aligning resize hints.
buffer_decommit_supported: boolWhether hint_unused_above on backing buffer allocations can return physical memory to the system.
host_sidecar_on_submit_worker: boolWhether crate::Scheme::defer_host_write / host-observed waits are applied on the
submission worker before GPU execute (DX12, Vulkan, and Metal).
When false, callers must keep synchronous host writes and render-thread reuse gates.
split_compute_partitions_on_barrier_cost: boolWhether large pure-compute partitions may be subdivided at their heaviest barrier boundary to expose GPU-pipeline overlap between submissions.
Enabled on Vulkan/DX12. Disabled on Metal: cross-CB MTLSharedEvent waits
serialize consecutive partitions and dominate any overlap gains.
fuse_upload_with_compute_partitions: boolWhether the fresh Scheme submit path may fuse an upload-only partition with the immediately following compute partition into one command buffer.
Enabled on Metal so blit uploads and compute dispatches share one
MTLCommandBuffer (blit encoder → compute encoder). Disabled elsewhere:
upload and compute partitions remain separate submissions.
Trait Implementations§
Source§impl Clone for DeviceCapabilities
impl Clone for DeviceCapabilities
Source§fn clone(&self) -> DeviceCapabilities
fn clone(&self) -> DeviceCapabilities
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more