mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-24 12:25:00 +00:00
Use pair of spans instead of references in copy command buffers function
This commit is contained in:
parent
87ccfdfbbd
commit
dfb30ea955
2 changed files with 9 additions and 5 deletions
|
@ -569,7 +569,8 @@ Liverpool::Task Liverpool::ProcessCompute(std::span<const u32> acb, int vqid) {
|
|||
TracyFiberLeave;
|
||||
}
|
||||
|
||||
void Liverpool::CopyCmdBuffers(std::span<const u32>& dcb, std::span<const u32>& ccb) {
|
||||
std::pair<std::span<const u32>, std::span<const u32>> Liverpool::CopyCmdBuffers(
|
||||
std::span<const u32> dcb, std::span<const u32> ccb) {
|
||||
auto& queue = mapped_queues[GfxQueueId];
|
||||
|
||||
queue.dcb_buffer.resize(
|
||||
|
@ -594,13 +595,15 @@ void Liverpool::CopyCmdBuffers(std::span<const u32>& dcb, std::span<const u32>&
|
|||
ccb = std::span<const u32>{queue.ccb_buffer.begin() + prev_ccb_buffer_offset,
|
||||
queue.ccb_buffer.begin() + queue.ccb_buffer_offset};
|
||||
}
|
||||
|
||||
return std::make_pair(dcb, ccb);
|
||||
}
|
||||
|
||||
void Liverpool::SubmitGfx(std::span<const u32> dcb, std::span<const u32> ccb) {
|
||||
auto& queue = mapped_queues[GfxQueueId];
|
||||
|
||||
if (Config::copyGPUCmdBuffers()) {
|
||||
CopyCmdBuffers(dcb, ccb);
|
||||
std::tie(dcb, ccb) = CopyCmdBuffers(dcb, ccb);
|
||||
}
|
||||
|
||||
auto task = ProcessGraphics(dcb, ccb);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue