Fix WavePrefixCountBits() being off by one.
It was counting bits up to the current lane included, whereas the documentation says it should be excluded. This now matches dxc's behavior as well. Fix #2929
This commit is contained in:
parent
06ac141412
commit
f906b895ec
2 changed files with 5 additions and 5 deletions
|
|
@ -5430,7 +5430,7 @@ void HlslParseContext::decomposeIntrinsic(const TSourceLoc& loc, TIntermTyped*&
|
|||
}
|
||||
case EOpWavePrefixCountBits:
|
||||
{
|
||||
// Mapped to subgroupBallotInclusiveBitCount(subgroupBallot())
|
||||
// Mapped to subgroupBallotExclusiveBitCount(subgroupBallot())
|
||||
// builtin
|
||||
|
||||
// uvec4 type.
|
||||
|
|
@ -5444,7 +5444,7 @@ void HlslParseContext::decomposeIntrinsic(const TSourceLoc& loc, TIntermTyped*&
|
|||
TType uintType(EbtUint, EvqTemporary);
|
||||
|
||||
node = intermediate.addBuiltInFunctionCall(loc,
|
||||
EOpSubgroupBallotInclusiveBitCount, true, res, uintType);
|
||||
EOpSubgroupBallotExclusiveBitCount, true, res, uintType);
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue