mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2024-12-29 11:06:07 +00:00
recompiler: fix how srt pass handles step rate sharps in special case (#1587)
This commit is contained in:
parent
add6eeeb8a
commit
fde1726af5
|
@ -148,17 +148,21 @@ static void GenerateSrtProgram(Info& info, PassInfo& pass_info) {
|
||||||
// Special case for V# step rate buffers in fetch shader
|
// Special case for V# step rate buffers in fetch shader
|
||||||
for (const auto [sgpr_base, dword_offset, num_dwords] : info.srt_info.srt_reservations) {
|
for (const auto [sgpr_base, dword_offset, num_dwords] : info.srt_info.srt_reservations) {
|
||||||
// get pointer to V#
|
// get pointer to V#
|
||||||
c.mov(r10d, ptr[rdi + (sgpr_base << 2)]);
|
if (sgpr_base != IR::NumScalarRegs) {
|
||||||
|
PushPtr(c, sgpr_base);
|
||||||
|
}
|
||||||
u32 src_off = dword_offset << 2;
|
u32 src_off = dword_offset << 2;
|
||||||
|
|
||||||
for (auto j = 0; j < num_dwords; j++) {
|
for (auto j = 0; j < num_dwords; j++) {
|
||||||
c.mov(r11d, ptr[r10d + src_off]);
|
c.mov(r11d, ptr[rdi + src_off]);
|
||||||
c.mov(ptr[rsi + (pass_info.dst_off_dw << 2)], r11d);
|
c.mov(ptr[rsi + (pass_info.dst_off_dw << 2)], r11d);
|
||||||
|
|
||||||
src_off += 4;
|
src_off += 4;
|
||||||
++pass_info.dst_off_dw;
|
++pass_info.dst_off_dw;
|
||||||
}
|
}
|
||||||
|
if (sgpr_base != IR::NumScalarRegs) {
|
||||||
|
PopPtr(c);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERT(pass_info.dst_off_dw == info.srt_info.flattened_bufsize_dw);
|
ASSERT(pass_info.dst_off_dw == info.srt_info.flattened_bufsize_dw);
|
||||||
|
|
Loading…
Reference in a new issue