Safer and simpler alternative to cbfa4bf.

See #16483
This commit is contained in:
Henrik Rydgård 2022-12-03 11:14:08 +01:00
parent 02b8bf33fb
commit 92df6b832c
10 changed files with 6 additions and 20 deletions

View File

@ -223,10 +223,6 @@ void GPU_D3D11::GetStats(char *buffer, size_t bufsize) {
);
}
void GPU_D3D11::ClearCacheNextFrame() {
textureCacheD3D11_->ClearNextFrame();
}
void GPU_D3D11::ClearShaderCache() {
shaderManagerD3D11_->ClearShaders();
drawEngine_.ClearInputLayoutMap();

View File

@ -41,7 +41,6 @@ public:
void ExecuteOp(u32 op, u32 diff) override;
void GetStats(char *buffer, size_t bufsize) override;
void ClearCacheNextFrame() override;
void DeviceLost() override; // Only happens on Android. Drop all textures and shaders.
void DeviceRestore() override;

View File

@ -220,10 +220,6 @@ void GPU_DX9::GetStats(char *buffer, size_t bufsize) {
);
}
void GPU_DX9::ClearCacheNextFrame() {
textureCacheDX9_->ClearNextFrame();
}
void GPU_DX9::ClearShaderCache() {
shaderManagerDX9_->ClearCache(true);
}

View File

@ -41,7 +41,6 @@ public:
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.
void DeviceRestore() override;

View File

@ -362,10 +362,6 @@ void GPU_GLES::GetStats(char *buffer, size_t bufsize) {
);
}
void GPU_GLES::ClearCacheNextFrame() {
textureCacheGL_->ClearNextFrame();
}
void GPU_GLES::ClearShaderCache() {
shaderManagerGL_->ClearCache(true);
}

View File

@ -49,7 +49,6 @@ public:
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.
void DeviceRestore() override;

View File

@ -627,6 +627,10 @@ void GPUCommon::NotifyDisplayResized() {
displayResized_ = true;
}
void GPUCommon::ClearCacheNextFrame() {
textureCache_->ClearNextFrame();
}
// Called once per frame. Might also get called during the pause screen
// if "transparent".
void GPUCommon::CheckConfigChanged() {

View File

@ -267,6 +267,8 @@ protected:
void DeviceLost() override;
void DeviceRestore() override;
void ClearCacheNextFrame();
virtual void CheckRenderResized();
// Add additional common features dependent on other features, which may be backend-determined.

View File

@ -528,10 +528,6 @@ void GPU_Vulkan::GetStats(char *buffer, size_t bufsize) {
);
}
void GPU_Vulkan::ClearCacheNextFrame() {
textureCacheVulkan_->ClearNextFrame();
}
void GPU_Vulkan::ClearShaderCache() {
// TODO
}

View File

@ -51,7 +51,6 @@ public:
void ExecuteOp(u32 op, u32 diff) override;
void GetStats(char *buffer, size_t bufsize) override;
void ClearCacheNextFrame() override;
void DeviceLost() override; // Only happens on Android. Drop all textures and shaders.
void DeviceRestore() override;