Init parallelrdp on EmuThread thread (so that the console doesnt get spammed with error logs)
This commit is contained in:
8
external/parallel-rdp/ParallelRDPWrapper.cpp
vendored
8
external/parallel-rdp/ParallelRDPWrapper.cpp
vendored
@@ -33,7 +33,9 @@ void ParallelRDP::LoadWSIPlatform(Vulkan::InstanceFactory* instanceFactory, std:
|
|||||||
windowInfo = std::move(newWindowInfo);
|
windowInfo = std::move(newWindowInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParallelRDP::Init(const u8* rdram) {
|
void ParallelRDP::Init(Vulkan::InstanceFactory* factory, std::unique_ptr<Vulkan::WSIPlatform>&& wsiPlatform, std::unique_ptr<WindowInfo>&& newWindowInfo, const u8* rdram) {
|
||||||
|
LoadWSIPlatform(factory, std::move(wsiPlatform), std::move(newWindowInfo));
|
||||||
|
|
||||||
ResourceLayout vertLayout;
|
ResourceLayout vertLayout;
|
||||||
ResourceLayout fragLayout;
|
ResourceLayout fragLayout;
|
||||||
|
|
||||||
@@ -78,10 +80,6 @@ void ParallelRDP::Init(const u8* rdram) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ParallelRDP::ParallelRDP(Vulkan::InstanceFactory* factory, std::unique_ptr<Vulkan::WSIPlatform>&& wsi_platform, std::unique_ptr<WindowInfo>&& newWindowInfo) {
|
|
||||||
LoadWSIPlatform(factory, std::move(wsi_platform), std::move(newWindowInfo));
|
|
||||||
}
|
|
||||||
|
|
||||||
void ParallelRDP::DrawFullscreenTexturedQuad(Util::IntrusivePtr<Image> image, Util::IntrusivePtr<CommandBuffer> cmd) {
|
void ParallelRDP::DrawFullscreenTexturedQuad(Util::IntrusivePtr<Image> image, Util::IntrusivePtr<CommandBuffer> cmd) {
|
||||||
cmd->set_texture(0, 0, image->get_view(), Vulkan::StockSampler::LinearClamp);
|
cmd->set_texture(0, 0, image->get_view(), Vulkan::StockSampler::LinearClamp);
|
||||||
cmd->set_program(fullscreen_quad_program);
|
cmd->set_program(fullscreen_quad_program);
|
||||||
|
|||||||
4
external/parallel-rdp/ParallelRDPWrapper.hpp
vendored
4
external/parallel-rdp/ParallelRDPWrapper.hpp
vendored
@@ -15,8 +15,8 @@ public:
|
|||||||
virtual ~WindowInfo() = default;
|
virtual ~WindowInfo() = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
void Init(const u8*);
|
void Init(Vulkan::InstanceFactory*, std::unique_ptr<Vulkan::WSIPlatform>&&, std::unique_ptr<WindowInfo>&&, const u8*);
|
||||||
ParallelRDP(Vulkan::InstanceFactory*, std::unique_ptr<Vulkan::WSIPlatform>&&, std::unique_ptr<WindowInfo>&&);
|
ParallelRDP() = default;
|
||||||
~ParallelRDP() {
|
~ParallelRDP() {
|
||||||
delete wsi;
|
delete wsi;
|
||||||
delete command_processor;
|
delete command_processor;
|
||||||
|
|||||||
@@ -4,9 +4,11 @@
|
|||||||
#include "Audio.hpp"
|
#include "Audio.hpp"
|
||||||
|
|
||||||
EmuThread::EmuThread(std::unique_ptr<QtInstanceFactory>&& instance_, std::unique_ptr<Vulkan::WSIPlatform>&& wsiPlatform_, std::unique_ptr<ParallelRDP::WindowInfo>&& windowInfo_, QObject* parent_object) noexcept
|
EmuThread::EmuThread(std::unique_ptr<QtInstanceFactory>&& instance_, std::unique_ptr<Vulkan::WSIPlatform>&& wsiPlatform_, std::unique_ptr<ParallelRDP::WindowInfo>&& windowInfo_, QObject* parent_object) noexcept
|
||||||
: QThread(parent_object), instance(std::move(instance_)), wsiPlatform(std::move(wsiPlatform_)), windowInfo(std::move(windowInfo_)), parallel(instance.get(), std::move(wsiPlatform), std::move(windowInfo)) {}
|
: QThread(parent_object), instance(std::move(instance_)), wsiPlatform(std::move(wsiPlatform_)), windowInfo(std::move(windowInfo_)) {}
|
||||||
|
|
||||||
[[noreturn]] void EmuThread::run() noexcept {
|
[[noreturn]] void EmuThread::run() noexcept {
|
||||||
|
parallel.Init(instance.get(), std::move(wsiPlatform), std::move(windowInfo), core->cpu->GetMem().GetRDRAMPtr());
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
if (!core->pause) {
|
if (!core->pause) {
|
||||||
core->Run(settings->getVolumeL(), settings->getVolumeR());
|
core->Run(settings->getVolumeL(), settings->getVolumeR());
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ KaizenQt::KaizenQt() noexcept : QWidget(nullptr) {
|
|||||||
std::move(mainWindow->view.vulkanWidget->windowInfo),
|
std::move(mainWindow->view.vulkanWidget->windowInfo),
|
||||||
mainWindow);
|
mainWindow);
|
||||||
emuThread->core = new n64::Core(emuThread->parallel);
|
emuThread->core = new n64::Core(emuThread->parallel);
|
||||||
emuThread->parallel.Init(emuThread->core->cpu->GetMem().GetRDRAMPtr());
|
|
||||||
|
|
||||||
ConnectMainWindowSignalsToSlots();
|
ConnectMainWindowSignalsToSlots();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user