mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-27 03:55:42 +00:00
Make a note when we need to reset the shader.
Hmm, not sure this is the cleanest way.
This commit is contained in:
parent
14c081904c
commit
29a9ff369e
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
@ -453,6 +453,8 @@ struct GPUStateCache
|
||||
bool textureSimpleAlpha;
|
||||
bool vertexFullAlpha;
|
||||
bool framebufChanged;
|
||||
// Doesn't need savestating.
|
||||
bool shaderChanged;
|
||||
|
||||
int skipDrawReason;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user