Skip to main content

validate_wgsl

Function validate_wgsl 

Source
pub fn validate_wgsl(source: &str) -> Result<(), String>
Expand description

Parse and validate one WGSL module through naga — the same frontend wgpu hands every shader in this engine to, so passing here is passing the real gate rather than a lookalike.

The error is a String because both callers (the converter’s per-preset ranking and the loader’s per-file skip) want text with the preset’s name wrapped around it, not a type to match on.