vyre_wgpu/runtime/mod.rs
1//! Layer 0 GPU runtime: device, buffers, shader compilation, and dispatch.
2
3/// Tiered caching for device buffers and shader pipelines.
4pub mod cache;
5/// GPU device abstraction and initialization.
6pub mod device;
7/// Runtime wire-format serialization for multi-part programs.
8pub mod serializer;
9/// Shader pipeline compilation and caching.
10pub mod shader;
11/// Default GPU workgroup size constant used by primitive kernels.
12pub mod workgroup_size;
13pub use workgroup_size::WORKGROUP_SIZE;
14
15/// LRU cache access tracker for buffer eviction policies.
16pub use cache::lru::AccessTracker;
17/// Cache tier policies and access statistics.
18pub use cache::tier::{AccessStats, CacheError, LruPolicy, TierPolicy};
19/// Initialize a cached GPU device wrapper.
20pub use device::cached_device::cached_device;
21/// Compile a compute pipeline from WGSL source.
22pub use shader::compile_compute_pipeline::{
23 compile_compute_pipeline, compile_compute_pipeline_with_layout,
24};
25
26/// Build a bind group entry binding `buffer` at `binding` index.
27#[must_use]
28#[inline]
29pub fn bg_entry(binding: u32, buffer: &wgpu::Buffer) -> wgpu::BindGroupEntry<'_> {
30 wgpu::BindGroupEntry {
31 binding,
32 resource: buffer.as_entire_binding(),
33 }
34}