Skip to content

chore(ext): update webgpu#15059

Merged
crowlKats merged 15 commits intodenoland:mainfrom
danteissaias:main
Jul 20, 2022
Merged

chore(ext): update webgpu#15059
crowlKats merged 15 commits intodenoland:mainfrom
danteissaias:main

Conversation

@danteissaias
Copy link
Copy Markdown
Contributor

No description provided.

@danteissaias
Copy link
Copy Markdown
Contributor Author

Here is google's example to test new syntax https://gist.github.com/danteissaias/b855d765996ef46b8a5b05d0fa62db76

Currently there is an issue with webidl.converters.GPUBindGroupLayoutEntry which prevents createBindGroup from working.

@crowlKats
Copy link
Copy Markdown
Member

whats up with the typings?

@danteissaias
Copy link
Copy Markdown
Contributor Author

I copied the latest ones from the repo was unsure of whether to keep in the documentation.

@crowlKats
Copy link
Copy Markdown
Member

which repo?

@danteissaias
Copy link
Copy Markdown
Contributor Author

@danteissaias
Copy link
Copy Markdown
Contributor Author

There was a commit ID in a comment references this repo.

@crowlKats
Copy link
Copy Markdown
Member

ah, we always handroll our webgpu typings

@danteissaias
Copy link
Copy Markdown
Contributor Author

Ok, I’ll do that tomorrow.

@danteissaias
Copy link
Copy Markdown
Contributor Author

Could you investigate the error with createBindGroup?

@crowlKats
Copy link
Copy Markdown
Member

yes, i will do that

@crowlKats
Copy link
Copy Markdown
Member

crowlKats commented Jul 4, 2022

There was a commit ID in a comment references this repo.

ah we havent updated in a while (or rather, since the first few PRs). that commit used to refer to the commit of the webidl that the typings match to, but i think its better we remove it as we have an idl file stored alongside the code

@crowlKats crowlKats self-requested a review July 4, 2022 00:48
@crowlKats
Copy link
Copy Markdown
Member

@danteissaias fixed the createBindGroup problem, now the result I am getting is an typedarray with 0s

@danteissaias
Copy link
Copy Markdown
Contributor Author

Somethings going wrong…. Will have to investigate.

@crowlKats
Copy link
Copy Markdown
Member

@danteissaias
manually validated the wgsl with the same naga version that wgpu is using:

error: unknown attribute: 'stage'
   ┌─ test.wgsl:10:2
   │
10 │ @stage(compute) @workgroup_size(8, 8)
   │  ^^^^^ unknown attribute

Could not parse WGSL

@danteissaias
Copy link
Copy Markdown
Contributor Author

danteissaias commented Jul 4, 2022

So either google’s example is outdated to the spec or wgpu-rs is…

@danteissaias
Copy link
Copy Markdown
Contributor Author

https://www.w3.org/TR/WGSL/#entry-point-decl looks like the example is outdated. Try with this syntax.

@crowlKats
Copy link
Copy Markdown
Member

yep, was just going through the spec as well, thank god its not a problem with wgpu/naga 😅

@crowlKats
Copy link
Copy Markdown
Member

hm no luck still, the shader validates now, but still getting 0s in typedarray

@danteissaias
Copy link
Copy Markdown
Contributor Author

I updated the gist. Try with new shader changes.

@crowlKats
Copy link
Copy Markdown
Member

interesting new output:

Vector component[0] type Scalar { kind: Float, width: 4 }
Float32Array(6) [ 0, 0, 0, 0, 0, 0 ]

@danteissaias
Copy link
Copy Markdown
Contributor Author

https://gist.github.com/danteissaias/ba81b617ef1143a7ceb83e63f116c3c9

This is the hello-compute example updated with the newest shader syntax from the wgpu repo. It works. So must be an issue with google's shader.

@danteissaias danteissaias marked this pull request as ready for review July 4, 2022 19:52
Copy link
Copy Markdown
Member

@crowlKats crowlKats left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks a lot for this!

@crowlKats crowlKats merged commit 2b1f145 into denoland:main Jul 20, 2022
@danteissaias
Copy link
Copy Markdown
Contributor Author

👍

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.

2 participants