mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2024-12-28 02:26:07 +00:00
resource_tracking_pass: Fix type handling of sample offsets. (#1337)
This commit is contained in:
parent
21eb175aa1
commit
2f80d7565d
|
@ -507,7 +507,11 @@ void PatchImageSampleInstruction(IR::Block& block, IR::Inst& inst, Info& info,
|
|||
}
|
||||
|
||||
// The offsets are six-bit signed integers: X=[5:0], Y=[13:8], and Z=[21:16].
|
||||
const IR::Value arg = get_addr_reg(addr_reg++);
|
||||
IR::Value arg = get_addr_reg(addr_reg++);
|
||||
if (const IR::Inst* offset_inst = arg.TryInstRecursive()) {
|
||||
ASSERT(offset_inst->GetOpcode() == IR::Opcode::BitCastF32U32);
|
||||
arg = offset_inst->Arg(0);
|
||||
}
|
||||
|
||||
const auto read = [&](u32 off) -> IR::U32 {
|
||||
if (arg.IsImmediate()) {
|
||||
|
|
Loading…
Reference in a new issue