Skip to content

microsoft/compiler: A few subgroup/wave op fixes

Jesse Natalie requested to merge jenatali/mesa:subgroup-fixes into main
  1. Fix subgroup scan emulation on hardware. The previous implementation worked on WARP because WARP doesn't care whether the target lane is active, but hardware does. This gets the subgroup scan tests to pass on NVIDIA for me.
  2. Fix subgroup control extension. Since WARP's wave size is 4, this code was poorly tested before. DXIL.dll barfed trying to read the wave size tag, since it was expected to be an int in a metadata node, not just a raw int, and when that tag is present, the PSV data was expected to be updated.
  3. For SM6.8, the wave size tag is no longer expected, instead we expect a ranged tag with a min/max/preferred. Since NIR doesn't represent that (yet?) we'll always set all 3 of those to the same value.

After this I'm passing almost all of the subgroup tests on NVIDIA. The last failures seem like a bug on their end.

Merge request reports