Function sanitize
pub fn sanitize(
module: &Module,
entry_point: &str,
stage: ShaderStage,
) -> Result<SanitizedModule, SanitizeError>Expand description
Sanitize a naga module for WebGL2 / GLSL ES 300 compatibility.
This function:
- Runs naga’s validator on the module
- Checks for unsupported types (f64)
- Validates uniform block sizes
- Verifies texture/sampler pairing
- Checks workgroup variables are only in compute shaders