MCPcopy Create free account
hub / github.com/Inori/GPCS4 / submit

Method submit

GPCS4/Graphics/Violet/VltQueue.cpp:17–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15 }
16
17 void VltSubmissionQueue::submit(const VltSubmitInfo& submission)
18 {
19 auto& cmdList = submission.cmdList;
20 cmdList->submit(submission.waitSync, submission.wakeSync);
21
22 // TODO:
23 // Calling synchronize will block the CPU waiting for the submission done on GPU,
24 // thus will block the submit thread, slow down the submit speed and drop FPS.
25 // DXVK's solution is to use another thread dedicated for cmdlist submission
26 // thus overcome the performance problem,
27 // see https://github.com/doitsujin/dxvk/blob/master/src/dxvk/dxvk_queue.cpp
28 //
29 // This can be easily implemented, but for now, our bottleneck is not here obviously.
30 // So I keep it single threaded to make debugging easier.
31
32 // Wait for command buffer submit finish.
33 cmdList->synchronize();
34
35 // After submit done, reset cmdlist to release resource.
36 cmdList->reset();
37
38 // Finally, recycle the cmdlist for next use.
39 m_device->recycleCommandList(cmdList);
40 }
41
42 void VltSubmissionQueue::present(
43 const VltPresentInfo& presentInfo)

Callers 1

submitCommandListMethod · 0.45

Calls 3

recycleCommandListMethod · 0.80
synchronizeMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected