diff options
| author | 2021-01-05 04:09:39 -0300 | |
|---|---|---|
| committer | 2021-02-13 02:16:19 -0300 | |
| commit | 75ccd9959ca7aa78b71fbb800ed2127d8613e9dc (patch) | |
| tree | 3b9b5c0779cff69ef135bb3394ae70a0d3a9804d /src/video_core/gpu_thread.h | |
| parent | tests/buffer_base: Add cached CPU writes tests (diff) | |
| download | yuzu-75ccd9959ca7aa78b71fbb800ed2127d8613e9dc.tar.gz yuzu-75ccd9959ca7aa78b71fbb800ed2127d8613e9dc.tar.xz yuzu-75ccd9959ca7aa78b71fbb800ed2127d8613e9dc.zip | |
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.
Diffstat (limited to 'src/video_core/gpu_thread.h')
| -rw-r--r-- | src/video_core/gpu_thread.h | 8 |
1 files changed, 5 insertions, 3 deletions
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; | |||
| 27 | } // namespace Core | 27 | } // namespace Core |
| 28 | 28 | ||
| 29 | namespace VideoCore { | 29 | namespace VideoCore { |
| 30 | class RasterizerInterface; | ||
| 30 | class RendererBase; | 31 | class RendererBase; |
| 31 | } // namespace VideoCore | 32 | } // namespace VideoCore |
| 32 | 33 | ||
| @@ -151,11 +152,12 @@ private: | |||
| 151 | /// Pushes a command to be executed by the GPU thread | 152 | /// Pushes a command to be executed by the GPU thread |
| 152 | u64 PushCommand(CommandData&& command_data); | 153 | u64 PushCommand(CommandData&& command_data); |
| 153 | 154 | ||
| 154 | SynchState state; | ||
| 155 | Core::System& system; | 155 | Core::System& system; |
| 156 | std::thread thread; | ||
| 157 | std::thread::id thread_id; | ||
| 158 | const bool is_async; | 156 | const bool is_async; |
| 157 | VideoCore::RasterizerInterface* rasterizer = nullptr; | ||
| 158 | |||
| 159 | SynchState state; | ||
| 160 | std::thread thread; | ||
| 159 | }; | 161 | }; |
| 160 | 162 | ||
| 161 | } // namespace VideoCommon::GPUThread | 163 | } // namespace VideoCommon::GPUThread |