Skip to content
This repository was archived by the owner on Oct 31, 2025. It is now read-only.

Add a OpAtomicIIncrement function to arch#839

Merged
eddyb merged 1 commit intoEmbarkStudios:mainfrom
expenses:atomic-i-increment
Jan 13, 2022
Merged

Add a OpAtomicIIncrement function to arch#839
eddyb merged 1 commit intoEmbarkStudios:mainfrom
expenses:atomic-i-increment

Conversation

@expenses
Copy link
Copy Markdown
Contributor

@expenses expenses commented Jan 9, 2022

I thought I'd just upstream this function from my shader code. While implementing all the atomic instructions with a nice api would of course be nice, this is all you need for doing simple bump allocations into a storage buffer e.g. for frustum or light culling.

I've been using it with the Device scope in my code but that's not allowed in the compiletests without a new capability so the test just uses Workgroup for now:

error: error:0:0 - Use of device scope with VulkanKHR memory model requires the VulkanMemoryModelDeviceScopeKHR capability

@eddyb eddyb merged commit 11e21c6 into EmbarkStudios:main Jan 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants