Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

64 bit image atomics #5537

Draft
wants to merge 108 commits into
base: trunk
Choose a base branch
from
Draft

64 bit image atomics #5537

wants to merge 108 commits into from

Conversation

atlv24
Copy link
Contributor

@atlv24 atlv24 commented Apr 15, 2024

Connections
Part of an incoming series of PRs needed by #5123
Others in this series: #5155 #5154 #5383
Addresses #4424
Depends on #5383
Ultimately for bevy meshlets pipeline bevyengine/bevy#10164

Description
No image atomics available. I'm opening this early to show the current approach. I think atomic image operations should be added as a Image Store variant, however, as it reuses most of the infrastructure. Im thinking about an enum like ImageOperation { Store, Atomic(AtomicFunctionNoReturn) }.

Testing
WIP

Checklist

  • Run cargo fmt.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown
    • --target wasm32-unknown-emscripten
  • Run cargo xtask test to run tests.
  • Add change to CHANGELOG.md. See simple instructions inside file.

atlv24 and others added 29 commits April 24, 2024 21:24
Rather than introducing an entirely new statement variant
`AtomicNoResult`, make `Statement::Atomic::result` an `Option`. This
reduces the patch size by about a third, and has no effect on snapshot
output other than the direct IR dumps.

In HLSL output, don't bother to generated "discard" temporaries for
functions where the final `original_value` parameter is not required.
This improves snapshot output.

Improve documentation for `Expression::AtomicResult`,
`Statement::Atomic`, and the new `valid::Capabilities` flags.

Rewrite `Atomic` statement validation. Consolidate validation of
`AtomicResult` expressions with this; gfx-rs#5771 ensures that there is
indeed some `Atomic` statement referring to every `AtomicResult`
expression, so we can be sure it will be validated.

Fixes gfx-rs#5742.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants