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

Add optional extensions #24

Closed
wants to merge 2 commits into from
Closed

Conversation

munrocket
Copy link
Contributor

@munrocket munrocket commented May 9, 2024

How to use extensions:

enable chromium_experimental_subgroups;
#define PI 3.14

@compute @workgroup_size(256)
#workgroup_count main 256 1 1
fn main(
  @builtin(global_invocation_id) global_id : vec3u,
  @builtin(subgroup_size) sg_size : u32,
  @builtin(subgroup_invocation_id) sg_id : u32
) {
      // TODO: Use subgroupBallot() and subgroupBroadcast()
}

The problem that wgpu not supporting chromium extension yet, but maybe we create device with web_sys?

Also it seems some errors introduced to wasm build after 79ad98d commit, @stefnotch can you please fix it? It is visible only with compute.toy website.

@stefnotch
Copy link
Contributor

@munrocket Sure, how do I best locally reproduce the errors?

@munrocket
Copy link
Contributor Author

munrocket commented May 10, 2024

@stefnotch you can replace wgpu-compute-toy folder in compute.toys than git checkout <some_hash> in this folder, yarn install & yarn dev

@munrocket
Copy link
Contributor Author

Btw #23 also opened error in web with timestamps that was fixed here in de75501 by commenting it. So we should merge this PR for fixing web too. Timestamps need more general solution, I hope someday we will find it.

@davidar
Copy link
Contributor

davidar commented May 19, 2024

Thanks, I merged it manually with some minor changes, and also fixed wasm panicking over undefined canvas

@davidar davidar closed this May 19, 2024
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.

3 participants