Put infrastructure in place so that other plugins may support dual-source blending.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6296 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Nolan Check
2010-10-21 05:22:18 +00:00
parent 0b7e90f0de
commit 95cfca08e2
14 changed files with 105 additions and 51 deletions

View File

@ -184,11 +184,11 @@ void PixelShaderCache::Shutdown()
PixelShaders.clear();
}
FRAGMENTSHADER* PixelShaderCache::SetShader(bool dstAlpha,u32 components)
FRAGMENTSHADER* PixelShaderCache::SetShader(DSTALPHA_MODE dstAlphaMode, u32 components)
{
DVSTARTPROFILE();
PIXELSHADERUID uid;
GetPixelShaderId(&uid, dstAlpha ? 1 : 0);
GetPixelShaderId(&uid, dstAlphaMode);
// Check if the shader is already set
if (uid == last_pixel_shader_uid && PixelShaders[uid].frameCount == frameCount)
@ -216,7 +216,7 @@ FRAGMENTSHADER* PixelShaderCache::SetShader(bool dstAlpha,u32 components)
PSCacheEntry& newentry = PixelShaders[uid];
newentry.frameCount = frameCount;
pShaderLast = &newentry.shader;
const char *code = GeneratePixelShaderCode(dstAlpha,API_OPENGL,components);
const char *code = GeneratePixelShaderCode(dstAlphaMode, API_OPENGL, components);
#if defined(_DEBUG) || defined(DEBUGFAST)
if (g_ActiveConfig.iLog & CONF_SAVESHADERS && code) {