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

Improve error messages about address space #1710

Merged
merged 1 commit into from
Feb 2, 2022
Merged

Conversation

kvark
Copy link
Member

@kvark kvark commented Feb 2, 2022

It's a bit annoying to see this kind of an error:

error: 
  ┌─ uniform.wgsl:2:4
  │
2 │ var buffer: array<vec4<f32>, 4>;
  │    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ naga::GlobalVariable [1]

Global variable [1] 'buffer' is invalid: 
        Type isn't compatible with with the storage class

It's unclear what storage class is meant, and what the problem is. This PR changes this into:

error: 
  ┌─ uniform.wgsl:2:4
  │
2 │ var buffer: array<vec4<f32>, 4>;
  │    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ naga::GlobalVariable [1]

Global variable [1] 'buffer' is invalid: 
        Type isn't compatible with with address space Handle

Which is a bit better...

@jimblandy I feel that defaulting to Handle class is not doing WGSL any good, and it should be explicit instead.

@kvark kvark enabled auto-merge (rebase) February 2, 2022 17:39
@kvark kvark merged commit 9b89c5f into gfx-rs:master Feb 2, 2022
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.

1 participant