[naga] Ensure that FooResult expressions are correctly populated.#5771
Merged
teoxoy merged 1 commit intogfx-rs:trunkfrom Jun 4, 2024
Merged
[naga] Ensure that FooResult expressions are correctly populated.#5771teoxoy merged 1 commit intogfx-rs:trunkfrom
FooResult expressions are correctly populated.#5771teoxoy merged 1 commit intogfx-rs:trunkfrom
Conversation
100d101 to
b9a6730
Compare
Make Naga module validation require that `CallResult` and `AtomicResult` expressions are indeed visited by exactly one `Call` / `Atomic` statement.
b9a6730 to
f83ffed
Compare
jimblandy
added a commit
to atlv24/wgpu
that referenced
this pull request
Jun 4, 2024
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.
jimblandy
added a commit
to atlv24/wgpu
that referenced
this pull request
Jun 4, 2024
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make Naga module validation require that
CallResultandAtomicResultexpressions are indeed visited by exactly oneCall/Atomicstatement.