make it single threaded for now...

Hmm don't quite get it

idfk
This commit is contained in:
irisz64
2025-05-26 15:05:05 +02:00
parent 2152a73cce
commit 67c761d34b
9 changed files with 56 additions and 67 deletions

View File

@@ -1,8 +1,7 @@
#include <File.hpp>
#include <ParallelRDPWrapper.hpp>
#include <backend/Core.hpp>
#include <memory>
#include <rdp_device.hpp>
#include <core/mmio/VI.hpp>
#include <resources/vert.spv.h>
#include <resources/frag.spv.h>
#include <KaizenGui.hpp>
@@ -159,10 +158,7 @@ void ParallelRDP::DrawFullscreenTexturedQuad(Util::IntrusivePtr<Image> image,
cmd->draw(3, 1);
}
std::mutex coreM;
void ParallelRDP::UpdateScreen(Util::IntrusivePtr<Image> image) const {
std::lock_guard<std::mutex> coreLock(coreM);
wsi->begin_frame();
if (!image) {
@@ -188,16 +184,15 @@ void ParallelRDP::UpdateScreen(Util::IntrusivePtr<Image> image) const {
cmd->begin_render_pass(wsi->get_device().get_swapchain_render_pass(SwapchainRenderPass::ColorOnly));
DrawFullscreenTexturedQuad(image, cmd);
auto drawData = ImGui::GetDrawData();
if(drawData)
ImGui_ImplVulkan_RenderDrawData(drawData, cmd->get_command_buffer());
ImGui_ImplVulkan_RenderDrawData(ImGui::GetDrawData(), cmd->get_command_buffer());
cmd->end_render_pass();
wsi->get_device().submit(cmd);
wsi->end_frame();
}
void ParallelRDP::UpdateScreen(const n64::VI &vi, bool playing) const {
void ParallelRDP::UpdateScreen(n64::Core &core, bool playing) const {
if(playing) {
n64::VI& vi = core.GetVI();
command_processor->set_vi_register(VIRegister::Control, vi.status.raw);
command_processor->set_vi_register(VIRegister::Origin, vi.origin);
command_processor->set_vi_register(VIRegister::Width, vi.width);