mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-09-21 20:01:40 +02:00
Fix some shader problems caused by my previous commits to reduce API calls (back screen after a while in Zelda WW intro, maybe also in other games).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4283 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
20922cf3f0
commit
f7e15ec7f2
4 changed files with 4 additions and 4 deletions
|
@ -89,7 +89,7 @@ bool PixelShaderCache::SetShader(bool dstAlpha)
|
||||||
|
|
||||||
PIXELSHADERUID uid;
|
PIXELSHADERUID uid;
|
||||||
GetPixelShaderId(uid, PixelShaderManager::GetTextureMask(), dstAlpha);
|
GetPixelShaderId(uid, PixelShaderManager::GetTextureMask(), dstAlpha);
|
||||||
if (uid == last_pixel_shader_uid)
|
if (uid == last_pixel_shader_uid && PixelShaders[uid].frameCount == frameCount)
|
||||||
{
|
{
|
||||||
PSCache::const_iterator iter = PixelShaders.find(uid);
|
PSCache::const_iterator iter = PixelShaders.find(uid);
|
||||||
if (iter != PixelShaders.end() && iter->second.shader)
|
if (iter != PixelShaders.end() && iter->second.shader)
|
||||||
|
|
|
@ -120,7 +120,7 @@ bool VertexShaderCache::SetShader(u32 components)
|
||||||
|
|
||||||
VERTEXSHADERUID uid;
|
VERTEXSHADERUID uid;
|
||||||
GetVertexShaderId(uid, components);
|
GetVertexShaderId(uid, components);
|
||||||
if (uid == last_vertex_shader_uid)
|
if (uid == last_vertex_shader_uid && vshaders[uid].frameCount == frameCount)
|
||||||
{
|
{
|
||||||
if (vshaders[uid].shader)
|
if (vshaders[uid].shader)
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -169,7 +169,7 @@ FRAGMENTSHADER* PixelShaderCache::GetShader(bool dstAlphaEnable)
|
||||||
PIXELSHADERUID uid;
|
PIXELSHADERUID uid;
|
||||||
u32 dstAlpha = dstAlphaEnable ? 1 : 0;
|
u32 dstAlpha = dstAlphaEnable ? 1 : 0;
|
||||||
GetPixelShaderId(uid, PixelShaderManager::GetTextureMask(), dstAlpha);
|
GetPixelShaderId(uid, PixelShaderManager::GetTextureMask(), dstAlpha);
|
||||||
if (uid == last_pixel_shader_uid)
|
if (uid == last_pixel_shader_uid && pshaders[uid].frameCount == frameCount)
|
||||||
{
|
{
|
||||||
return pShaderLast;
|
return pShaderLast;
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,7 +117,7 @@ VERTEXSHADER* VertexShaderCache::GetShader(u32 components)
|
||||||
VERTEXSHADERUID uid;
|
VERTEXSHADERUID uid;
|
||||||
GetVertexShaderId(uid, components);
|
GetVertexShaderId(uid, components);
|
||||||
|
|
||||||
if (uid == last_vertex_shader_uid)
|
if (uid == last_vertex_shader_uid && vshaders[uid].frameCount == frameCount)
|
||||||
{
|
{
|
||||||
return pShaderLast;
|
return pShaderLast;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue