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

[g-webgpu] 升级到 naga 最新版以支持最新 WGSL 语法 #1103

Closed
xiaoiver opened this issue Jul 21, 2022 · 0 comments
Closed

[g-webgpu] 升级到 naga 最新版以支持最新 WGSL 语法 #1103

xiaoiver opened this issue Jul 21, 2022 · 0 comments
Assignees
Labels

Comments

@xiaoiver
Copy link
Contributor

xiaoiver commented Jul 21, 2022

naga v0.9.0
https://github.com/gfx-rs/naga/releases/tag/v0.9.0
https://crates.io/crates/naga

不过以下最新语法在 Chrome 103 下会报错,Tint 接受的是老版本的语法 @stage(vertex)
https://www.w3.org/TR/WGSL/#entry-point-decl

@vertex
fn vert_main() -> @builtin(position) vec4<f32> {
  return vec4<f32>(0.0, 0.0, 0.0, 1.0);
}

只能等待浏览器更新了:

Tint WGSL reader failure:
Parser: :11:4 error: expected attribute
  @compute
@xiaoiver xiaoiver self-assigned this Jul 22, 2022
@xiaoiver xiaoiver added the bug label Jul 22, 2022
xiaoiver added a commit that referenced this issue Jul 25, 2022
…1105)

* fix: account for special attribute when cloning custom element #1095

* fix: update [email protected] to use latest WGSL syntax #1103

* fix: use elementsFromPoint for picking droppable element  #1094

* fix: use a temporary vec3 when calling setPosition to prevent alloc vec3 too often

Co-authored-by: yuqi.pyq <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant