1
0
Fork 0
forked from suyu/suyu

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.
This commit is contained in:
Lioncash 2019-03-07 15:57:08 -05:00
parent 3b63a46ca4
commit 24e2e601d5
3 changed files with 3 additions and 3 deletions

View file

@ -123,7 +123,7 @@ class GPU {
public:
explicit GPU(Core::System& system, VideoCore::RendererBase& renderer);
~GPU();
virtual ~GPU();
struct MethodCall {
u32 method{};

View file

@ -21,7 +21,7 @@ class ThreadManager;
class GPUAsynch : public Tegra::GPU {
public:
explicit GPUAsynch(Core::System& system, VideoCore::RendererBase& renderer);
~GPUAsynch();
~GPUAsynch() override;
void PushGPUEntries(Tegra::CommandList&& entries) override;
void SwapBuffers(

View file

@ -16,7 +16,7 @@ namespace VideoCommon {
class GPUSynch : public Tegra::GPU {
public:
explicit GPUSynch(Core::System& system, VideoCore::RendererBase& renderer);
~GPUSynch();
~GPUSynch() override;
void PushGPUEntries(Tegra::CommandList&& entries) override;
void SwapBuffers(