Expand description
Metal indirect command buffer and command types.
Corresponds to Metal/MTLIndirectCommandBuffer.hpp and Metal/MTLIndirectCommandEncoder.hpp.
Indirect command buffers allow you to encode GPU commands from the GPU itself, enabling GPU-driven rendering and compute workflows.
§Example
ⓘ
use mtl_gpu::{device, IndirectCommandBufferDescriptor, IndirectCommandType};
let device = device::system_default().expect("no Metal device");
let mut desc = IndirectCommandBufferDescriptor::new().unwrap();
desc.set_command_types(IndirectCommandType::DRAW | IndirectCommandType::DRAW_INDEXED);
desc.set_max_vertex_buffer_bind_count(8);
let icb = device.new_indirect_command_buffer(&desc, 100, ResourceOptions::default());Structs§
- Indirect
Command Buffer - A buffer that stores GPU commands for indirect execution.
- Indirect
Command Buffer Descriptor - Descriptor for creating an indirect command buffer.
- Indirect
Command Buffer Execution Range - Execution range for indirect command buffers.
- Indirect
Compute Command - A compute command within an indirect command buffer.
- Indirect
Render Command - A render command within an indirect command buffer.