mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 10:09:36 -06:00
Remove a bunch of freshly-obsolete code
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6148 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -218,7 +218,7 @@ void PixelShaderCache::Shutdown()
|
||||
bool PixelShaderCache::SetShader(bool dstAlpha)
|
||||
{
|
||||
PIXELSHADERUID uid;
|
||||
GetPixelShaderId(&uid, PixelShaderManager::GetTextureMask(), dstAlpha);
|
||||
GetPixelShaderId(&uid, dstAlpha);
|
||||
|
||||
// check if the shader is already set
|
||||
if (uid == last_pixel_shader_uid && PixelShaders[uid].frameCount == frameCount)
|
||||
@ -243,7 +243,7 @@ bool PixelShaderCache::SetShader(bool dstAlpha)
|
||||
}
|
||||
|
||||
// need to compile a new shader
|
||||
const char* code = GeneratePixelShaderCode(PixelShaderManager::GetTextureMask(), dstAlpha, API_D3D11);
|
||||
const char* code = GeneratePixelShaderCode(dstAlpha, API_D3D11);
|
||||
|
||||
D3DBlob* pbytecode;
|
||||
if (!D3D::CompilePixelShader(code, strlen(code), &pbytecode))
|
||||
|
@ -338,7 +338,6 @@ void Flush()
|
||||
}
|
||||
}
|
||||
}
|
||||
PixelShaderManager::SetTexturesUsed(0);
|
||||
|
||||
VertexShaderManager::SetConstants();
|
||||
PixelShaderManager::SetConstants();
|
||||
|
@ -277,7 +277,7 @@ void PixelShaderCache::Shutdown()
|
||||
bool PixelShaderCache::SetShader(bool dstAlpha)
|
||||
{
|
||||
PIXELSHADERUID uid;
|
||||
GetPixelShaderId(&uid, PixelShaderManager::GetTextureMask(), dstAlpha);
|
||||
GetPixelShaderId(&uid, dstAlpha);
|
||||
|
||||
// Is the shader already set?
|
||||
if (uid == last_pixel_shader_uid && PixelShaders[uid].frameCount == frameCount)
|
||||
@ -312,7 +312,7 @@ bool PixelShaderCache::SetShader(bool dstAlpha)
|
||||
}
|
||||
|
||||
// OK, need to generate and compile it.
|
||||
const char *code = GeneratePixelShaderCode(PixelShaderManager::GetTextureMask(), dstAlpha, API_D3D9);
|
||||
const char *code = GeneratePixelShaderCode(dstAlpha, API_D3D9);
|
||||
|
||||
u32 code_hash = HashAdler32((const u8 *)code, strlen(code));
|
||||
unique_shaders.insert(code_hash);
|
||||
|
@ -270,7 +270,6 @@ void Flush()
|
||||
|
||||
}
|
||||
}
|
||||
PixelShaderManager::SetTexturesUsed(0);
|
||||
|
||||
// set global constants
|
||||
VertexShaderManager::SetConstants();
|
||||
|
@ -164,7 +164,7 @@ FRAGMENTSHADER* PixelShaderCache::GetShader(bool dstAlphaEnable)
|
||||
{
|
||||
DVSTARTPROFILE();
|
||||
PIXELSHADERUID uid;
|
||||
GetPixelShaderId(&uid, PixelShaderManager::GetTextureMask(), dstAlphaEnable ? 1 : 0);
|
||||
GetPixelShaderId(&uid, dstAlphaEnable ? 1 : 0);
|
||||
if (uid == last_pixel_shader_uid && pshaders[uid].frameCount == frameCount)
|
||||
{
|
||||
return pShaderLast;
|
||||
@ -189,8 +189,7 @@ FRAGMENTSHADER* PixelShaderCache::GetShader(bool dstAlphaEnable)
|
||||
PSCacheEntry& newentry = pshaders[uid];
|
||||
newentry.frameCount = frameCount;
|
||||
pShaderLast = &newentry.shader;
|
||||
const char *code = GeneratePixelShaderCode(PixelShaderManager::GetTextureMask(),
|
||||
dstAlphaEnable,API_OPENGL);
|
||||
const char *code = GeneratePixelShaderCode(dstAlphaEnable,API_OPENGL);
|
||||
|
||||
#if defined(_DEBUG) || defined(DEBUGFAST)
|
||||
if (g_ActiveConfig.iLog & CONF_SAVESHADERS && code) {
|
||||
|
@ -191,21 +191,6 @@ static const GLenum glLogicOpCodes[16] = {
|
||||
GL_SET
|
||||
};
|
||||
|
||||
void SetDefaultRectTexParams()
|
||||
{
|
||||
// Set some standard texture filter modes.
|
||||
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
if (GL_REPORT_ERROR() != GL_NO_ERROR)
|
||||
{
|
||||
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP);
|
||||
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP);
|
||||
GL_REPORT_ERRORD();
|
||||
}
|
||||
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
}
|
||||
|
||||
#if defined HAVE_CG && HAVE_CG
|
||||
void HandleCgError(CGcontext ctx, CGerror err, void* appdata)
|
||||
{
|
||||
|
@ -260,7 +260,6 @@ void Flush()
|
||||
if (bpmem.tevind[i].IsActive() && bpmem.tevind[i].bt < bpmem.genMode.numindstages)
|
||||
usedtextures |= 1 << bpmem.tevindref.getTexMap(bpmem.tevind[i].bt);
|
||||
|
||||
u32 nonpow2tex = 0;
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
if (usedtextures & (1 << i))
|
||||
@ -290,8 +289,6 @@ void Flush()
|
||||
}
|
||||
}
|
||||
|
||||
PixelShaderManager::SetTexturesUsed(nonpow2tex);
|
||||
|
||||
FRAGMENTSHADER* ps = PixelShaderCache::GetShader(false);
|
||||
VERTEXSHADER* vs = VertexShaderCache::GetShader(g_nativeVertexFmt->m_components);
|
||||
|
||||
|
Reference in New Issue
Block a user