Skip to main content

vyre_spec/
buffer_access.rs

1//! Frozen buffer-access tags used by operation and program metadata.
2
3/// Buffer access mode in the frozen data contract.
4///
5/// Example: `BufferAccess::ReadWrite` records that a storage buffer may be
6/// both read and written by a lowered operation.
7#[derive(Debug, Clone, PartialEq, Eq, Hash, serde::Deserialize, serde::Serialize)]
8#[non_exhaustive]
9pub enum BufferAccess {
10    /// Read-only storage buffer.
11    ReadOnly,
12    /// Read-write storage buffer.
13    ReadWrite,
14    /// Uniform buffer: small, read-only, and fast path.
15    Uniform,
16    /// Write-only storage buffer.
17    WriteOnly,
18    /// Workgroup-local shared memory.
19    Workgroup,
20}