summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureCacheBase.cpp
AgeCommit message (Collapse)Author
2015-06-24Quick fix for an invalid iteratormimimi085181
2015-06-05Search the texture cache for small textures by address and hashmimimi085181
This fixes issue 6563: https://code.google.com/p/dolphin-emu/issues/detail?id=6563 This PR adds a 2nd map to texture cache, which uses the hash as key. Cache entries from this new map are used only if the address matches or if the texture was fully hashed. This restriction avoids false positive cache hits. This results in a possible situation where safe texture cache accuracy could be faster than the fast one. Small textures means up to 1KB for fast texture cache accuracy, 4KB for medium, and all textures for safe accuracy. Since this adds a small overhead to all texture cache handling, some regression testing would be nice. Games, which use a lot of textures the same time, should be affected the most.
2015-05-26Merge pull request #2162 from degasus/prefetch_texMarkus Wick
CustomTexture: prefetch all available textures
2015-05-25Set copyright year to when a file was createdTillmann Karras
2015-05-25Update license headers to GPLv2+Tillmann Karras
2015-05-16CustomTexture: prefetch all available texturesdegasus
2015-05-02VideoCommon: Implement EFB dumping for both backends.Jules Blok
2015-03-02TextureCache: load all mipmap levels from custom texturesdegasus
This drops the "feature" to load level 0 from the custom texture and all other levels from the native one if the size matches. But in my opinion, when a custom texture only provide one level, no more should be used at all.
2015-03-01TexCache: increase TEXTURE_KILL_THRESHOLDdegasus
Xenoblade uses more than 40 textures alternately per frame for eg water effects. So don't try to drop them as aggressive.
2015-02-25Merge pull request #2058 from Stevoisiak/Codemaid-Cleanup-Take2Lioncash
Basic Formatting/Whitespace Cleanup
2015-02-25Formatting/Whitespace CleanupStevoisiak
Various fixes to formatting and whitespace
2015-02-24VideoCommon: rename efb2tex and efb2ramdegasus
2015-02-24Fix some -Wsign-compare warningsTillmann Karras
2015-02-19Explicitly set up AllocateTexture configuration for palette conversion.magumagu
No functional change.
2015-02-19Remove TextureAddress struct.magumagu
2015-02-19Decode EFB copies used as paletted textures.magumagu
A number of games make an EFB copy in I4/I8 format, then use it as a texture in C4/C8 format. Detect when this happens, and decode the copy on the GPU using the specified palette. This has a few advantages: it allows using EFB2Tex for a few more games, it, it preserves the resolution of scaled EFB copies, and it's probably a bit faster. D3D only at the moment, but porting to OpenGL should be straightforward..
2015-02-18Allow multiple texture cache entries for textures at the same addressmimimi085181
This is the same trick which is used for Metroid's fonts/texts, but for all textures. If 2 different textures at the same address are loaded during the same frame, create a 2nd entry instead of overwriting the existing one. If the entry was overwritten in this case, there wouldn't be any caching, which results in a big performance drop. The restriction to textures, which are loaded during the same frame, prevents creating lots of textures when textures are used in the regular way. This restriction is new. Overwriting textures, instead of creating new ones is faster, if the old ones are unlikely to be used again. Since this would break efb copies, don't do it for efb copies. Castlevania 3 goes from 80 fps to 115 fps for me. There might be games that need a higher texture cache accuracy with this, but those games should also see a performance boost from this PR. Some games, which use paletted textures, which are not efb copies, might be faster now. And also not require a higher texture cache accuracy anymore. (similar sitation as PR https://github.com/dolphin-emu/dolphin/pull/1916)
2015-01-27Merge pull request #1948 from magumagu/remove-efb-cacheMarkus Wick
Remove EFB to RAM cache, and simplify code.
2015-01-24TexCache: Rewrite the texID generation for paletted texturesdegasus
This changes the behavior if both texture are available. The old code did try to load the modfied texID, the new code tries the unmodified texID first.
2015-01-23Remove EFB to RAM cache, and simplify code.magumagu
2015-01-21CustomTexture: Mark textures with mipmapsdegasus
2015-01-21CustomTexture: Use another file name with wildcardsdegasus
2015-01-21Merge pull request #1916 from mimimi085181/masterRyan Houdek
Make efb to texture less broken for paletted textures that are efb copies
2015-01-19Make efb to texture less broken for paletted textures that are efb copiesmimimi085181
Don't change the texID depending on the tlut_hash for paletted textures that are efb copies and don't have an entry in the cache for texID ^ tlut_hash. This makes those textures less broken when using efb to texture. This is not really fixing those textures, but it's a step forward. The mini map in Twilight Princess for example is in grayscales with this and is more or less usable.
2015-01-18TexCache: don't try to aggressive reuse the entrydegasus
As we pool them now, freeing and reallocating them is quite fast.
2015-01-18TexCache: use an unordered_multimap for the tex pooldegasus
2015-01-18TexCache: also incude textures within the render target pooldegasus
2015-01-18TexCache: merge texture and rendertarget factory functiondegasus
2015-01-18TexCache: remove PC_TexFormatdegasus
We only support rgba32 for a while now, so there is no need to have everything in common configureable.
2015-01-17Fix another small bug with the efb2ram cachemimimi085181
Textures that are directly next to each other were falsely detected as overlapping.
2015-01-11TexCache: recreate the entry on level missmatchdegasus
2015-01-11TexCache: Choose texture based on mipmap countdegasus
2015-01-11TexCache: rewrite level calculationdegasus
2015-01-11TexCache: create a const Config structdegasus
2015-01-11TexCache: cleanup max texture leveldegasus
2015-01-11TextureCache: inline arguments into texture cachedegasus
2015-01-11TexCache: use c++11 syntax for std::map::erasedegasus
2015-01-11TexCache: clean up frameCount handlingdegasus
2015-01-11TexCache: unify global variablesdegasus
2015-01-11TexCache: rename OverlapsMemoryRangedegasus
2015-01-11TexCache: don't invalidate efb copys because of config changesdegasus
We'll loose data on invalidating them. So just keep them until a new copy is done. A wrong scaled copy is better than no copy if the game doesn't creates a new one.
2015-01-10TexCache: remove expanded_widthdegasus
This variable isn't use any more.
2015-01-10TexCache: don't load tex level 0 on creationdegasus
This reverts an optimization which isn't worth imo. Every texture uploads have to alloc vram and a staging buffer, so there is no need to do both in the same call.
2015-01-08Merge pull request #1785 from degasus/custom_textureMarkus Wick
VideoCommon: Custom texture handling
2015-01-07Fix indentationTillmann Karras
2014-12-29VideoCommon: make hash independet from hires texturesdegasus
2014-12-29VideoCommon: Merge code to generate texture names on dumpingdegasus
2014-12-29VideoCommon: rewrite custom texturesdegasus
2014-12-24VideoConfig: Rename "StereoMonoEFBDepth" to "StereoEFBMonoDepth"Jules Blok
Makes a little bit more sense.
2014-11-29VideoCommon: Fix -Wsign-compare warnings.Rohit Nirmal