Move presentation to separate thread/improve sync (#303)

* video_out: Move presentation to separate thread

* liverpool: Better sync for CPU flips

* driver: Make flip blocking

* videoout: Proper flip rate and vblank management

* config: Add vblank divider option

* clang format

* videoout: added `sceVideoOutWaitVblank`

* clang format

* vk_scheduler: Silly merge conflict

* externals: Add renderdoc API

* clang format

* reuse

* rdoc: manual capture trigger

* clang fmt

---------

Co-authored-by: psucien <168137814+psucien@users.noreply.github.com>
This commit is contained in:
TheTurtle 2024-07-28 16:54:09 +03:00 committed by GitHub
parent 361412031c
commit 0d6edaa0a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 1259 additions and 224 deletions

View file

@ -11,6 +11,7 @@
#include "core/libraries/pad/pad.h"
#include "input/controller.h"
#include "sdl_window.h"
#include "video_core/renderdoc.h"
#ifdef __APPLE__
#include <SDL3/SDL_metal.h>
@ -72,7 +73,7 @@ void WindowSDL::waitEvent() {
// Called on main thread
SDL_Event event;
if (!SDL_PollEvent(&event)) {
if (!SDL_WaitEvent(&event)) {
return;
}
@ -180,6 +181,11 @@ void WindowSDL::onKeyPress(const SDL_Event* event) {
ax = Input::GetAxis(-0x80, 0x80, axisvalue);
break;
case SDLK_S:
if (event->key.mod == SDL_KMOD_LCTRL) {
// Trigger rdoc capture
VideoCore::TriggerCapture();
break;
}
axis = Input::Axis::LeftY;
if (event->type == SDL_EVENT_KEY_DOWN) {
axisvalue += 127;