GPU: Fix incorrect sign extension of positions

Fixes missing objects in Skullmonkeys (again).
This commit is contained in:
Connor McLaughlin committed 2020-10-11 12:21:08 +10:00
1 parent a46d304d79
commit fe25f005c2
3 files changed
+6 -6

No files matched your search

+1 -1
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