gpu: Refactor command and swap buffers interface for asynch.

This commit is contained in:
bunnei 2019-01-21 15:18:09 -05:00
parent 4483089d70
commit ac51d048a9
5 changed files with 26 additions and 17 deletions

View file

@ -65,6 +65,16 @@ const DmaPusher& GPU::DmaPusher() const {
return *dma_pusher;
}
void GPU::PushGPUEntries(Tegra::CommandList&& entries) {
dma_pusher->Push(std::move(entries));
dma_pusher->DispatchCalls();
}
void GPU::SwapBuffers(
std::optional<std::reference_wrapper<const Tegra::FramebufferConfig>> framebuffer) {
renderer.SwapBuffers(std::move(framebuffer));
}
u32 RenderTargetBytesPerPixel(RenderTargetFormat format) {
ASSERT(format != RenderTargetFormat::NONE);