mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
mixed commit:
in D3D and Opengl: fixed one nasty bug in texture loading where if a dynamic texture keeps his format but the tlut format is changed, the try or reloading the texture in the same texture could cause a hang if the size of the resulting texture is different than the original (size in bytes) Applied a ugly temporal hack to the texture conversor to solve efb to ram misalignments and effect distortions. in D3D: Pseudo implementation of logic ops using basic blending: the first 8 operations are "good approximations", the remaining 8 are bullshit :) if someone have a better approximation to emulate this logic please let me know. please test if i don't break anything in the process and test Mario kart wee you will get a nice surprise.:) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4656 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -310,7 +310,7 @@ TextureMngr::TCacheEntry* TextureMngr::Load(int texstage, u32 address, int width
|
||||
// Let's reload the new texture data into the same texture,
|
||||
// instead of destroying it and having to create a new one.
|
||||
// Might speed up movie playback very, very slightly.
|
||||
if (width == entry.w && height == entry.h && tex_format == entry.fmt)
|
||||
if (width == entry.w && height == entry.h && (tex_format | (tlutfmt << 16)) == entry.fmt)
|
||||
{
|
||||
glBindTexture(entry.isRectangle ? GL_TEXTURE_RECTANGLE_ARB : GL_TEXTURE_2D, entry.texture);
|
||||
if (entry.mode.hex != tm0.hex)
|
||||
@ -463,7 +463,7 @@ TextureMngr::TCacheEntry* TextureMngr::Load(int texstage, u32 address, int width
|
||||
entry.frameCount = frameCount;
|
||||
entry.w = width;
|
||||
entry.h = height;
|
||||
entry.fmt = tex_format;
|
||||
entry.fmt = (tex_format | (tlutfmt << 16));
|
||||
entry.SetTextureParameters(tm0);
|
||||
|
||||
if (g_ActiveConfig.bDumpTextures) // dump texture to file
|
||||
@ -624,6 +624,8 @@ void TextureMngr::CopyRenderTargetToTexture(u32 address, bool bFromZBuffer, bool
|
||||
int w = (abs(source_rect.GetWidth()) >> bScaleByHalf);
|
||||
int h = (abs(source_rect.GetHeight()) >> bScaleByHalf);
|
||||
|
||||
|
||||
|
||||
GL_REPORT_ERRORD();
|
||||
|
||||
if (!bIsInit)
|
||||
|
Reference in New Issue
Block a user