Add manual emulation of IsHelperLane() on SM <6.6

* The default dxc emulation does not work when running in MSAA as our shader
  runs at sample rate and SV_Coverage can be non-zero even for helper lanes.
This commit is contained in:
baldurk
2026-05-05 18:00:28 +01:00
parent 13b6d9a854
commit c79d939445
@@ -964,7 +964,13 @@ void ExtractInputs(Inputs IN
quadLaneIndex = (2u * (uint(debug_pixelPos.y) & 1u)) + (uint(debug_pixelPos.x) & 1u);
derivValid = ddx(debug_pixelPos.x);
#if __SHADER_TARGET_MINOR >= 6
// IsHelperLane() can fail when software emulated on MSAA, because it checks SV_Coverage != 0
isHelper = IsHelperLane() ? 1 : 0;
#else
isHelper = (coverage & (1u << sample)) == 0;
#endif
helperBallot = WaveActiveBallot(isHelper != 0);