attackgoat / screen-13

Screen 13 is an easy-to-use Vulkan rendering engine in the spirit of QBasic.
Apache License 2.0
251 stars 13 forks source link

vk-sync AccessType missing options #83

Open DGriffin91 opened 2 weeks ago

DGriffin91 commented 2 weeks ago

vk-sync AccessType is missing atomics, consequently requiring the use of AccessType::General. Is this something that should/could be a PR on the expenses/vk-sync-rs repo? The issue I'm having specifically is with Storage Buffer Atomics. Actually I see that there isn't an access type for atomics. Need to look into further. Neither read or write was working, but general did. Maybe read/write is needed?

attackgoat commented 2 weeks ago

Synchronization works at the level of stage and access, where atomic operations like atomicAdd(..) happen within some compute, fragment, etc stage. AccessType::General waits for all stages and ensures all access has completed before allowing additional access - but it should really be for testing only.

Keep in mind that when you declare access in a render graph and then do something, nothing is stopping that operation from running. It's really the next operation when this declared access is used to prevent the second access from interfering with or being affected by the first.