Skip to content

[wgsl] num_workgroups translation for MSL and HLSL #920

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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