summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2018-12-18 01:42:59 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-01-15 21:54:52 +0100
commit07944a23455379dcc590735f67d764304c457bd7 (patch)
tree9fc6c4595bc41e44498195b631e7c76648a3f48a /src
parentshader_decode: Implement I2I (diff)
downloadyuzu-07944a23455379dcc590735f67d764304c457bd7.tar
yuzu-07944a23455379dcc590735f67d764304c457bd7.tar.gz
yuzu-07944a23455379dcc590735f67d764304c457bd7.tar.bz2
yuzu-07944a23455379dcc590735f67d764304c457bd7.tar.lz
yuzu-07944a23455379dcc590735f67d764304c457bd7.tar.xz
yuzu-07944a23455379dcc590735f67d764304c457bd7.tar.zst
yuzu-07944a23455379dcc590735f67d764304c457bd7.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/shader/decode/conversion.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/video_core/shader/decode/conversion.cpp b/src/video_core/shader/decode/conversion.cpp
index b823b6119..ef46ab7a5 100644
--- a/src/video_core/shader/decode/conversion.cpp
+++ b/src/video_core/shader/decode/conversion.cpp
@@ -67,13 +67,21 @@ u32 ShaderIR::DecodeConversion(BasicBlock& bb, u32 pc) {
SetRegister(bb, instr.gpr0, value);
break;
}
- case OpCode::Id::F2F_R: {
+ case OpCode::Id::F2F_R:
+ case OpCode::Id::F2F_C: {
UNIMPLEMENTED_IF(instr.conversion.dest_size != Register::Size::Word);
UNIMPLEMENTED_IF(instr.conversion.src_size != Register::Size::Word);
UNIMPLEMENTED_IF_MSG(instr.generates_cc,
"Condition codes generation in F2F is not implemented");
- Node value = GetRegister(instr.gpr20);
+ Node value = [&]() {
+ if (instr.is_b_gpr) {
+ return GetRegister(instr.gpr20);
+ } else {
+ return GetConstBuffer(instr.cbuf34.index, instr.cbuf34.offset);
+ }
+ }();
+
value = GetOperandAbsNegFloat(value, instr.conversion.abs_a, instr.conversion.negate_a);
value = [&]() {