aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/shader/decode/arithmetic_integer.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2018-12-26 02:58:47 -0300
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-01-15 17:54:53 -0300
commit2faad9bf23dbcedc80dca7ed9ad4b81c0416dd5e (patch)
tree3faa264db225f2ae09ccf417fd962eddb40c2235 /src/video_core/shader/decode/arithmetic_integer.cpp
parent52223313b10af4c76b516d6ead247a1a201a71d8 (diff)
shader_decode: Use BitfieldExtract instead of shift + and
Diffstat (limited to 'src/video_core/shader/decode/arithmetic_integer.cpp')
-rw-r--r--src/video_core/shader/decode/arithmetic_integer.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/video_core/shader/decode/arithmetic_integer.cpp b/src/video_core/shader/decode/arithmetic_integer.cpp
index 271ce205b..931e0fa1d 100644
--- a/src/video_core/shader/decode/arithmetic_integer.cpp
+++ b/src/video_core/shader/decode/arithmetic_integer.cpp
@@ -57,10 +57,9 @@ u32 ShaderIR::DecodeArithmeticInteger(BasicBlock& bb, u32 pc) {
case IAdd3Height::None:
return value;
case IAdd3Height::LowerHalfWord:
- return Operation(OperationCode::IBitwiseAnd, NO_PRECISE, value, Immediate(0xffff));
+ return BitfieldExtract(value, 0, 16);
case IAdd3Height::UpperHalfWord:
- return Operation(OperationCode::ILogicalShiftRight, NO_PRECISE, value,
- Immediate(16));
+ return BitfieldExtract(value, 16, 16);
default:
UNIMPLEMENTED_MSG("Unhandled IADD3 height: {}", static_cast<u32>(height));
return Immediate(0);