Fix imgui support + update README.md

This commit is contained in:
CocoSimone
2022-08-19 23:42:15 +02:00
parent 02636d38b6
commit 7962ae12e3
31 changed files with 53895 additions and 29 deletions

View File

@@ -165,7 +165,7 @@ void LoadParallelRDP(u8* rdram) {
aligned_rdram -= offset;
}
CommandProcessorFlags flags = 1 << 1; // TODO configurable scaling
CommandProcessorFlags flags = COMMAND_PROCESSOR_FLAG_UPSCALING_8X_BIT; // TODO configurable scaling
command_processor = new CommandProcessor(wsi->get_device(), reinterpret_cast<void *>(aligned_rdram),
offset, 8 * 1024 * 1024, 4 * 1024 * 1024, flags);
@@ -219,7 +219,7 @@ void DrawFullscreenTexturedQuad(Util::IntrusivePtr<Image> image, Util::Intrusive
cmd->draw(3, 1);
}
void UpdateScreen(Window& imguiWindow, Util::IntrusivePtr<Image> image) {
void UpdateScreen(n64::Core& core, Window& imguiWindow, Util::IntrusivePtr<Image> image) {
wsi->begin_frame();
if (!image) {
@@ -249,14 +249,14 @@ void UpdateScreen(Window& imguiWindow, Util::IntrusivePtr<Image> image) {
cmd->begin_render_pass(wsi->get_device().get_swapchain_render_pass(SwapchainRenderPass::ColorOnly));
DrawFullscreenTexturedQuad(image, cmd);
//ImGui_ImplVulkan_RenderDrawData(imguiWindow.Present(), cmd->get_command_buffer());
ImGui_ImplVulkan_RenderDrawData(imguiWindow.Present(core), cmd->get_command_buffer());
cmd->end_render_pass();
wsi->get_device().submit(cmd);
wsi->end_frame();
}
void UpdateScreenParallelRdp(Window& imguiWindow, n64::VI& vi) {
void UpdateScreenParallelRdp(n64::Core& core, Window& imguiWindow, n64::VI& vi) {
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);
@@ -282,12 +282,12 @@ void UpdateScreenParallelRdp(Window& imguiWindow, n64::VI& vi) {
opts.downscale_steps = true;
opts.crop_overscan_pixels = true;
Util::IntrusivePtr<Image> image = command_processor->scanout(opts);
UpdateScreen(imguiWindow, image);
UpdateScreen(core, imguiWindow, image);
command_processor->begin_frame_context();
}
void UpdateScreenParallelRdpNoGame(Window& imguiWindow) {
UpdateScreen(imguiWindow, static_cast<Util::IntrusivePtr<Image>>(nullptr));
void UpdateScreenParallelRdpNoGame(n64::Core& core, Window& imguiWindow) {
UpdateScreen(core, imguiWindow, static_cast<Util::IntrusivePtr<Image>>(nullptr));
}
void ParallelRdpEnqueueCommand(int command_length, u32* buffer) {