dynamis-gpu 0.7.0

wgpu device, buffer, stream, pipeline, and readback runtime
Documentation
1
2
3
4
5
6
7
8
use dynamis_gpu::GpuContext;
use std::sync::OnceLock;

static CONTEXT: OnceLock<GpuContext> = OnceLock::new();

pub fn shared() -> &'static GpuContext {
    CONTEXT.get_or_init(|| pollster::block_on(GpuContext::new()))
}