diff options
| author | 2021-07-22 04:29:00 -0300 | |
|---|---|---|
| committer | 2021-11-16 22:11:28 +0100 | |
| commit | e580299467a8aa7f56e8b66a63112dc06c870b15 (patch) | |
| tree | 70209a958349fabec583d92b5a30476853634188 | |
| parent | gl_texture_cache: Simplify rescaling (diff) | |
| download | yuzu-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.cpp | 2 |
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 { | |||
| 17 | void PatchFragCoord(IR::Block& block, IR::Inst& inst) { | 17 | void 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 | } |