vyre 0.4.0

GPU compute intermediate representation with a standard operation library
Documentation
1
2
3
4
5
6
7
8
9
10
11
use super::{Error, MAX_WGSL_OUTPUT_BYTES};

#[inline]
pub(crate) fn ensure_output_within_limit(out: &str) -> Result<(), Error> {
    if out.len() > MAX_WGSL_OUTPUT_BYTES {
        return Err(Error::lowering(
            "lowered WGSL output exceeds 64 MiB. Fix: split the program into smaller shaders.",
        ));
    }
    Ok(())
}