Add low-level atomic instructions to spirv_std::arch#877
Add low-level atomic instructions to spirv_std::arch#877eddyb merged 5 commits intoEmbarkStudios:mainfrom
spirv_std::arch#877Conversation
crates/spirv-std/src/arch/atomic.rs
Outdated
| #[spirv_std_macros::gpu_only] | ||
| #[doc(alias = "OpAtomicFMinEXT")] | ||
| #[inline] | ||
| pub unsafe fn atomic_f_min_ext<F: Float, const SCOPE: u32, const SEMANTICS: u32>( |
There was a problem hiding this comment.
I'm just quicky skimming over this on my phone, but I think these would probably be fine with out the _ext on the end of the function name. Everything else looks good though! 👍
There was a problem hiding this comment.
Okay, I removed the ext suffix 🙂
|
I saw that an |
Co-authored-by: Eduard-Mihai Burtescu <edy.burt@gmail.com>
|
@BeastLe9enD I just tried pushing a commit fixing the test, but either the diff --git a/tests/ui/arch/debug_printf_type_checking.stderr b/tests/ui/arch/debug_printf_type_checking.stderr
index f719d0aba..d422023e6 100644
--- a/tests/ui/arch/debug_printf_type_checking.stderr
+++ b/tests/ui/arch/debug_printf_type_checking.stderr
@@ -100,9 +100,9 @@ error[E0277]: the trait bound `{float}: Vector<f32, 2_usize>` is not satisfied
<IVec3 as Vector<i32, 3_usize>>
and 9 others
note: required by a bound in `debug_printf_assert_is_vector`
- --> $SPIRV_STD_SRC/lib.rs:144:8
+ --> $SPIRV_STD_SRC/lib.rs:145:8
|
-144 | V: crate::vector::Vector<TY, SIZE>,
+145 | V: crate::vector::Vector<TY, SIZE>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `debug_printf_assert_is_vector`
error[E0308]: mismatched types(line numbers in Or Sorry this fell through the cracks, |
Head branch was pushed to by a user without write access
Hey, I added some atomic instructions to
spirv_std::arch.There was already a discussion to add them, but it wasn't done at the time because the idea was to implement atomic using
core::sync::atomic(see #442).But I think it's ok to add the intrinsics in advance and then build the API on top of them later 🙂