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

The bool type is neither a host-shareable nor an interface type. #912

Merged
merged 3 commits into from
May 2, 2022

Conversation

jimblandy
Copy link
Member

However, bool is permitted for built-ins.

@jimblandy jimblandy requested a review from kvark May 27, 2021 04:35
@jimblandy
Copy link
Member Author

Actually, it might be best to combine this with a fix for TypeFlags::INTERFACE handling.

@jimblandy jimblandy marked this pull request as draft May 27, 2021 20:06
src/valid/type.rs Outdated Show resolved Hide resolved
@teoxoy
Copy link
Member

teoxoy commented Apr 28, 2022

Can we merge this?

@jimblandy
Copy link
Member Author

It's probably worth re-reviewing, since it's so old.

@teoxoy
Copy link
Member

teoxoy commented Apr 29, 2022

I can re-review it but I think it needs to be rebased first.

@jimblandy
Copy link
Member Author

Okay - this version is basically a rewrite for the current sources. It depends on #1875 (and thus is still a draft), and conflicts with #1874. If we can get those landed, I'll re-base and move this out of "draft" state.

The macro can check for both success and failure, so the new name is
more accurate, and shorter.
The new `check_one_validation` macro permits the source code to be a
computed expression, not just a string literal. This also cleans up
some of the handling of the optional guard expression.
@jimblandy jimblandy marked this pull request as ready for review April 30, 2022 17:25
@jimblandy
Copy link
Member Author

This has some renames and some refactoring, so it's probably easiest to review commit-by-commit.

Each commit should pass CI individually, so it's not necessary to squash before merging.

@jimblandy jimblandy requested a review from teoxoy April 30, 2022 17:38
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 but the title indicates that the PR will also remove bools from being HOST_SHAREABLE.

Only numeric scalars and vectors, and structs whose members are such
values, are permitted as the types of user-defined IO.
@jimblandy jimblandy requested a review from teoxoy May 1, 2022 19:53
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 great!

@teoxoy teoxoy merged commit 57e1793 into gfx-rs:master May 2, 2022
@jimblandy jimblandy deleted the bool-shareable-interface branch May 26, 2022 00:28
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.

3 participants