Skip to content

Conversation

@kvark
Copy link
Contributor

@kvark kvark commented Dec 10, 2020

Fixes #750

builtin SPIR-V HLSL Metal GLSL
workgroup_id WorkgroupId SV_GroupID threadgroup_position_in_grid gl_WorkGroupID
workgroup_size WorkgroupSize ??? dispatch_threads_per_threadgroup gl_WorkGroupSize

The lack of workgroup_size in HLSL is a bit of a concern, but since we have to basically insert the same value in the numgroups declaration anyway:

[numthreads(4,5,6)
void Foo () {.. }

... we should be able to do the same for workgroup_size builtin

@Kangz Kangz added the wgsl WebGPU Shading Language Issues label Dec 11, 2020
@kvark
Copy link
Contributor Author

kvark commented Jan 19, 2021

Do we have to wait another week, or can we just get this in?

@dj2
Copy link
Member

dj2 commented Jan 20, 2021

We'd previously said in the group that this was coming back, so I think we can merge this now.

@dj2 dj2 merged commit 7e1d43d into main Jan 20, 2021
@kvark kvark deleted the kvark-workgroup branch January 20, 2021 14:22
ben-clayton pushed a commit to ben-clayton/gpuweb that referenced this pull request Sep 6, 2022
This PR adds unimplemented stubs for the synchronization builtin functions.

 * `storageBarrier`
 * `workgroupBarrier`

Issue gpuweb#1249, gpuweb#1295
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wgsl WebGPU Shading Language Issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Workgroup Size builtin decoration restrictions.

4 participants