Skip to content
This repository has been archived by the owner on Jan 29, 2025. It is now read-only.

[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
@fornwall fornwall deleted the wgsl-any-all-bool branch August 29, 2023 19:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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