Permalink
Browse files

GLES device lost/store fixes

  • Loading branch information...
hrydgard committed Dec 9, 2017
1 parent e078619 commit b10b24feeaf29764e3d8c5ce551b6b23da11a2d4
Showing with 16 additions and 3 deletions.
  1. +8 −0 GPU/GLES/DrawEngineGLES.cpp
  2. +6 −2 GPU/GLES/DrawEngineGLES.h
  3. +2 −1 GPU/GLES/GPU_GLES.cpp
@@ -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 @@ class DrawEngineGLES : public DrawEngineCommon {
fragmentTestCache_ = testCache;
}
void RestoreVAO();
void InitDeviceObjects();
void DestroyDeviceObjects();
void DeviceLost();
void DeviceRestore();
void ClearTrackedVertexArrays() override;
void DecimateTrackedVertexArrays();
@@ -151,6 +152,9 @@ class DrawEngineGLES : public DrawEngineCommon {
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() {

0 comments on commit b10b24f

Please sign in to comment.