Skip to content

[wgsl] num_workgroups translation for MSL and HLSL #920

@dj2

Description

@dj2

Looking at the various builtins in WGSL, the conversion of most of them to HLSL and MSL are convertable. For the num_workgroups builtin, I don't see the equivalent in HLSL. In MSL, it looks like it would convert to grid_size but I'm not totally sure.

From the SPIR-V spec: NumWorkgroups -- Number of workgroups in GLCompute or Kernel Execution Models.

From the MSL spec: grid_size -- The maximum size of the grid over which compute threads that read per-thread stage-in data are launched. (There are various other MSL builtins which seem similar, so this may not be the correct equivalent.)

Is there an equivalent HLSL semantic or do we need to remove num_workgroups?

Metadata

Metadata

Labels

wgslWebGPU Shading Language Issues

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions