summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureCacheBase.cpp
AgeCommit message (Collapse)Author
2017-12-06VideoCommon: Drop now unused efb2tex matrix generation.degasus
2017-12-02VideoBackends: Use VideoCommon shader generators for efb2tex copies.Markus Wick
This will generate one shader per copy format. For now, it is the same shader with the colmat hard coded. So it should already improve the GPU performance a bit, but a rewrite of the shader generator is suggested. Half of the patch is done by linkmauve1: VideoCommon: Reorganise the shader writes.
2017-11-22TextureCacheBase: Don't crop last row/column of XFB copiesStenzek
Unsure why this was happening in the first place.
2017-11-22AbstractTexture: Seperate CopyRectangleFromTexture to two methodsStenzek
ScaleRectangleFromTexture, which does a draw, and CopyRectangleFromTexture, which where possible, does a bit-for-bit copy.
2017-11-22VideoCommon: Move abstract texture creation function to RendererStenzek
2017-11-19Merge pull request #6186 from lioncash/enum-classLeo Lam
VideoConfig: Make AspectMode and StereoMode enum classes
2017-11-19VideoCommon: Resolve -Wmissing-brace warningsLioncash
Resolves around 5 -Wmissing-brace warnings on macOS.
2017-11-18VideoConfig: Make StereoMode an enum classLioncash
Makes for more strongly-typed identifiers (and doesn't pollute surrounding namespaces)
2017-11-17TextureCacheBase: Set uninitialized XFB memory to fuchsia coloriwubcode
2017-11-17Hybrid XFB: Fix lint errorsiwubcode
2017-11-17Enhance xfb dumping to distinguish between the xfbs created from memory and ↵iwubcode
the xfbs created from overlapping copies
2017-11-17Texture Cache Base: Optimization to allow stitched or memory xfb textures to ↵iwubcode
be looked up from cache directly if they were defined previously and their hash hasn't changed
2017-11-17TextureCacheBase: Fix issue in Rogue Squadron 2 where overlapping textures ↵iwubcode
caused a hash change which would cause us to do a lookup from memory that gave us an incorrect result in XFB2Ram
2017-11-17TextureCacheBase: Remove vertical scaling from EFB path and have copy checks ↵iwubcode
only check EFBs
2017-11-17Hybrid XFB: Fix lint errorsiwubcode
2017-11-17TextureCacheBase: make sure stitching rectangle bounds don't exceed theiwubcode
texture size they are meant to represent
2017-11-17TextureCacheBase: Add XFB specific functionsiwubcode
2017-11-17HybridXFB: Fix lint errorsiwubcode
2017-11-17Software Backend: Force EFB/XFB to copy to ramiwubcode
2017-11-17Video Common: Avoid 'presenting' duplicate frames by detecting when swapiwubcode
hasn't changed since the last frame
2017-11-17VideoCommon: Output gamma now comes from the xfb copyiwubcode
2017-11-17Video Backends: Implement vertical scaling for xfb copies. This fixes theiwubcode
display of PAL games that run in 50hz mode.
2017-11-17Add an additional flag fo 'XFB Copy'iwubcode
2017-11-17Add new GUI option to skip XFBToRam and remove old XFB optionsiwubcode
2017-11-17Add ability to dump xfb copies to texture for debugging purposesiwubcode
2017-11-17Add support for hybrid XFBiwubcode
2017-11-06Improved detection: it doesn't desaturate the input anymore (woops) also it ↵Tommaso Checchi
makes its own whole chain! This way it "notices" much better gradual divergences. Fixes Mario Sunshine, moss on the window in Zelda TP
2017-10-27Fixed fog, lava, water in Mario Galaxy (and possibly other games) in higher ↵Tommaso Checchi
IRs by detecting & fixing the mipmaps that aren't just used for downscaling, but are handmade to create a gradient.
2017-09-03Merge pull request #5718 from mimimi085181/partial-updates-updatePierre Bourdon
Update to partial texture updates
2017-08-09VideoCommon: Fix typo in comments introduced by #5849N.E.C
2017-08-06Keep textures that are overwritten by efb copies, if the stride matchesmimimi085181
This is supposed to get efb2tex to the same texture as efb2ram, by applying the related efb copies as updates after each other, in the order of their creation.
2017-08-06Do not load overwritten textures by hashmimimi085181
In this case, comparing the hash is not enough to check, if two textures are identical.
2017-08-06fix stored memory stride for normal texturesmimimi085181
2017-08-03Video: Clearly separate Texture and EFB Copy formatsN.E.C
Improve bookkeeping around formats. Hopefully make code less confusing. - Rename TlutFormat -> TLUTFormat to follow conventions. - Use enum classes to prevent using a Texture format where an EFB Copy format is expected or vice-versa. - Use common EFBCopyFormat names regardless of depth and YUV configurations.
2017-07-11Merge pull request #5726 from mimimi085181/minimal-tmem-cache-emulationAnthony
Implement minimal emulation of TMEM caching
2017-07-10Implement minimal emulation of TMEM cachingmimimi085181
This is a remake of https://github.com/dolphin-emu/dolphin/pull/3749 Full credit goes to phire. Old message: "If none of the texture registers have changed and TMEM hasn't been invalidated or changed in other ways, we can blindly reuse the old texture cache entries without rehashing. Not only does this fix the bloom effect in Spyro: A Hero's Tail (The game abused texture cache) but it will also provide speedups for other games which use the same texture over multiple draw calls, especially when safe texture cache is in use." Changed the pr per phire's instructions to only return the current texture(s) if none of the texture registers were changed. If any texture register was changed, fall back to the default hashing and rebuilding textures from memory.
2017-06-29FileUtil: Add a class for Exists/IsDirectory/GetSizeJosJuice
Some code was calling more than one of these functions in a row (in particular, FileUtil.cpp itself did it a lot...), which is a waste since it's possible to call stat a single time and then read all three values from the stat struct. This commit adds a File::FileInfo class that calls stat once on construction and then lets Exists/IsDirectory/GetSize be executed very quickly. The performance improvement mostly matters for functions that can be handling a lot of files, such as File::ScanDirectoryTree. I've also done some cleanup in code that uses these functions. For instance, some code had checks like !Exists() || !IsDirectory(), which is functionally equivalent to !IsDirectory(), and some code was using File::GetSize even though there was an IOFile object that the code could call GetSize on.
2017-06-13Video Backends: Move and rename HostTextureFormat to AbstractTextureFormatiwubcode
2017-06-13Video Backends: Split texture cache code out into separate files, introduce ↵iwubcode
'AbstractTexture'
2017-06-07fix various instances of -1 being assigned to unsigned typesShawn Hoffman
2017-04-29TextureCache: Move host texture utility functions to VideoCommonStenzek
The appropriate place for these would be AbstractTexture, once it is finished.
2017-04-29TextureCache: Support compressed textures and pass pitch/size to uploadStenzek
This also removes an extra copy of the image for custom textures.
2017-04-12VideoBackends: Support updated texture encoding shader generatorsStenzek
2017-04-09Merge pull request #5220 from stenzek/small-nonsquare-mipsAnthony
TextureCache: Fix incomplete GPU texture decoding of non-square mips
2017-04-07TextureCache: Fix incomplete GPU texture decoding of non-square mipsStenzek
2017-04-06TextureCacheBase: remove duplicated variableMichael Maltese
Fixes warning: ``` Source/Core/VideoCommon/TextureCacheBase.cpp:869:17: warning: declaration shadows a local variable [-Wshadow] const u8* tlut = &texMem[tlutaddr]; ^ Source/Core/VideoCommon/TextureCacheBase.cpp:784:13: note: previous declaration is here const u8* tlut = &texMem[tlutaddr]; ^ ```
2017-04-04TextureCacheBase: fix custom textures not being loadedMichael Maltese
Fixes bug #10183 [0] introduced by 3bd184a / PR #4467 [1]. TextureCacheBase was no longer calling `entry->Load` for custom textures since the compute shader decoding logic was added. This adds it back in. It also slightly restructures the decoding if-group to match the one below, which I think makes the logic more obvious. (recommend viewing with `git diff -b` to ignore the indentation changes) [0]: https://bugs.dolphin-emu.org/issues/10183 [1]: https://github.com/dolphin-emu/dolphin/pull/4467
2017-04-01VideoCommon: Changes to TextureCache to support decoding in backendStenzek
2017-03-25TextureCacheBase: Convert bound_textures from a C array to a std::arrayLioncash
Prevents array-to-pointer decay and simplifies some code.
2017-03-22TextureCache: Don't lock freed rendertargets for one frame.degasus
New Super Mario Bros on PAL still renders at 60 fps, but skips every 5th XFB copy. So our detection of "per frame" fails, and we require twice the amound of texture objects. But our pool frees unused textures after 3 frames, so half of them needs to be reallocated every few frames. This commit removes the lock for render targets. It was introduced to not update a texture while it is still in use. But render targets aren't updated while rendering, so this lock isn't needed. Non-rendertarget textures however aren't as dynamic, so the lock should have no performance update.