From 6f160628c084cbc30679af1142ec25e4b9e70bcf Mon Sep 17 00:00:00 2001 From: Zephyron Date: Tue, 31 Dec 2024 22:43:09 +1000 Subject: [PATCH] shader_recompiler: Fix method names in FSWZADD implementation Fixes incorrect method names in the floating point swizzled add implementation: - FNeg -> FPNeg - FDiv -> FPDiv - FImm32(1.0f) -> Imm32(ir.f32(1.0f)) These changes align with the correct IR emitter interface naming conventions, where floating-point operations use the 'FP' prefix and immediate values are properly constructed using f32(). --- .../maxwell/translate/impl/floating_point_swizzled_add.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shader_recompiler/frontend/maxwell/translate/impl/floating_point_swizzled_add.cpp b/src/shader_recompiler/frontend/maxwell/translate/impl/floating_point_swizzled_add.cpp index 5da3262f0..cb8971551 100644 --- a/src/shader_recompiler/frontend/maxwell/translate/impl/floating_point_swizzled_add.cpp +++ b/src/shader_recompiler/frontend/maxwell/translate/impl/floating_point_swizzled_add.cpp @@ -34,7 +34,7 @@ void TranslatorVisitor::FSWZADD(u64 insn) { IR::F32 result; if (fswzadd.ndv != 0) { - const IR::F32 neg_recip = ir.FNeg(ir.FDiv(ir.FImm32(1.0f), src_b)); + const IR::F32 neg_recip = ir.FPNeg(ir.FPDiv(ir.Imm32(ir.f32(1.0f)), src_b)); result = ir.FSwizzleAdd(src_a, neg_recip, swizzle, fp_control); } else { result = ir.FSwizzleAdd(src_a, src_b, swizzle, fp_control);