hot-fix: handle ASC ring wrap

This commit is contained in:
psucien 2024-12-28 11:44:11 +01:00
parent 122fe22a32
commit 04933ac863

View file

@ -513,10 +513,14 @@ void PS4_SYSV_ABI sceGnmDingDong(u32 gnm_vqid, u32 next_offs_dw) {
auto vqid = gnm_vqid - 1; auto vqid = gnm_vqid - 1;
auto& asc_queue = liverpool->asc_queues[{vqid}]; auto& asc_queue = liverpool->asc_queues[{vqid}];
const auto& offs_dw = asc_next_offs_dw[vqid]; auto& offs_dw = asc_next_offs_dw[vqid];
if (next_offs_dw < offs_dw) { if (next_offs_dw < offs_dw && next_offs_dw != 0) {
ASSERT_MSG(next_offs_dw == 0, "ACB submission is split at the end of ring buffer"); // For cases if a submission is split at the end of the ring buffer, we need to submit it in
// two parts to handle the wrap
liverpool->SubmitAsc(gnm_vqid, {reinterpret_cast<const u32*>(asc_queue.map_addr) + offs_dw,
asc_queue.ring_size_dw - offs_dw});
offs_dw = 0;
} }
const auto* acb_ptr = reinterpret_cast<const u32*>(asc_queue.map_addr) + offs_dw; const auto* acb_ptr = reinterpret_cast<const u32*>(asc_queue.map_addr) + offs_dw;