-
Notifications
You must be signed in to change notification settings - Fork 954
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
Image atomics support #6706
base: trunk
Are you sure you want to change the base?
Image atomics support #6706
Conversation
158dedb
to
9fed96c
Compare
6685477
to
d33c0ad
Compare
if !storage_access.0.contains(!access) { | ||
frontend.errors.push(Error { | ||
kind: ErrorKind::SemanticError( | ||
"The same memory qualifier can only be used once".into(), | ||
), | ||
meta: token.meta, | ||
}) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what this is for, but if I don't remove it then naga glsl snapshot fails
d33c0ad
to
a43bd86
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started reviewing with the Naga IR, and found something that should be addressed.
@atlv24 I appreciate the docs! |
This comment was marked as outdated.
This comment was marked as outdated.
a43bd86
to
5bb6d54
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more requests.
@jimblandy what did you force push may i ask? and thanks for the review! |
Just changing I always feel bad asking people to change stuff like that because it's trivial, so I just fix it myself, amend to keep the PR review a single commit, and force push. If you'd rather I not amend, that's fine. (And if you'd rather I make lots of minor change requests, I could do that too, but...) |
nah its fine, was just curious. i can't see the diff and visual inspection yielded nothing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Validator::validate_entry_point
, we have the following code:
let allowed_usage = match var.space {
...
crate::AddressSpace::Private | crate::AddressSpace::WorkGroup => GlobalUse::all(),
...
};
By adding ATOMIC
to GlobalUse
, this became incorrect: atomic accesses to Private
address space variables isn't permitted.
I think using atomics in local variables is already covered by Validator::validate_local_var
, but validate_entry_point
should still not say strange things.
@atlv24 If it's ok, since I've requested some non-trivial changes, rather than finishing this review, I'm going to go review some other, simpler PRs first, and then come back to this one once you've got it revised. |
@jimblandy thats fine. I am unsure how to remove the sample expression handle from the naga ir, because of the way spir-v wants to write cached expressions. before i added that field, i had tried for quite a while and not found a way to generate it on the fly once, so i settled on the dumb and simple solution. |
@atlv24 If you call |
26598f2
to
00b45cc
Compare
@jimblandy resolved all feedback |
6c2359a
to
5a4b0a8
Compare
5a4b0a8
to
86c378d
Compare
Self requesting to look at wgpu api side. |
Connections
Broken off from #5537
Description
Adds image atomics to Vulkan, DirectX, and Metal backends.
Testing
naga snapshot tests and runtime tests are included
Checklist
cargo fmt
.taplo format
.cargo clippy
. If applicable, add:--target wasm32-unknown-unknown
--target wasm32-unknown-emscripten
cargo xtask test
to run tests.CHANGELOG.md
. See simple instructions inside file.