summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureCacheBase.h
AgeCommit message (Collapse)Author
2019-04-21TextureCache: Use linear filtering on y-scaled and >1xIR VRAM copiesStenzek
2019-04-21TextureCache: Simplify XFB reconstructionStenzek
This also better handles in-memory interlaced XFB data placed by the CPU by considering the stride from the VI.
2019-02-19Move most backend functionality to VideoCommonStenzek
2019-01-19TextureCache: Fix broken XFB stitching with stereoscopy is enabledStenzek
2018-11-07TextureCache: Implement deferred/batched EFB copiesStenzek
2018-07-03Make arbitrary mipmap detection toggle invalidate the texture cacheTechjar
We want this setting to invalidate the cache because it may affect the appearance of textures in the rendered scene, therefore one would expect changing it while the game is running to have the expected effect immediately.
2018-05-22EFB2RAM: Apply copy filter as a float coefficient after samplingStenzek
Using 8-bit integer math here lead to precision loss for depth copies, which broke various effects in games, e.g. lens flare in MK:DD. It's unlikely the console implements this as a floating-point multiply (fixed-point perhaps), but since we have the float round trip in our EFB2RAM shaders anyway, it's not going to make things any worse. If we do rewrite our shaders to use integer math completely, then it might be worth switching this conversion back to integers. However, the range of the values (format) should be known, or we should expand all values out to 24-bits first.
2018-05-17Merge pull request #6743 from stenzek/faster-disabled-copy-filterMarkus Wick
TextureConversionShader: Don't sample from adjacent rows when not needed
2018-05-03TextureCacheBase: Make "disable vram copies" part of the active configStenzek
2018-05-03TextureConversionShader: Don't sample from adjacent rows when not neededStenzek
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-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-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-22VideoCommon: Move abstract texture creation function to RendererStenzek
2017-11-17TextureCacheBase: Set uninitialized XFB memory to fuchsia coloriwubcode
2017-11-17Enhance xfb dumping to distinguish between the xfbs created from memory and ↵iwubcode
the xfbs created from overlapping copies
2017-11-17Hybrid XFB: Fix lint errorsiwubcode
2017-11-17TextureCacheBase: Add XFB specific functionsiwubcode
2017-11-17HybridXFB: Fix lint errorsiwubcode
2017-11-17Video Common: Use correct aspect ratio when saving screenshots / videoiwubcode
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 support for hybrid XFBiwubcode
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-10-08TextureConfig: Specialize std::hash for TextureConfigLioncash
This allows the hashing for TextureConfig instances to automatically be resolved instead of needing to directly specify it all the time.
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-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-13Video Backends: Move and rename HostTextureFormat to AbstractTextureFormatiwubcode
2017-06-13Video Backends: Split texture cache code out into separate files, introduce ↵iwubcode
'AbstractTexture'
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-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.
2016-12-27TextureCache: Add a dirty bit for partial updates on overlapping EFB copies.degasus
2016-12-26TextureCache: Drop unused parameter in backend API.degasus
2016-12-26TextureCache: Extract BP enum check to VideoCommon.degasus
We have TOO many video backends.
2016-12-25VideoCommon: use u32 for texture addressesTillmann Karras
2016-12-09TextureCacheBase: Eliminate static stateLioncash
2016-10-06TextureCache: Don't re-use pooled textures within the same frameStenzek
This is an issue because a driver may have to maintain two copies of a texture if it batches all uploads together at the start of a frame. In the Vulkan backend, we do something similar to avoid breaking out of a render pass to copy a texture from the streaming buffer to the destination image. This was causing issues in the sms-bubbles fifolog, where an EFB copy to the same address of a previously-used texture caused the previous texture to be re-used again for a different image later on in the frame, causing the original contents to be discarded.
2016-10-01VideoBackends: Make TextureCache::CompileShaders return a boolStenzek
2016-06-24Reformat all the things. Have fun with merge conflicts.Pierre Bourdon
2016-06-18TextureCache: Rename functions and add comments to clear up docsScott Mansell
2016-06-17TextureCache: Track efb copies used in a partially updated textureScott Mansell
Fixes a major preformance regression in Skies of Arcadia during battle transisions. I had plans for a more advanced version of this code after 5.0, but here is a minimal implemenation for now.
2016-04-09Partial updates for paletted texturesmimimi085181
This pr fixes another regression that happened after pr #3165 was merged. The shadows in mario baseball should now work again.
2016-02-29Merge pull request #3355 from ↵Pierre Bourdon
mimimi085181/partial-texture-updates-check-dimensions Partial texture updates: Check the dimensions of the efb copy