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

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 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.

1 participant