diff --git a/GPU/D3D11/GPU_D3D11.cpp b/GPU/D3D11/GPU_D3D11.cpp index 1f465fa54f..e533e524e8 100644 --- a/GPU/D3D11/GPU_D3D11.cpp +++ b/GPU/D3D11/GPU_D3D11.cpp @@ -157,23 +157,6 @@ void GPU_D3D11::InitClear() { } } -void GPU_D3D11::BeginHostFrame() { - GPUCommon::BeginHostFrame(); - UpdateCmdInfo(); - CheckResized(); -} - -void GPU_D3D11::ReapplyGfxState() { - GPUCommon::ReapplyGfxState(); - - // TODO: Dirty our caches for depth states etc -} - -void GPU_D3D11::EndHostFrame() { - // Probably not really necessary. - draw_->InvalidateCachedState(); -} - void GPU_D3D11::BeginFrame() { GPUCommon::BeginFrame(); diff --git a/GPU/D3D11/GPU_D3D11.h b/GPU/D3D11/GPU_D3D11.h index c0d969926a..0cba325618 100644 --- a/GPU/D3D11/GPU_D3D11.h +++ b/GPU/D3D11/GPU_D3D11.h @@ -40,7 +40,6 @@ public: void PreExecuteOp(u32 op, u32 diff) override; void ExecuteOp(u32 op, u32 diff) override; - void ReapplyGfxState() override; void GetStats(char *buffer, size_t bufsize) override; void ClearCacheNextFrame() override; void DeviceLost() override; // Only happens on Android. Drop all textures and shaders. @@ -54,9 +53,6 @@ public: std::vector DebugGetShaderIDs(DebugShaderType shader) override; std::string DebugGetShaderString(std::string id, DebugShaderType shader, DebugShaderStringType stringType) override; - void BeginHostFrame() override; - void EndHostFrame() override; - protected: void FinishDeferred() override; diff --git a/GPU/Directx9/GPU_DX9.cpp b/GPU/Directx9/GPU_DX9.cpp index e3aebbc796..e13a3b4f3d 100644 --- a/GPU/Directx9/GPU_DX9.cpp +++ b/GPU/Directx9/GPU_DX9.cpp @@ -147,12 +147,6 @@ void GPU_DX9::InitClear() { } } -void GPU_DX9::BeginHostFrame() { - GPUCommon::BeginHostFrame(); - UpdateCmdInfo(); - CheckResized(); -} - void GPU_DX9::ReapplyGfxState() { dxstate.Restore(); GPUCommon::ReapplyGfxState(); diff --git a/GPU/Directx9/GPU_DX9.h b/GPU/Directx9/GPU_DX9.h index c877c17482..0ec463e55e 100644 --- a/GPU/Directx9/GPU_DX9.h +++ b/GPU/Directx9/GPU_DX9.h @@ -53,8 +53,6 @@ public: std::vector DebugGetShaderIDs(DebugShaderType shader) override; std::string DebugGetShaderString(std::string id, DebugShaderType shader, DebugShaderStringType stringType) override; - void BeginHostFrame() override; - protected: void FinishDeferred() override; diff --git a/GPU/GLES/GPU_GLES.cpp b/GPU/GLES/GPU_GLES.cpp index f0a796f543..bee7a874f2 100644 --- a/GPU/GLES/GPU_GLES.cpp +++ b/GPU/GLES/GPU_GLES.cpp @@ -267,9 +267,6 @@ void GPU_GLES::InitClear() { void GPU_GLES::BeginHostFrame() { GPUCommon::BeginHostFrame(); - UpdateCmdInfo(); - CheckResized(); - drawEngine_.BeginFrame(); } diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index fc94f32ab7..e0aa841df9 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -482,10 +482,14 @@ void GPUCommon::BeginHostFrame() { // TODO: Assume config may have changed - maybe move to resize. gstate_c.Dirty(DIRTY_ALL); + + UpdateCmdInfo(); + CheckResized(); } void GPUCommon::EndHostFrame() { - + // Probably not necessary. + draw_->InvalidateCachedState(); } void GPUCommon::Reinitialize() { diff --git a/GPU/Vulkan/GPU_Vulkan.cpp b/GPU/Vulkan/GPU_Vulkan.cpp index 8f0b024a50..6ed3789152 100644 --- a/GPU/Vulkan/GPU_Vulkan.cpp +++ b/GPU/Vulkan/GPU_Vulkan.cpp @@ -272,11 +272,9 @@ u32 GPU_Vulkan::CheckGPUFeatures() const { } void GPU_Vulkan::BeginHostFrame() { + GPUCommon::BeginHostFrame(); + drawEngine_.BeginFrame(); - UpdateCmdInfo(); - - CheckResized(); - textureCacheVulkan_->StartFrame(); VulkanContext *vulkan = (VulkanContext *)draw_->GetNativeObject(Draw::NativeObject::CONTEXT); @@ -310,7 +308,7 @@ void GPU_Vulkan::EndHostFrame() { drawEngine_.EndFrame(); textureCacheVulkan_->EndFrame(); - draw_->InvalidateCachedState(); + GPUCommon::EndHostFrame(); } // Needs to be called on GPU thread, not reporting thread.