mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 07:39:45 -06:00
Roll back r3833 for render targets but keep it for static textures. Most mirroring issues are OK and we shouldn't see any slowdown.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3844 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -67,7 +67,7 @@ void PixelShaderCache::SetShader()
|
||||
DVSTARTPROFILE();
|
||||
|
||||
PIXELSHADERUID uid;
|
||||
GetPixelShaderId(uid, false);
|
||||
GetPixelShaderId(uid, PixelShaderManager::GetTextureMask(), false);
|
||||
|
||||
PSCache::iterator iter;
|
||||
iter = PixelShaders.find(uid);
|
||||
@ -85,7 +85,7 @@ void PixelShaderCache::SetShader()
|
||||
}
|
||||
|
||||
bool HLSL = false;
|
||||
const char *code = GeneratePixelShader(false, HLSL);
|
||||
const char *code = GeneratePixelShader(PixelShaderManager::GetTextureMask(), false, HLSL);
|
||||
LPDIRECT3DPIXELSHADER9 shader = HLSL ? D3D::CompilePixelShader(code, (int)strlen(code), false) : CompileCgShader(code);
|
||||
if (shader)
|
||||
{
|
||||
|
@ -198,6 +198,7 @@ void Flush()
|
||||
}
|
||||
}
|
||||
|
||||
u32 nonpow2tex = 0;
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
if (usedtextures & (1 << i)) {
|
||||
@ -210,14 +211,25 @@ void Flush()
|
||||
|
||||
if (tentry) {
|
||||
// texture loaded fine, set dims for pixel shader
|
||||
if (tentry->isNonPow2) {
|
||||
PixelShaderManager::SetTexDims(i, tentry->w, tentry->h, tentry->mode.wrap_s, tentry->mode.wrap_t);
|
||||
nonpow2tex |= 1 << i;
|
||||
if (tentry->mode.wrap_s > 0) nonpow2tex |= 1 << (8 + i);
|
||||
if (tentry->mode.wrap_t > 0) nonpow2tex |= 1 << (16 + i);
|
||||
}
|
||||
// if texture is power of two, set to ones (since don't need scaling)
|
||||
// (the above seems to have changed - we set the width and height here too.
|
||||
PixelShaderManager::SetTexDims(i, tentry->w, tentry->h, 0, 0);
|
||||
else
|
||||
{
|
||||
PixelShaderManager::SetTexDims(i, tentry->w, tentry->h, 0, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
ERROR_LOG(VIDEO, "error loading texture");
|
||||
}
|
||||
}
|
||||
PixelShaderManager::SetTexturesUsed(nonpow2tex);
|
||||
|
||||
|
||||
int numVertices = indexGen.GetNumVerts();
|
||||
if (numVertices)
|
||||
|
Reference in New Issue
Block a user