Skip to content

[naga] Validate CallResult and AtomicResult population.#5741

Merged
teoxoy merged 2 commits intogfx-rs:trunkfrom
jimblandy:naga-validate-emit-result-expressions
May 28, 2024
Merged

[naga] Validate CallResult and AtomicResult population.#5741
teoxoy merged 2 commits intogfx-rs:trunkfrom
jimblandy:naga-validate-emit-result-expressions

Conversation

@jimblandy
Copy link
Copy Markdown
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
jimblandy added 2 commits May 27, 2024 21:04
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
Copy Markdown
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 May 28, 2024 04:07
@jimblandy
Copy link
Copy Markdown
Member Author

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

Copy link
Copy Markdown
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
@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