From e580299467a8aa7f56e8b66a63112dc06c870b15 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Thu, 22 Jul 2021 04:29:00 -0300 Subject: [PATCH] shader: Fix rescaling pass --- src/shader_recompiler/ir_opt/rescaling_pass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shader_recompiler/ir_opt/rescaling_pass.cpp b/src/shader_recompiler/ir_opt/rescaling_pass.cpp index 293593c78..f8d04b6e3 100644 --- a/src/shader_recompiler/ir_opt/rescaling_pass.cpp +++ b/src/shader_recompiler/ir_opt/rescaling_pass.cpp @@ -17,7 +17,7 @@ namespace { void PatchFragCoord(IR::Block& block, IR::Inst& inst) { IR::IREmitter ir{block, IR::Block::InstructionList::s_iterator_to(inst)}; const IR::F32 down_factor{ir.ResolutionDownFactor()}; - const IR::F32 frag_coord{&inst}; + const IR::F32 frag_coord{ir.GetAttribute(inst.Arg(0).Attribute())}; const IR::F32 downscaled_frag_coord{ir.FPMul(frag_coord, down_factor)}; inst.ReplaceUsesWith(downscaled_frag_coord); }