GPU: Fix incorrect sign extension of positions
Fixes missing objects in Skullmonkeys (again).
This commit is contained in:
1 parent
a46d304d79
commit
fe25f005c2
3 files changed
+6
-6
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user