From 29a9ff369ef06ea1a5a441584fdf8769ef4ae9b5 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 26 May 2014 21:39:59 -0700 Subject: [PATCH] Make a note when we need to reset the shader. Hmm, not sure this is the cleanest way. --- Core/HW/MediaEngine.cpp | 2 +- GPU/GLES/ShaderManager.cpp | 3 ++- GPU/GLES/TextureCache.cpp | 1 + GPU/GPUState.h | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Core/HW/MediaEngine.cpp b/Core/HW/MediaEngine.cpp index 3929adddf4..57a9ec4dc2 100644 --- a/Core/HW/MediaEngine.cpp +++ b/Core/HW/MediaEngine.cpp @@ -739,7 +739,7 @@ int MediaEngine::writeVideoImageWithRange(u32 bufferPtr, int frameWidth, int vid break; default: - ERROR_LOG(ME, "Unsupported video pixel format %d", videoPixelMode); + ERROR_LOG_REPORT(ME, "Unsupported video pixel format %d", videoPixelMode); break; } return videoImageSize; diff --git a/GPU/GLES/ShaderManager.cpp b/GPU/GLES/ShaderManager.cpp index 8872960182..3d1ecf7db8 100644 --- a/GPU/GLES/ShaderManager.cpp +++ b/GPU/GLES/ShaderManager.cpp @@ -684,10 +684,11 @@ Shader *ShaderManager::ApplyVertexShader(int prim, u32 vertType) { LinkedShader *ShaderManager::ApplyFragmentShader(Shader *vs, int prim, u32 vertType) { FragmentShaderID FSID; ComputeFragmentShaderID(&FSID); - if (lastVShaderSame_ && FSID == lastFSID_) { + if (lastVShaderSame_ && FSID == lastFSID_ && !gstate_c.shaderChanged) { lastShader_->UpdateUniforms(vertType); return lastShader_; } + gstate_c.shaderChanged = false; lastFSID_ = FSID; diff --git a/GPU/GLES/TextureCache.cpp b/GPU/GLES/TextureCache.cpp index 63d8c3368d..427025b67a 100644 --- a/GPU/GLES/TextureCache.cpp +++ b/GPU/GLES/TextureCache.cpp @@ -925,6 +925,7 @@ void TextureCache::SetTextureFramebuffer(TexCacheEntry *entry) { static const GLubyte indices[4] = { 0, 1, 3, 2 }; glUseProgram(program); + gstate_c.shaderChanged = true; glBindBuffer(GL_ARRAY_BUFFER, 0); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); diff --git a/GPU/GPUState.h b/GPU/GPUState.h index b8e79488e7..ca8b668ca1 100644 --- a/GPU/GPUState.h +++ b/GPU/GPUState.h @@ -453,6 +453,8 @@ struct GPUStateCache bool textureSimpleAlpha; bool vertexFullAlpha; bool framebufChanged; + // Doesn't need savestating. + bool shaderChanged; int skipDrawReason;