summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend
diff options
context:
space:
mode:
authorGravatar FernandoS272021-03-21 18:23:16 +0100
committerGravatar ameerj2021-07-22 21:51:24 -0400
commit56be556eee65335cdc896bb1eb47999d04850b77 (patch)
treed20b37eeea5381d6051e00d3a7cd770b68798d60 /src/shader_recompiler/frontend
parentshader: Implement F2F (diff)
downloadyuzu-56be556eee65335cdc896bb1eb47999d04850b77.tar.gz
yuzu-56be556eee65335cdc896bb1eb47999d04850b77.tar.xz
yuzu-56be556eee65335cdc896bb1eb47999d04850b77.zip
shader: Implement FADD32I
Diffstat (limited to 'src/shader_recompiler/frontend')
-rw-r--r--src/shader_recompiler/frontend/maxwell/translate/impl/floating_point_add.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/translate/impl/floating_point_add.cpp b/src/shader_recompiler/frontend/maxwell/translate/impl/floating_point_add.cpp
index 76a807d4e..487198aa6 100644
--- a/src/shader_recompiler/frontend/maxwell/translate/impl/floating_point_add.cpp
+++ b/src/shader_recompiler/frontend/maxwell/translate/impl/floating_point_add.cpp
@@ -64,8 +64,21 @@ void TranslatorVisitor::FADD_imm(u64 insn) {
64 FADD(*this, insn, GetFloatImm20(insn)); 64 FADD(*this, insn, GetFloatImm20(insn));
65} 65}
66 66
67void TranslatorVisitor::FADD32I(u64) { 67void TranslatorVisitor::FADD32I(u64 insn) {
68 throw NotImplementedException("FADD32I"); 68 union {
69 u64 raw;
70 BitField<55, 1, u64> ftz;
71 BitField<53, 1, u64> neg_b;
72 BitField<54, 1, u64> abs_a;
73 BitField<52, 1, u64> cc;
74 BitField<56, 1, u64> neg_a;
75 BitField<57, 1, u64> abs_b;
76 BitField<50, 1, u64> sat;
77 } const fadd32i{insn};
78
79 FADD(*this, insn, fadd32i.sat != 0, fadd32i.cc != 0, fadd32i.ftz != 0, FpRounding::RN,
80 GetFloatImm32(insn), fadd32i.abs_a != 0, fadd32i.neg_a != 0, fadd32i.abs_b != 0,
81 fadd32i.neg_b != 0);
69} 82}
70 83
71} // namespace Shader::Maxwell 84} // namespace Shader::Maxwell