summaryrefslogtreecommitdiff
path: root/src/shader_recompiler
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2021-07-22 04:29:00 -0300
committerGravatar Fernando Sahmkow2021-11-16 22:11:28 +0100
commite580299467a8aa7f56e8b66a63112dc06c870b15 (patch)
tree70209a958349fabec583d92b5a30476853634188 /src/shader_recompiler
parentgl_texture_cache: Simplify rescaling (diff)
downloadyuzu-e580299467a8aa7f56e8b66a63112dc06c870b15.tar.gz
yuzu-e580299467a8aa7f56e8b66a63112dc06c870b15.tar.xz
yuzu-e580299467a8aa7f56e8b66a63112dc06c870b15.zip
shader: Fix rescaling pass
Diffstat (limited to '')
-rw-r--r--src/shader_recompiler/ir_opt/rescaling_pass.cpp2
1 files changed, 1 insertions, 1 deletions
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 {
17void PatchFragCoord(IR::Block& block, IR::Inst& inst) { 17void PatchFragCoord(IR::Block& block, IR::Inst& inst) {
18 IR::IREmitter ir{block, IR::Block::InstructionList::s_iterator_to(inst)}; 18 IR::IREmitter ir{block, IR::Block::InstructionList::s_iterator_to(inst)};
19 const IR::F32 down_factor{ir.ResolutionDownFactor()}; 19 const IR::F32 down_factor{ir.ResolutionDownFactor()};
20 const IR::F32 frag_coord{&inst}; 20 const IR::F32 frag_coord{ir.GetAttribute(inst.Arg(0).Attribute())};
21 const IR::F32 downscaled_frag_coord{ir.FPMul(frag_coord, down_factor)}; 21 const IR::F32 downscaled_frag_coord{ir.FPMul(frag_coord, down_factor)};
22 inst.ReplaceUsesWith(downscaled_frag_coord); 22 inst.ReplaceUsesWith(downscaled_frag_coord);
23} 23}