video_core, core: Move pixel download to its own thread

This uses the mailbox model to move pixel downloading to its own thread, eliminating Nvidia's warnings and (possibly) making use of GPU copy engine.

To achieve this, we created a new mailbox type that is different from the presentation mailbox in that it never discards a rendered frame.

Also, I tweaked the projection matrix thing so that it can just draw the frame upside down instead of having the CPU flip it.
This commit is contained in:
zhupengfei 2020-01-28 21:57:30 +08:00
parent 5b54a99f96
commit 06a0d86e9c
No known key found for this signature in database
GPG key ID: DD129E108BD09378
7 changed files with 324 additions and 169 deletions

View file

@ -308,6 +308,12 @@ System::ResultStatus System::Init(Frontend::EmuWindow& emu_window, u32 system_mo
Service::Init(*this);
GDBStub::Init();
#ifdef ENABLE_FFMPEG_VIDEO_DUMPER
video_dumper = std::make_unique<VideoDumper::FFmpegBackend>();
#else
video_dumper = std::make_unique<VideoDumper::NullBackend>();
#endif
VideoCore::ResultStatus result = VideoCore::Init(emu_window, *memory);
if (result != VideoCore::ResultStatus::Success) {
switch (result) {
@ -320,12 +326,6 @@ System::ResultStatus System::Init(Frontend::EmuWindow& emu_window, u32 system_mo
}
}
#ifdef ENABLE_FFMPEG_VIDEO_DUMPER
video_dumper = std::make_unique<VideoDumper::FFmpegBackend>();
#else
video_dumper = std::make_unique<VideoDumper::NullBackend>();
#endif
LOG_DEBUG(Core, "Initialized OK");
initalized = true;