Skip to content

Commit

Permalink
shader_recompiler: Fix last image sample address parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
squidbus committed Oct 10, 2024
1 parent 0a5f469 commit 0d45875
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/shader_recompiler/ir/passes/resource_tracking_pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ void PatchImageSampleInstruction(IR::Block& block, IR::Inst& inst, Info& info,
IR::Inst* body1 = inst.Arg(1).InstRecursive();
IR::Inst* body2 = inst.Arg(2).InstRecursive();
IR::Inst* body3 = inst.Arg(3).InstRecursive();
IR::Inst* body4 = inst.Arg(4).InstRecursive();
IR::F32 body4 = IR::F32{inst.Arg(4)};
const auto get_addr_reg = [&](u32 index) -> IR::F32 {
if (index <= 3) {
return IR::F32{body1->Arg(index)};
Expand All @@ -493,7 +493,7 @@ void PatchImageSampleInstruction(IR::Block& block, IR::Inst& inst, Info& info,
return IR::F32{body3->Arg(index - 8)};
}
if (index == 12) {
return IR::F32{body4};
return body4;
}
UNREACHABLE();
};
Expand Down

0 comments on commit 0d45875

Please sign in to comment.