Some minor "centralization"

This commit is contained in:
Henrik Rydgård 2022-11-21 17:55:30 +01:00
parent d73196c7d6
commit ce5a1b8b7e
7 changed files with 8 additions and 38 deletions

View File

@ -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();

View File

@ -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<std::string> 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;

View File

@ -147,12 +147,6 @@ void GPU_DX9::InitClear() {
}
}
void GPU_DX9::BeginHostFrame() {
GPUCommon::BeginHostFrame();
UpdateCmdInfo();
CheckResized();
}
void GPU_DX9::ReapplyGfxState() {
dxstate.Restore();
GPUCommon::ReapplyGfxState();

View File

@ -53,8 +53,6 @@ public:
std::vector<std::string> DebugGetShaderIDs(DebugShaderType shader) override;
std::string DebugGetShaderString(std::string id, DebugShaderType shader, DebugShaderStringType stringType) override;
void BeginHostFrame() override;
protected:
void FinishDeferred() override;

View File

@ -267,9 +267,6 @@ void GPU_GLES::InitClear() {
void GPU_GLES::BeginHostFrame() {
GPUCommon::BeginHostFrame();
UpdateCmdInfo();
CheckResized();
drawEngine_.BeginFrame();
}

View File

@ -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() {

View File

@ -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.