pub struct HeadlessGpu {
pub device: Device,
pub queue: Queue,
pub adapter_info: String,
}Expand description
Bare wgpu device + queue with no surface. Suitable for
wgpu::ComputePass work that doesn’t present.
Fields§
§device: DeviceThe wgpu device — create buffers/pipelines against this exactly as with the windowed renderer’s device.
queue: QueueThe device’s submission queue for uploads + compute dispatches.
adapter_info: StringHuman-readable adapter description
("name (backend, device_type)") for logs and test skips.
Implementations§
Source§impl HeadlessGpu
impl HeadlessGpu
Sourcepub async fn new(settings: GpuRendererSettings) -> Result<Self, GpuInitError>
pub async fn new(settings: GpuRendererSettings) -> Result<Self, GpuInitError>
§Errors
Returns GpuInitError::NoAdapter if no compatible adapter
is present (no Vulkan/Metal/DX12 driver), or
GpuInitError::RequestDevice if device creation fails.
Sourcepub fn new_blocking(settings: GpuRendererSettings) -> Result<Self, GpuInitError>
pub fn new_blocking(settings: GpuRendererSettings) -> Result<Self, GpuInitError>
Auto Trait Implementations§
impl !RefUnwindSafe for HeadlessGpu
impl !UnwindSafe for HeadlessGpu
impl Freeze for HeadlessGpu
impl Send for HeadlessGpu
impl Sync for HeadlessGpu
impl Unpin for HeadlessGpu
impl UnsafeUnpin for HeadlessGpu
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more