summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2019-03-07 15:57:08 -0500
committerGravatar Lioncash2019-03-07 15:59:45 -0500
commit24e2e601d59a164aa86ed7a26f2054de09979b65 (patch)
tree9d31664bdb2fc088f8b0d9d1c575a75dc64734d6 /src
parentMerge pull request #2196 from DarkLordZach/web-applet-esc (diff)
downloadyuzu-24e2e601d59a164aa86ed7a26f2054de09979b65.tar.gz
yuzu-24e2e601d59a164aa86ed7a26f2054de09979b65.tar.xz
yuzu-24e2e601d59a164aa86ed7a26f2054de09979b65.zip
video_core/gpu: Make GPU's destructor virtual
Because of the recent separation of GPU functionality into sync/async variants, we need to mark the destructor virtual to provide proper destruction behavior, given we use the base class within the System class. Prior to this, it was undefined behavior whether or not the destructor in the derived classes would ever execute.
Diffstat (limited to 'src')
-rw-r--r--src/video_core/gpu.h2
-rw-r--r--src/video_core/gpu_asynch.h2
-rw-r--r--src/video_core/gpu_synch.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h
index 14a421cc1..56a203275 100644
--- a/src/video_core/gpu.h
+++ b/src/video_core/gpu.h
@@ -123,7 +123,7 @@ class GPU {
123public: 123public:
124 explicit GPU(Core::System& system, VideoCore::RendererBase& renderer); 124 explicit GPU(Core::System& system, VideoCore::RendererBase& renderer);
125 125
126 ~GPU(); 126 virtual ~GPU();
127 127
128 struct MethodCall { 128 struct MethodCall {
129 u32 method{}; 129 u32 method{};
diff --git a/src/video_core/gpu_asynch.h b/src/video_core/gpu_asynch.h
index 58046f3e9..e6a807aba 100644
--- a/src/video_core/gpu_asynch.h
+++ b/src/video_core/gpu_asynch.h
@@ -21,7 +21,7 @@ class ThreadManager;
21class GPUAsynch : public Tegra::GPU { 21class GPUAsynch : public Tegra::GPU {
22public: 22public:
23 explicit GPUAsynch(Core::System& system, VideoCore::RendererBase& renderer); 23 explicit GPUAsynch(Core::System& system, VideoCore::RendererBase& renderer);
24 ~GPUAsynch(); 24 ~GPUAsynch() override;
25 25
26 void PushGPUEntries(Tegra::CommandList&& entries) override; 26 void PushGPUEntries(Tegra::CommandList&& entries) override;
27 void SwapBuffers( 27 void SwapBuffers(
diff --git a/src/video_core/gpu_synch.h b/src/video_core/gpu_synch.h
index 658f683e2..7d5a241ff 100644
--- a/src/video_core/gpu_synch.h
+++ b/src/video_core/gpu_synch.h
@@ -16,7 +16,7 @@ namespace VideoCommon {
16class GPUSynch : public Tegra::GPU { 16class GPUSynch : public Tegra::GPU {
17public: 17public:
18 explicit GPUSynch(Core::System& system, VideoCore::RendererBase& renderer); 18 explicit GPUSynch(Core::System& system, VideoCore::RendererBase& renderer);
19 ~GPUSynch(); 19 ~GPUSynch() override;
20 20
21 void PushGPUEntries(Tegra::CommandList&& entries) override; 21 void PushGPUEntries(Tegra::CommandList&& entries) override;
22 void SwapBuffers( 22 void SwapBuffers(