Oops, broke the original texture cache :p fixed.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1299 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard 2008-11-26 00:00:23 +00:00
parent d0a48f654a
commit 5c49095069
2 changed files with 8 additions and 4 deletions

View File

@ -223,9 +223,13 @@ TextureMngr::TCacheEntry* TextureMngr::Load(int texstage, u32 address, int width
if (iter != textures.end()) {
TCacheEntry &entry = iter->second;
if (entry.isRenderTarget ||
(TexDecoder_GetSafeTextureHash(ptr, expandedWidth, height, format) == entry.hash &&
palhash == entry.paletteHash)) {
u32 hash_value;
if (g_Config.bSafeTextureCache)
hash_value = TexDecoder_GetSafeTextureHash(ptr, expandedWidth, height, format);
else
hash_value = ((u32 *)ptr)[entry.hashoffset];
if (entry.isRenderTarget || (hash_value == entry.hash && palhash == entry.paletteHash)) {
entry.frameCount = frameCount;
//glEnable(entry.isNonPow2?GL_TEXTURE_RECTANGLE_ARB:GL_TEXTURE_2D);
glBindTexture(entry.isNonPow2 ? GL_TEXTURE_RECTANGLE_ARB:GL_TEXTURE_2D, entry.texture);
@ -261,6 +265,7 @@ TextureMngr::TCacheEntry* TextureMngr::Load(int texstage, u32 address, int width
//Make an entry in the table
TCacheEntry& entry = textures[address];
entry.hashoffset = 0;
entry.paletteHash = palhash;
entry.oldpixel = ((u32 *)ptr)[entry.hashoffset];
if (g_Config.bSafeTextureCache) {

View File

@ -144,7 +144,6 @@ void VertexLoader::CompileVertexTranslator()
u8 *old_code_ptr = GetWritableCodePtr();
SetCodePtr(m_compiledCode);
ABI_EmitPrologue(4);
// Start loop here
const u8 *loop_start = GetCodePtr();