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

[naga] Validate CallResult and AtomicResult population. #5741

Merged
merged 2 commits into from
May 28, 2024

Conversation

jimblandy
Copy link
Member

Add validation to ensure that CallResult and AtomicResult expressions actually have their values provided by Call and Atomic statements, and not Emit statements.

Fixes #5740.

@jimblandy jimblandy force-pushed the naga-validate-emit-result-expressions branch from dba1931 to 5247519 Compare May 24, 2024 23:27
Validate that `CallResult` and `AtomicResult` expressions actually
have their values provided by `Call` and `Atomic` statements, and not
`Emit` statements.

Fixes gfx-rs#5740.
Add tests to ensure that validation checks that `CallResult` and
`AtomicResult` expressions actually have their values provided by
`Call` and `Atomic` statements, and not `Emit` statements.
@jimblandy jimblandy force-pushed the naga-validate-emit-result-expressions branch from 5247519 to 5d0ba3b Compare May 28, 2024 04:05
@jimblandy
Copy link
Member Author

This can be reviewed, but perhaps the tests should also cover all the other FooResult expression types?

@jimblandy jimblandy marked this pull request as ready for review May 28, 2024 04:07
@jimblandy jimblandy requested a review from a team as a code owner May 28, 2024 04:07
@jimblandy
Copy link
Member Author

For the record, this came up while reviewing #5383.

Copy link
Member

@teoxoy teoxoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@teoxoy teoxoy merged commit 89a0ebf into gfx-rs:trunk May 28, 2024
25 checks passed
@jimblandy jimblandy mentioned this pull request Jun 3, 2024
6 tasks
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.

Result expressions aren't validated to actually be populated by their corresponding statement types
2 participants