shader/shift: Implement SHR wrapped and clamped variants
Nvidia defaults to wrapped shifts, but this is undefined behaviour on OpenGL's spec. Explicitly mask/clamp according to what the guest shader requires.
This commit is contained in:
parent
922c7f4e51
commit
77ef4fa907
2 changed files with 17 additions and 6 deletions
|
@ -674,6 +674,10 @@ union Instruction {
|
|||
BitField<48, 1, u64> is_signed;
|
||||
} shift;
|
||||
|
||||
union {
|
||||
BitField<39, 1, u64> wrap;
|
||||
} shr;
|
||||
|
||||
union {
|
||||
BitField<39, 5, u64> shift_amount;
|
||||
BitField<48, 1, u64> negate_b;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue