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 struct constructor failed #4953

Closed
Alphapage opened this issue Jan 1, 2024 · 2 comments
Closed

Wgsl struct constructor failed #4953

Alphapage opened this issue Jan 1, 2024 · 2 comments

Comments

@Alphapage
Copy link

Hello,

This code doesn't work:

https://google.github.io/tour-of-wgsl/types/structures/

It fails with error:

Shader validation error:
┌─ Fragment shader:7:19

7 │ const a_bicycle = Vehicle(2, 10.5);
│ ^^^^^^^^^^^^^^^^ naga::Expression [3]

Constant expression [3] is invalid
Composing 0's component type is not expected

Platform
MacOs, wgpu:0.18.0

@teoxoy
Copy link
Member

teoxoy commented Jan 2, 2024

I think this should work now (#4743). Could you try that commit or latest trunk?

@Alphapage
Copy link
Author

Yeah !
That's working.
Hope to have a release version soon...
Many thanks.

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

No branches or pull requests

2 participants