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?
Looking at the various builtins in WGSL, the conversion of most of them to HLSL and MSL are convertable. For the
num_workgroupsbuiltin, I don't see the equivalent in HLSL. In MSL, it looks like it would convert togrid_sizebut 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?