video_core: a fix for multi submits processing (temporary code)

This commit is contained in:
psucien 2024-05-22 20:22:42 +02:00
parent 66b695f5c7
commit 62fd72009b
2 changed files with 13 additions and 5 deletions

View File

@ -1429,9 +1429,12 @@ s32 PS4_SYSV_ABI sceGnmSubmitCommandBuffers(u32 count, const u32* dcb_gpu_addrs[
for (auto cbpair = 0u; cbpair < count; ++cbpair) { for (auto cbpair = 0u; cbpair < count; ++cbpair) {
const auto* ccb = ccb_gpu_addrs ? ccb_gpu_addrs[cbpair] : nullptr; const auto* ccb = ccb_gpu_addrs ? ccb_gpu_addrs[cbpair] : nullptr;
const auto ccb_size = ccb_sizes_in_bytes ? ccb_sizes_in_bytes[cbpair] : 0; const auto ccb_size_in_bytes = ccb_sizes_in_bytes ? ccb_sizes_in_bytes[cbpair] : 0;
liverpool->SubmitGfx({dcb_gpu_addrs[cbpair], dcb_sizes_in_bytes[cbpair]}, {ccb, ccb_size}); const auto dcb_size_dw = dcb_sizes_in_bytes[cbpair] >> 2;
const auto ccb_size_dw = ccb_size_in_bytes >> 2;
liverpool->SubmitGfx({dcb_gpu_addrs[cbpair], dcb_size_dw}, {ccb, ccb_size_dw});
} }
return ORBIS_OK; return ORBIS_OK;

View File

@ -34,10 +34,15 @@ void Liverpool::Process(std::stop_token stoken) {
gfx_ring.pop(); gfx_ring.pop();
} }
ASSERT_MSG(dcb.size() != 0, "Empty command list received"); ASSERT_MSG(!dcb.empty(), "Empty command list received");
ProcessCmdList(dcb.data(), dcb.size()); ProcessCmdList(dcb.data(), dcb.size_bytes());
cv_complete.notify_all(); {
std::unique_lock lock{m_ring_access};
if (gfx_ring.empty()) {
cv_complete.notify_all();
}
}
} }
} }