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

wgpu-hal: Work around cbindgen bug: ignore gles::egl module. #2576

Merged
merged 1 commit into from
Apr 3, 2022

Conversation

jimblandy
Copy link
Member

The definition of EglInstance trips mozilla/cbindgen#286. Since the wgpu_hal::gles::egl module is an implementation detail anyway, it should be harmless to ask cbindgen to just ignore it.

Fixes #2575.

The definition of `EglInstance` trips mozilla/cbindgen#286. Since
the `wgpu_hal::gles::egl` module is an implementation detail anyway,
it should be harmless to ask cbindgen to just ignore it.

Fixes gfx-rs#2575.
@jimblandy jimblandy requested a review from cwfitzgerald April 3, 2022 20:15
Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

Can't get mad at that lol

@cwfitzgerald cwfitzgerald merged commit 75e82af into gfx-rs:master Apr 3, 2022
@jimblandy jimblandy deleted the cbindgen-egl-workaround branch April 4, 2022 03:36
cwfitzgerald pushed a commit that referenced this pull request Oct 25, 2023
…2576)

Do not emit an `Expression::As` conversion for WGSL like `vec3(v)`
where `v` is already a `vec3`, or `mat2x3(m)` where `m` is already a
2x3 matrix. This doesn't fix any bugs, but it makes it clearer to the
reader of `Lowerer::construct` that no conversion can actually take
place in this case.

Some snapshots are affected because `As` expressions whose `width` is
`None` are bitcast expressions, which the constant evaluator does not
yet support. When this commit removes those `As` expressions, the
constant evaluator can reduce the expression to a `Literal` or
`ZeroValue`, which is then concealed by #2539.
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.

cbindgen stumbles over egl type aliases
2 participants