fn val_vulkan(src: &str) {
    use rustc_codegen_spirv::{spirv_tools_validate as validate, SpirvToolsTargetEnv as TargetEnv};

    let _lock = global_lock();
    let bytes = std::fs::read(build(src)).unwrap();
    if let Err(e) = validate(Some(TargetEnv::Vulkan_1_2), &bytes, None) {
        panic!("Vulkan validation failed:\n{}", e.to_string());
    }
}
/// While `val` runs baseline SPIR-V validation, for some tests we want the
/// stricter Vulkan validation (`vulkan1.2` specifically), which may produce
/// additional errors (such as missing Vulkan-specific decorations).
While `val` runs baseline SPIR-V validation, for some tests we want the
stricter Vulkan validation (`vulkan1.2` specifically), which may produce
additional errors (such as missing Vulkan-specific decorations).
While ` val ` runs baseline SPIR - V validation for some tests we want the stricter Vulkan validation ( ` vulkan1 . 2 ` specifically ) which may produce additional errors ( such as missing Vulkan - specific decorations ) .
fn val_vulkan(src: &str) {
    use rustc_codegen_spirv::{spirv_tools_validate as validate, SpirvToolsTargetEnv as TargetEnv};
    let _lock = global_lock();
    let bytes = std::fs::read(build(src)).unwrap();
    if let Err(e) = validate(Some(TargetEnv::Vulkan_1_2), &bytes, None) {
        panic!("Vulkan validation failed:\n{}", e.to_string());
    }
}
fn val_vulkan ( src : & str ) { use rustc_codegen_spirv :: { spirv_tools_validate as validate , SpirvToolsTargetEnv as TargetEnv } ; let _lock = global_lock ( ) ; let bytes = std :: fs :: read ( build ( src ) ) . unwrap ( ) ; if let Err ( e ) = validate ( Some ( TargetEnv :: Vulkan_1_2 ) , & bytes , None ) { panic ! ( " \n " e to_string ( ) ) ; } }
While `val` runs baseline SPIR-V validation, for some tests we want the
stricter Vulkan validation (`vulkan1.2` specifically), which may produce
additional errors (such as missing Vulkan-specific decorations).
While ` val ` runs baseline SPIR - V validation for some tests we want the stricter Vulkan validation ( ` vulkan1 . 2 ` specifically ) which may produce additional errors ( such as missing Vulkan - specific decorations ) .
src
&str
src
&str