mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
Centralize ClearCacheNextFrame
This commit is contained in:
parent
cf44adbf5d
commit
cbfa4bfc8e
@ -1200,6 +1200,7 @@ bool TextureCacheCommon::GetCurrentFramebufferTextureDebug(GPUDebugBuffer &buffe
|
||||
}
|
||||
|
||||
void TextureCacheCommon::NotifyConfigChanged() {
|
||||
clearCacheNextFrame_ = true;
|
||||
int scaleFactor = g_Config.iTexScalingLevel;
|
||||
|
||||
if (!gstate_c.Use(GPU_USE_TEXTURE_NPOT)) {
|
||||
@ -2554,10 +2555,6 @@ void TextureCacheCommon::InvalidateAll(GPUInvalidationType /*unused*/) {
|
||||
}
|
||||
}
|
||||
|
||||
void TextureCacheCommon::ClearNextFrame() {
|
||||
clearCacheNextFrame_ = true;
|
||||
}
|
||||
|
||||
std::string AttachCandidate::ToString() const {
|
||||
return StringFromFormat("[%s seq:%d rel:%d C:%08x/%d(%s) Z:%08x/%d X:%d Y:%d reint: %s]",
|
||||
this->channel == RASTER_COLOR ? "COLOR" : "DEPTH",
|
||||
|
@ -323,7 +323,6 @@ public:
|
||||
bool SetOffsetTexture(u32 yOffset);
|
||||
void Invalidate(u32 addr, int size, GPUInvalidationType type);
|
||||
void InvalidateAll(GPUInvalidationType type);
|
||||
void ClearNextFrame();
|
||||
|
||||
TextureShaderCache *GetTextureShaderCache() { return textureShaderCache_; }
|
||||
|
||||
|
@ -228,10 +228,6 @@ void GPU_D3D11::GetStats(char *buffer, size_t bufsize) {
|
||||
);
|
||||
}
|
||||
|
||||
void GPU_D3D11::ClearCacheNextFrame() {
|
||||
textureCacheD3D11_->ClearNextFrame();
|
||||
}
|
||||
|
||||
void GPU_D3D11::ClearShaderCache() {
|
||||
shaderManagerD3D11_->ClearShaders();
|
||||
drawEngine_.ClearInputLayoutMap();
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -353,10 +353,6 @@ void GPU_GLES::GetStats(char *buffer, size_t bufsize) {
|
||||
);
|
||||
}
|
||||
|
||||
void GPU_GLES::ClearCacheNextFrame() {
|
||||
textureCacheGL_->ClearNextFrame();
|
||||
}
|
||||
|
||||
void GPU_GLES::ClearShaderCache() {
|
||||
shaderManagerGL_->ClearCache(true);
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -629,7 +629,6 @@ void GPUCommon::NotifyDisplayResized() {
|
||||
// if "transparent".
|
||||
void GPUCommon::CheckConfigChanged() {
|
||||
if (configChanged_) {
|
||||
ClearCacheNextFrame();
|
||||
gstate_c.useFlags = CheckGPUFeatures();
|
||||
drawEngineCommon_->NotifyConfigChanged();
|
||||
shaderManager_->DirtyLastShader(); // Don't think this is needed, at all.
|
||||
|
@ -244,9 +244,6 @@ public:
|
||||
virtual bool PerformWriteColorFromMemory(u32 dest, int size) = 0;
|
||||
virtual bool PerformWriteStencilFromMemory(u32 dest, int size, WriteStencil flags = WriteStencil::NEEDS_CLEAR) = 0;
|
||||
|
||||
// Will cause the texture cache to be cleared at the start of the next frame.
|
||||
virtual void ClearCacheNextFrame() = 0;
|
||||
|
||||
// Internal hack to avoid interrupts from "PPGe" drawing (utility UI, etc)
|
||||
virtual void EnableInterrupts(bool enable) = 0;
|
||||
|
||||
|
@ -144,7 +144,6 @@ public:
|
||||
bool PerformReadbackToMemory(u32 dest, int size) override;
|
||||
bool PerformWriteColorFromMemory(u32 dest, int size) override;
|
||||
bool PerformWriteStencilFromMemory(u32 dest, int size, WriteStencil flags) override;
|
||||
void ClearCacheNextFrame() override {}
|
||||
|
||||
void DeviceLost() override;
|
||||
void DeviceRestore() override;
|
||||
|
@ -513,10 +513,6 @@ void GPU_Vulkan::GetStats(char *buffer, size_t bufsize) {
|
||||
);
|
||||
}
|
||||
|
||||
void GPU_Vulkan::ClearCacheNextFrame() {
|
||||
textureCacheVulkan_->ClearNextFrame();
|
||||
}
|
||||
|
||||
void GPU_Vulkan::ClearShaderCache() {
|
||||
// TODO
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user