Skip to content

Commit 18e3243

Browse files
committed
use spirv_std: discard to demote_to_helper_invocation()
1 parent 1b2d70c commit 18e3243

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

shared/src/lib.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -444,13 +444,5 @@ impl Derivative for Vec3 {
444444
}
445445

446446
pub fn discard() {
447-
#[cfg(target_arch = "spirv")]
448-
unsafe {
449-
use core::arch::asm;
450-
asm!(
451-
"OpExtension \"SPV_EXT_demote_to_helper_invocation\"",
452-
"OpCapability DemoteToHelperInvocationEXT",
453-
"OpDemoteToHelperInvocationEXT"
454-
);
455-
}
447+
unsafe { spirv_std::arch::demote_to_helper_invocation() }
456448
}

0 commit comments

Comments
 (0)