Function profile_safe_shader

Source
pub unsafe fn profile_safe_shader(
    device: &Device,
    profile: RendererProfile,
    label: &str,
    cpu_source: &str,
    gpu_source: &str,
) -> ShaderModule
Expand description

When CpuDriven, creates a checked wgsl shader, when CpuDriven creates a passthrough SPIRV shader.

§Safety

The shader must be valid, match all the respective definitions, and otherwise meet wgpu’s validation requirements