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(())
}