summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureCacheBase.cpp
AgeCommit message (Collapse)Author
2018-05-03TextureCacheBase: Make "disable vram copies" part of the active configStenzek
2018-04-29Implement EFB copy filter and gamma in hardware backendsStenzek
Also makes y_scale a dynamic parameter for EFB copies, as it doesn't make sense to keep it as part of the uid, otherwise we're generating redundant shaders.
2018-04-12Reformat all the things!spycrab
2018-03-14Assert: Uppercase assertion macrosLioncash
Macros should be all upper-cased. This is also kind of a wart that's been sticking out for quite a while now (we avoid prefixing underscores).
2018-03-13SSE-optimize UninitializeXFBMemoryHenrik Rydgård
Lowest hanging fruit I could find with a profiler. Not sure this stuff actually needs to be done, but assuming it is, why not do it quickly? 10x faster, goes from 1% CPU to 0.09%.
2018-02-11TextureCache: Add an option to disable EFB copies to VRAMStenzek
The option is named DisableCopyToVRAM under the Hacks section in GFX.ini. It is intentionally not exposed to the GUI, as users should not need to use it under normal circumstances. The main use is debugging issues in the EFB-to-RAM shaders.
2018-02-11VideoConfig: Remove bForceCopyToRam fieldStenzek
It's the inverse of supports-copy-to-vram.
2018-01-22AbstractTexture: Move Bind() method to RendererStenzek
This makes state tracking simpler, and enables easier porting to command lists later on.
2018-01-10Treat custom textures with "_arb" suffix as having arbitrary mipmapsJosJuice
This is adapted from Bighead's code that was posted at https://forums.dolphin-emu.org/Thread-dolphin-custom-texture-mipmaps?pid=460867#pid460867 In master, custom textures are never treated as having arbitrary mipmaps, so we need either a change like this or a change that makes us apply the arbitrary mipmap heuristic even when a custom texture is used.
2018-01-06VideoCommon: Apply the yscale as upscaling of the XFB.Markus Wick
2017-12-21Texture Cache Base: Move PAL vertical scaling to be baked into the texture ↵iwubcode
size. This saves on a number of multiplications and fixes an issue where we were multiplying the y-scaling factor by the srcRectangle's height + 1 which was causing a crash in some GC titles
2017-12-19Only use the "Scaled EFB Copy" setting for EFB, not XFBJosJuice
The hybrid XFB PR made it apply to both EFB copies and XFB copies.
2017-12-10TextureCache: Don't dump custom texturesStenzek
They don't have a basename, therefore were being saved to empty files, and potentially can be compressed.
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.