vyre-wgpu 0.1.0

wgpu backend for vyre IR — implements VyreBackend, owns GPU runtime, buffer pool, pipeline cache
Documentation
//! Layer 0 GPU runtime: device, buffers, shader compilation, and dispatch.

/// Tiered caching for device buffers and shader pipelines.
pub mod cache;
/// GPU device abstraction and initialization.
pub mod device;
/// Runtime wire-format serialization for multi-part programs.
pub mod serializer;
/// Shader pipeline compilation and caching.
pub mod shader;
/// Default GPU workgroup size constant used by primitive kernels.
pub mod workgroup_size;
pub use workgroup_size::WORKGROUP_SIZE;

/// LRU cache access tracker for buffer eviction policies.
pub use cache::lru::AccessTracker;
/// Cache tier policies and access statistics.
pub use cache::tier::{AccessStats, CacheError, LruPolicy, TierPolicy};
/// Initialize a cached GPU device wrapper.
pub use device::cached_device::cached_device;
/// Compile a compute pipeline from WGSL source.
pub use shader::compile_compute_pipeline::{
    compile_compute_pipeline, compile_compute_pipeline_with_layout,
};

/// Build a bind group entry binding `buffer` at `binding` index.
#[must_use]
#[inline]
pub fn bg_entry(binding: u32, buffer: &wgpu::Buffer) -> wgpu::BindGroupEntry<'_> {
    wgpu::BindGroupEntry {
        binding,
        resource: buffer.as_entire_binding(),
    }
}