summaryrefslogtreecommitdiffstats
path: root/src/video_core/shader/decode/bfi.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2018-12-26 06:58:47 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-01-15 21:54:53 +0100
commit2faad9bf23dbcedc80dca7ed9ad4b81c0416dd5e (patch)
tree3faa264db225f2ae09ccf417fd962eddb40c2235 /src/video_core/shader/decode/bfi.cpp
parentshader_ir: Remove Ipa primitive (diff)
downloadyuzu-2faad9bf23dbcedc80dca7ed9ad4b81c0416dd5e.tar
yuzu-2faad9bf23dbcedc80dca7ed9ad4b81c0416dd5e.tar.gz
yuzu-2faad9bf23dbcedc80dca7ed9ad4b81c0416dd5e.tar.bz2
yuzu-2faad9bf23dbcedc80dca7ed9ad4b81c0416dd5e.tar.lz
yuzu-2faad9bf23dbcedc80dca7ed9ad4b81c0416dd5e.tar.xz
yuzu-2faad9bf23dbcedc80dca7ed9ad4b81c0416dd5e.tar.zst
yuzu-2faad9bf23dbcedc80dca7ed9ad4b81c0416dd5e.zip
Diffstat (limited to 'src/video_core/shader/decode/bfi.cpp')
-rw-r--r--src/video_core/shader/decode/bfi.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/video_core/shader/decode/bfi.cpp b/src/video_core/shader/decode/bfi.cpp
index a750aca30..b0d8d9eba 100644
--- a/src/video_core/shader/decode/bfi.cpp
+++ b/src/video_core/shader/decode/bfi.cpp
@@ -28,13 +28,8 @@ u32 ShaderIR::DecodeBfi(BasicBlock& bb, u32 pc) {
}
}();
const Node insert = GetRegister(instr.gpr8);
-
- const Node offset =
- Operation(OperationCode::UBitwiseAnd, NO_PRECISE, packed_shift, Immediate(0xff));
-
- Node bits =
- Operation(OperationCode::ULogicalShiftRight, NO_PRECISE, packed_shift, Immediate(8));
- bits = Operation(OperationCode::UBitwiseAnd, NO_PRECISE, bits, Immediate(0xff));
+ const Node offset = BitfieldExtract(packed_shift, 0, 8);
+ const Node bits = BitfieldExtract(packed_shift, 8, 8);
const Node value =
Operation(OperationCode::UBitfieldInsert, PRECISE, base, insert, offset, bits);