From 75ccd9959ca7aa78b71fbb800ed2127d8613e9dc Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Tue, 5 Jan 2021 04:09:39 -0300 Subject: gpu: Report renderer errors with exceptions Instead of using a two step initialization to report errors, initialize the GPU renderer and rasterizer on the constructor and report errors through std::runtime_error. --- src/video_core/gpu_thread.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/video_core/gpu_thread.h') diff --git a/src/video_core/gpu_thread.h b/src/video_core/gpu_thread.h index 2775629e7..4cd951169 100644 --- a/src/video_core/gpu_thread.h +++ b/src/video_core/gpu_thread.h @@ -27,6 +27,7 @@ class System; } // namespace Core namespace VideoCore { +class RasterizerInterface; class RendererBase; } // namespace VideoCore @@ -151,11 +152,12 @@ private: /// Pushes a command to be executed by the GPU thread u64 PushCommand(CommandData&& command_data); - SynchState state; Core::System& system; - std::thread thread; - std::thread::id thread_id; const bool is_async; + VideoCore::RasterizerInterface* rasterizer = nullptr; + + SynchState state; + std::thread thread; }; } // namespace VideoCommon::GPUThread -- cgit v1.2.3