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

[wgsl-in] Handle all(bool) and any(bool) #2445

Merged
merged 1 commit into from
Aug 29, 2023

Conversation

fornwall
Copy link
Contributor

In wgsl there are overloads for all(bool) and any(bool) which just returns the boolean unmodified.

As at least glsl any and all does not support that, let's remove them while lowering to get rid of them early.

Fixes #1911.

src/front/wgsl/lower/mod.rs Outdated Show resolved Hide resolved
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.

Besides the suggestion, LGTM; I think it makes sense for this no-op to be handled by the frontend.

@fornwall
Copy link
Contributor Author

Besides the suggestion, LGTM; I think it makes sense for this no-op to be handled by the frontend.

Thanks - applied the suggestion and squashed the commits.

@teoxoy teoxoy merged commit 3bd2834 into gfx-rs:master Aug 29, 2023
9 checks passed
@fornwall fornwall deleted the wgsl-any-all-bool branch August 29, 2023 19:35
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.

[wgsl-in] Error on provision of boolean scalars to all/any built-in functions
2 participants