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().
This commit is contained in:
Zephyron 2024-12-31 22:43:09 +10:00
parent 5d529baafb
commit 6f160628c0
No known key found for this signature in database
GPG key ID: 8DA271B6A74353F1

View file

@ -34,7 +34,7 @@ void TranslatorVisitor::FSWZADD(u64 insn) {
IR::F32 result; IR::F32 result;
if (fswzadd.ndv != 0) { 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); result = ir.FSwizzleAdd(src_a, neg_recip, swizzle, fp_control);
} else { } else {
result = ir.FSwizzleAdd(src_a, src_b, swizzle, fp_control); result = ir.FSwizzleAdd(src_a, src_b, swizzle, fp_control);