From b8bb0894f109b8cfb0f915281a0906edf3c02737 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Mon, 5 Dec 2022 00:48:28 +0100 Subject: [PATCH] early-access version 3185 --- README.md | 2 +- src/core/hle/kernel/service_thread.cpp | 16 +++--- src/video_core/engines/maxwell_3d.cpp | 68 +++++++++++++++----------- 3 files changed, 48 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 71b5caada..44d5c62df 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 3184. +This is the source code for early-access 3185. ## Legal Notice diff --git a/src/core/hle/kernel/service_thread.cpp b/src/core/hle/kernel/service_thread.cpp index a0c0bab02..f759c8e9a 100755 --- a/src/core/hle/kernel/service_thread.cpp +++ b/src/core/hle/kernel/service_thread.cpp @@ -36,14 +36,14 @@ public: private: KernelCore& kernel; - - std::jthread m_host_thread; - std::mutex m_session_mutex; - std::map> m_sessions; - KEvent* m_wakeup_event; - KThread* m_thread; - std::atomic m_shutdown_requested; const std::string m_service_name; + + std::jthread m_host_thread{}; + std::mutex m_session_mutex{}; + std::map> m_sessions{}; + KEvent* m_wakeup_event{}; + KThread* m_thread{}; + std::atomic m_shutdown_requested{}; }; void ServiceThread::Impl::WaitAndProcessImpl() { @@ -183,7 +183,7 @@ ServiceThread::Impl::~Impl() { } ServiceThread::Impl::Impl(KernelCore& kernel_, const std::string& service_name) - : kernel{kernel_}, m_shutdown_requested{false}, m_service_name{service_name} { + : kernel{kernel_}, m_service_name{service_name} { // Initialize event. m_wakeup_event = KEvent::Create(kernel); m_wakeup_event->Initialize(nullptr); diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index 805bb5b0c..2175d5902 100755 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp @@ -493,41 +493,51 @@ void Maxwell3D::ProcessQueryGet() { void Maxwell3D::ProcessQueryCondition() { const GPUVAddr condition_address{regs.render_enable.Address()}; - switch (regs.render_enable.mode) { - case Regs::RenderEnable::Mode::True: { + switch (regs.render_enable_override) { + case Regs::RenderEnable::Override::AlwaysRender: execute_on = true; break; - } - case Regs::RenderEnable::Mode::False: { + case Regs::RenderEnable::Override::NeverRender: execute_on = false; break; - } - case Regs::RenderEnable::Mode::Conditional: { - Regs::ReportSemaphore::Compare cmp; - memory_manager.ReadBlock(condition_address, &cmp, sizeof(cmp)); - execute_on = cmp.initial_sequence != 0U && cmp.initial_mode != 0U; + case Regs::RenderEnable::Override::UseRenderEnable: + switch (regs.render_enable.mode) { + case Regs::RenderEnable::Mode::True: { + execute_on = true; + break; + } + case Regs::RenderEnable::Mode::False: { + execute_on = false; + break; + } + case Regs::RenderEnable::Mode::Conditional: { + Regs::ReportSemaphore::Compare cmp; + memory_manager.ReadBlock(condition_address, &cmp, sizeof(cmp)); + execute_on = cmp.initial_sequence != 0U && cmp.initial_mode != 0U; + break; + } + case Regs::RenderEnable::Mode::IfEqual: { + Regs::ReportSemaphore::Compare cmp; + memory_manager.ReadBlock(condition_address, &cmp, sizeof(cmp)); + execute_on = cmp.initial_sequence == cmp.current_sequence && + cmp.initial_mode == cmp.current_mode; + break; + } + case Regs::RenderEnable::Mode::IfNotEqual: { + Regs::ReportSemaphore::Compare cmp; + memory_manager.ReadBlock(condition_address, &cmp, sizeof(cmp)); + execute_on = cmp.initial_sequence != cmp.current_sequence || + cmp.initial_mode != cmp.current_mode; + break; + } + default: { + UNIMPLEMENTED_MSG("Uninplemented Condition Mode!"); + execute_on = true; + break; + } + } break; } - case Regs::RenderEnable::Mode::IfEqual: { - Regs::ReportSemaphore::Compare cmp; - memory_manager.ReadBlock(condition_address, &cmp, sizeof(cmp)); - execute_on = - cmp.initial_sequence == cmp.current_sequence && cmp.initial_mode == cmp.current_mode; - break; - } - case Regs::RenderEnable::Mode::IfNotEqual: { - Regs::ReportSemaphore::Compare cmp; - memory_manager.ReadBlock(condition_address, &cmp, sizeof(cmp)); - execute_on = - cmp.initial_sequence != cmp.current_sequence || cmp.initial_mode != cmp.current_mode; - break; - } - default: { - UNIMPLEMENTED_MSG("Uninplemented Condition Mode!"); - execute_on = true; - break; - } - } } void Maxwell3D::ProcessCounterReset() {