summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Lioncash2021-04-12 09:49:04 -0400
committerGravatar Lioncash2021-04-12 09:53:55 -0400
commit31932904c5f43f46e3dda21e948970418e509dbf (patch)
tree6212ea28ad174d3fee214e35c556a5c63d820b9f
parentMerge pull request #6135 from Morph1984/borderless-windowed-fullscreen (diff)
downloadyuzu-31932904c5f43f46e3dda21e948970418e509dbf.tar.gz
yuzu-31932904c5f43f46e3dda21e948970418e509dbf.tar.xz
yuzu-31932904c5f43f46e3dda21e948970418e509dbf.zip
engine_interface: Add missing virtual destructor
Eliminates a potential bug vector related to inheritance. Plus, we should generally be specifying the destructor as virtual within purely virtual interfaces to begin with.
Diffstat (limited to '')
-rw-r--r--src/video_core/engines/engine_interface.h3
-rw-r--r--src/video_core/engines/fermi_2d.h2
-rw-r--r--src/video_core/engines/kepler_memory.h2
-rw-r--r--src/video_core/engines/maxwell_dma.h2
4 files changed, 5 insertions, 4 deletions
diff --git a/src/video_core/engines/engine_interface.h b/src/video_core/engines/engine_interface.h
index 18a9db7e6..c7ffd68c5 100644
--- a/src/video_core/engines/engine_interface.h
+++ b/src/video_core/engines/engine_interface.h
@@ -4,13 +4,14 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <type_traits>
8#include "common/common_types.h" 7#include "common/common_types.h"
9 8
10namespace Tegra::Engines { 9namespace Tegra::Engines {
11 10
12class EngineInterface { 11class EngineInterface {
13public: 12public:
13 virtual ~EngineInterface() = default;
14
14 /// Write the value to the register identified by method. 15 /// Write the value to the register identified by method.
15 virtual void CallMethod(u32 method, u32 method_argument, bool is_last_call) = 0; 16 virtual void CallMethod(u32 method, u32 method_argument, bool is_last_call) = 0;
16 17
diff --git a/src/video_core/engines/fermi_2d.h b/src/video_core/engines/fermi_2d.h
index c808a577d..a4170ffff 100644
--- a/src/video_core/engines/fermi_2d.h
+++ b/src/video_core/engines/fermi_2d.h
@@ -35,7 +35,7 @@ namespace Tegra::Engines {
35class Fermi2D final : public EngineInterface { 35class Fermi2D final : public EngineInterface {
36public: 36public:
37 explicit Fermi2D(); 37 explicit Fermi2D();
38 ~Fermi2D(); 38 ~Fermi2D() override;
39 39
40 /// Binds a rasterizer to this engine. 40 /// Binds a rasterizer to this engine.
41 void BindRasterizer(VideoCore::RasterizerInterface* rasterizer); 41 void BindRasterizer(VideoCore::RasterizerInterface* rasterizer);
diff --git a/src/video_core/engines/kepler_memory.h b/src/video_core/engines/kepler_memory.h
index 19808a5c6..0d8ea09a9 100644
--- a/src/video_core/engines/kepler_memory.h
+++ b/src/video_core/engines/kepler_memory.h
@@ -36,7 +36,7 @@ namespace Tegra::Engines {
36class KeplerMemory final : public EngineInterface { 36class KeplerMemory final : public EngineInterface {
37public: 37public:
38 explicit KeplerMemory(Core::System& system_, MemoryManager& memory_manager); 38 explicit KeplerMemory(Core::System& system_, MemoryManager& memory_manager);
39 ~KeplerMemory(); 39 ~KeplerMemory() override;
40 40
41 /// Write the value to the register identified by method. 41 /// Write the value to the register identified by method.
42 void CallMethod(u32 method, u32 method_argument, bool is_last_call) override; 42 void CallMethod(u32 method, u32 method_argument, bool is_last_call) override;
diff --git a/src/video_core/engines/maxwell_dma.h b/src/video_core/engines/maxwell_dma.h
index 3c59eeb13..c77f02a22 100644
--- a/src/video_core/engines/maxwell_dma.h
+++ b/src/video_core/engines/maxwell_dma.h
@@ -188,7 +188,7 @@ public:
188 static_assert(sizeof(RemapConst) == 12); 188 static_assert(sizeof(RemapConst) == 12);
189 189
190 explicit MaxwellDMA(Core::System& system_, MemoryManager& memory_manager_); 190 explicit MaxwellDMA(Core::System& system_, MemoryManager& memory_manager_);
191 ~MaxwellDMA(); 191 ~MaxwellDMA() override;
192 192
193 /// Write the value to the register identified by method. 193 /// Write the value to the register identified by method.
194 void CallMethod(u32 method, u32 method_argument, bool is_last_call) override; 194 void CallMethod(u32 method, u32 method_argument, bool is_last_call) override;