GPU: Fix incorrect sign extension of positions

Fixes missing objects in Skullmonkeys (again).
This commit is contained in:
Connor McLaughlin
2020-10-11 11:57:32 +10:00
parent a46d304d79
commit fe25f005c2
3 changed files with 6 additions and 6 deletions

View File

@ -119,7 +119,7 @@ struct BitField
}
else if constexpr (std::is_signed_v<DataType>)
{
constexpr int shift = 8 * sizeof(DataType) - BitCount + 1;
constexpr int shift = 8 * sizeof(DataType) - BitCount;
return (static_cast<DataType>(data >> BitIndex) << shift) >> shift;
}
else