mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
GLES device lost/store fixes
This commit is contained in:
parent
e07861991b
commit
b10b24feea
3 changed files with 16 additions and 3 deletions
|
@ -156,6 +156,14 @@ void DrawEngineGLES::RestoreVAO() {
|
|||
}
|
||||
}
|
||||
|
||||
void DrawEngineGLES::DeviceLost() {
|
||||
DestroyDeviceObjects();
|
||||
}
|
||||
|
||||
void DrawEngineGLES::DeviceRestore() {
|
||||
InitDeviceObjects();
|
||||
}
|
||||
|
||||
void DrawEngineGLES::InitDeviceObjects() {
|
||||
if (bufferNameCache_.empty()) {
|
||||
bufferNameCache_.resize(VERTEXCACHE_NAME_CACHE_SIZE);
|
||||
|
|
|
@ -119,8 +119,9 @@ public:
|
|||
fragmentTestCache_ = testCache;
|
||||
}
|
||||
void RestoreVAO();
|
||||
void InitDeviceObjects();
|
||||
void DestroyDeviceObjects();
|
||||
|
||||
void DeviceLost();
|
||||
void DeviceRestore();
|
||||
|
||||
void ClearTrackedVertexArrays() override;
|
||||
void DecimateTrackedVertexArrays();
|
||||
|
@ -151,6 +152,9 @@ public:
|
|||
void DecimateBuffers();
|
||||
|
||||
private:
|
||||
void InitDeviceObjects();
|
||||
void DestroyDeviceObjects();
|
||||
|
||||
void DoFlush();
|
||||
void ApplyDrawState(int prim);
|
||||
void ApplyDrawStateLate();
|
||||
|
|
|
@ -391,7 +391,7 @@ void GPU_GLES::DeviceLost() {
|
|||
textureCacheGL_->Clear(false);
|
||||
fragmentTestCache_.Clear(false);
|
||||
depalShaderCache_.Clear();
|
||||
drawEngine_.ClearTrackedVertexArrays();
|
||||
drawEngine_.DeviceLost();
|
||||
framebufferManagerGL_->DeviceLost();
|
||||
}
|
||||
|
||||
|
@ -404,6 +404,7 @@ void GPU_GLES::DeviceRestore() {
|
|||
|
||||
textureCacheGL_->DeviceRestore(draw_);
|
||||
framebufferManagerGL_->DeviceRestore(draw_);
|
||||
drawEngine_.DeviceRestore();
|
||||
}
|
||||
|
||||
void GPU_GLES::Reinitialize() {
|
||||
|
|
Loading…
Add table
Reference in a new issue