You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Naga's SPIR-V frontend does not currently handle atomic operations. Using an atomic operation (in this case spirv_std::arch::atomic_i_increment in a rust-gpu shader) leads to a parse error:
I'm treating this as the tracking issue for adding atomics to the spv frontend.
Milestone 1
Completion of milestone 1 will be a proof-of-strategy, after which that strategy can be re-applied to complete atomics support for all operations. First atomic operations support will be documented in the renderling devlog as a method / PoC to help in the completion of other operations.
So AtomicIIncrement is working in v22.0? I'm just wondering if Bevy's upcoming v0.15 release (the current release is still on naga v0.20.0) will support some SPIRV atomics. Though I understand we'll have to wait for #5824 to get more functions, like say AtomicIDecrement. Also, I wonder if that will be a patch bump so that we can use Cargo's [patch.crates-io] to get more atomics?
@tombhAtomicIIncrement should indeed be working in 0.22! Please let me know if naga does not accept your shader that uses this op!
@cwfitzgerald#5702 was the parsing portion of support for AtomicIIncrement and #5775 is actually the bulk of atomics support (it's the whole type-upgrade thing). #5824 add support for parsing more ops and after it lands naga will support all atomic ops except for AtomicCompareExchange, which is going to take just a bit more infrastructure to support.
Activity
schell commentedon Nov 24, 2023
I've submitted a proposal to NLNet to fund this issue. If they accept my proposal I'll likely pick this up after the holidays.
tombh commentedon Sep 18, 2024
So
AtomicIIncrementis working in v22.0? I'm just wondering if Bevy's upcoming v0.15 release (the current release is still on naga v0.20.0) will support some SPIRV atomics. Though I understand we'll have to wait for #5824 to get more functions, like sayAtomicIDecrement. Also, I wonder if that will be a patch bump so that we can use Cargo's[patch.crates-io]to get more atomics?cwfitzgerald commentedon Sep 18, 2024
This is just parsing, not fully translating them, as far as im aware. @schell is that a correct assessment?
schell commentedon Sep 18, 2024
@tombh
AtomicIIncrementshould indeed be working in 0.22! Please let me know ifnagadoes not accept your shader that uses this op!@cwfitzgerald #5702 was the parsing portion of support for
AtomicIIncrementand #5775 is actually the bulk of atomics support (it's the whole type-upgrade thing). #5824 add support for parsing more ops and after it landsnagawill support all atomic ops except forAtomicCompareExchange, which is going to take just a bit more infrastructure to support.cwfitzgerald commentedon Sep 18, 2024
Oh snap, how did I miss that! That's awesome
tombh commentedon Sep 18, 2024
Great news @schell! I atomically increment your awesomeness 😆
schell commentedon Sep 18, 2024
OMG that's a good one 🤣 ! 🙇
feature: [spv-front] Support for OpAtomicCompareExchange
feature: [spv-front] Support for OpAtomicCompareExchange
feature: [spv-front] Support for OpAtomicCompareExchange (#6590)
schell commentedon Dec 17, 2024
Well - this has been great. This work is now all wrapped up and tied with a bow!
Thanks @jimblandy ! 🙇
😿 😄 🚀 ☕ ☕ ☕
cwfitzgerald commentedon Dec 17, 2024
This is amazing! Thank you so much!
schell commentedon Dec 17, 2024
Thank you too, @cwfitzgerald 🙇 :)