From 358a54a8f26f5fa74bdd510fb8a18663b29a20f1 Mon Sep 17 00:00:00 2001 From: Sylvester Hesp Date: Tue, 30 Aug 2022 10:29:05 +0200 Subject: [PATCH] Alternative dead_code warning fix Co-authored-by: Eduard-Mihai Burtescu --- crates/spirv-std/src/arch.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/spirv-std/src/arch.rs b/crates/spirv-std/src/arch.rs index 5c3e4318db..ab05028de5 100644 --- a/crates/spirv-std/src/arch.rs +++ b/crates/spirv-std/src/arch.rs @@ -187,8 +187,7 @@ pub unsafe fn read_clock_uvec2_khr, const SCOPE: u32>() -> V { result } -#[spirv_std_macros::gpu_only] -#[allow(dead_code)] +#[cfg(target_arch = "spirv")] unsafe fn call_glsl_op_with_ints(a: T, b: T) -> T { let mut result = T::default(); asm!(