mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Destroy all FBOs/textures upon sceKernelLoadExec().
It can confuse our heuristics about size, attachment, memcpy, etc.
This commit is contained in:
parent
63bcb65d96
commit
d2d7d6e34b
3 changed files with 19 additions and 0 deletions
|
@ -503,6 +503,18 @@ void GLES_GPU::InitClear() {
|
|||
ScheduleEvent(GPU_EVENT_INIT_CLEAR);
|
||||
}
|
||||
|
||||
void GLES_GPU::Reinitialize() {
|
||||
GPUCommon::Reinitialize();
|
||||
ScheduleEvent(GPU_EVENT_REINITIALIZE);
|
||||
}
|
||||
|
||||
void GLES_GPU::ReinitializeInternal() {
|
||||
textureCache_.Clear(true);
|
||||
depalShaderCache_.Clear();
|
||||
framebufferManager_.DestroyAllFBOs();
|
||||
framebufferManager_.Resized();
|
||||
}
|
||||
|
||||
void GLES_GPU::InitClearInternal() {
|
||||
bool useNonBufferedRendering = g_Config.iRenderingMode == FB_NON_BUFFERED_MODE;
|
||||
if (useNonBufferedRendering) {
|
||||
|
@ -689,6 +701,10 @@ void GLES_GPU::ProcessEvent(GPUEvent ev) {
|
|||
PerformStencilUploadInternal(ev.fb_stencil_upload.dst, ev.fb_stencil_upload.size);
|
||||
break;
|
||||
|
||||
case GPU_EVENT_REINITIALIZE:
|
||||
ReinitializeInternal();
|
||||
break;
|
||||
|
||||
default:
|
||||
GPUCommon::ProcessEvent(ev);
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ public:
|
|||
GLES_GPU();
|
||||
~GLES_GPU();
|
||||
virtual void InitClear();
|
||||
virtual void Reinitialize();
|
||||
virtual void PreExecuteOp(u32 op, u32 diff);
|
||||
void ExecuteOpInternal(u32 op, u32 diff);
|
||||
virtual void ExecuteOp(u32 op, u32 diff);
|
||||
|
@ -161,6 +162,7 @@ private:
|
|||
void PerformMemorySetInternal(u32 dest, u8 v, int size);
|
||||
void PerformStencilUploadInternal(u32 dest, int size);
|
||||
void InvalidateCacheInternal(u32 addr, int size, GPUInvalidationType type);
|
||||
void ReinitializeInternal();
|
||||
inline void UpdateVsyncInterval(bool force);
|
||||
|
||||
static CommandInfo cmdInfo_[256];
|
||||
|
|
|
@ -166,6 +166,7 @@ enum GPUEventType {
|
|||
GPU_EVENT_FB_MEMCPY,
|
||||
GPU_EVENT_FB_MEMSET,
|
||||
GPU_EVENT_FB_STENCIL_UPLOAD,
|
||||
GPU_EVENT_REINITIALIZE,
|
||||
};
|
||||
|
||||
struct GPUEvent {
|
||||
|
|
Loading…
Add table
Reference in a new issue