kvark / vange-rs

Rusty Vangers clone
https://vange.rs
Apache License 2.0
427 stars 21 forks source link

Shaders validation failing after updating wgpu to lastest commit. #189

Closed caiiiycuk closed 2 years ago

caiiiycuk commented 2 years ago

Guess it's related to https://github.com/gfx-rs/wgpu/commit/dcd07f0391c8213e148bcc9518b0b2de2757fbba However I verified that https://github.com/gfx-rs/wgpu/commit/77b2c25684f971daa977596403f01c71d32ea685 and https://github.com/gfx-rs/wgpu/commit/39a0256bcb98876d9138fd01f25b48fc0d62a3c0 not working.

https://github.com/gfx-rs/wgpu/commit/f3891fed335b277376d5185d58441b2148cdc529 - works.

Error:

thread '<unnamed>' panicked at 'wgpu error: Validation Error

Caused by:
    In Device::create_shader_module
      note: label = `object`

Shader 'object' parsing error: expected global item ('struct', 'let', 'var', 'type', ';', 'fn') or the end of the file, found '['
   ┌─ wgsl:64:1
   │
64 │ [[group(0), binding(0)]] var<uniform> u_Globals: Globals;
   │ ^ expected global item ('struct', 'let', 'var', 'type', ';', 'fn') or the end of the file

    expected global item ('struct', 'let', 'var', 'type', ';', 'fn') or the end of the file, found '['
caiiiycuk commented 2 years ago

Fixed in c698ebf