summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureCacheBase.h
AgeCommit message (Collapse)Author
2025-06-06VideoCommon: use CustomResourceManager in the texture cache and hook up to ↵iwubcode
our hires textures
2024-10-10C++20: Synthesize `operator!=` From `operator==`mitaclaw
The inequality operator is automatically generated by the compiler if `operator==` is defined.
2024-06-01VideoCommon: pull texture sampler out of texture cache so that it can be ↵iwubcode
used in other places in the future
2024-03-21VideoCommon: Scan texture dumping directory + subdirectories to not re-dump ↵Jordan Woyak
existing files.
2024-01-31VideoCommon/Statistics: Remove global system accessor from s_after_frame_eventLioncash
Instead, we make the event take a reference to the system and then pass it in when the event is triggered. This does introduce two other accessors, but these are much easier to refactor out over time, and without modification to the existing event interface.
2023-12-09VideoCommon: prevent a potential custom texture crash that can occur when a ↵iwubcode
shared_ptr gets released while a pointer to its member data is still being used
2023-11-26VideoCommon: move texture dump function out of texture cache to its own free ↵iwubcode
function so it can be used elsewhere. Doing this change may also slightly improve performance of this operation
2023-10-10VideoCommon: instead of using 'CustomTextureData' directly, use ↵iwubcode
'TextureData' for texture assets, this allows us to provide additional metadata for textures. Such as a sampler or type information (to distinguish cube maps)
2023-09-21fmt 10.0.0-10.1.1 compile fixesget
Implicit conversion operators and enums was removed for parity with std::format (https://github.com/fmtlib/fmt/commit/fce74caa15b24cbc0fcafe4706692cb06cb0b815).
2023-09-01TextureCacheBase: Add m_ prefix to member variablesDentomologist
2023-07-19VideoCommon: skip the texture dump if the texture is using a custom texture, ↵iwubcode
regardless of whether or not it is loaded yet
2023-07-02VideoCommon: call into graphics mods create texture callback, providing ↵iwubcode
additional asset dependencies that trigger the texture to be reloaded
2023-07-02VideoCommon: add support for allowing a TextureCache entry to be associated ↵iwubcode
with multiple assets
2023-06-20VideoCommon: move cached texture asset to 'CustomAsset' common codeiwubcode
2023-06-07InputCommon / VideoCommon: remove dynamic input reloading the texture cache, ↵iwubcode
this is no longer needed, assets reload automatically!
2023-06-07VideoCommon: introduce linked assets in TCacheEntry, allowing for assets to ↵iwubcode
be reloaded
2023-06-05Core / VideoCommon: update HiresTexture to use CustomAssetLoaderiwubcode
2023-04-08VideoCommon: refactor GetTexture into a separate function for creation, ↵iwubcode
separating the custom texture data path from the game's texture data path
2023-02-09TextureCacheBase: Remove unused bitset includePokechu22
It was used for valid_bind_points, which was removed in 88bd10cd30d487cc3efba20875b32df7cdacb686 (and the declaration was more recently removed in 606c18210dd4f651655b2c84e9e332e6c6c6e21b).
2023-02-09Apply suggestions from code reviewScott Mansell
Co-authored-by: Mai <mathew1800@gmail.com> Co-authored-by: BhaaL <bhaalsen@gmail.com> Co-authored-by: iwubcode <iwubcode@users.noreply.github.com>
2023-01-31Split out everying remaining from SwapScott Mansell
2023-01-31TextureCache: Add content lockingScott Mansell
Texture cache occasionally mutates textures for efficiency. Which is awkward if we want to borrow those textures from texture cache to do something else, such as a graphics debugger, or async presentation on another thread. Content locking provides a way to signal that the contents of a texture cache entry should not change. Texture cache will be forced to use alternative strategies.
2023-01-31TextureCache: Refactor with smart pointersScott Mansell
The whole ownership model was getting a bit of a mess, with a some of special cases to deal with. And I'm planning to make it even more complex in the future. So here is some upfront work to convert it over to reference counted pointers.
2023-01-31Move TCacheEntry out of TextureCacheBaseScott Mansell
Allows for fowards declaration
2022-07-16Restructure parameters to TetxureConverterShaderGen/TextureConversionShaderPokechu22
This will be used for later refactoring for increased accuracy.
2022-06-27VideoCommon: support dynamically updating game mods at runtimeiwubcode
2022-06-27VideoCommon: trigger mod calls in TextureCacheBase (efb/xfb calls), ↵iwubcode
VertexManagerBase (draw calls), and VertexShaderManager (projection calls)
2022-06-27VideoCommon: add UninitializeEFBMemory to mirror XFB functioniwubcode
2022-06-26VideoCommon: create variables for EFB/XFB copy prefix. Reword prefix to ↵iwubcode
'efb1' and 'xfb1' to match textures
2022-01-13Fix ambiguous uses of format_toPokechu22
At least in MSVC (which is not restricted from targetting C++20), these can be resolved to either std::format_to or fmt::format_to (though I'm not sure why the std one is available). We want the latter.
2022-01-13Make all custom fmt::formatter's format functions constPokechu22
fmt 8.0.0 requires this.
2022-01-01VideoCommon: Add names for textures and shadersPokechu22
2021-10-13Fix all uninitialized variable warnings (C26495)Pokechu22
2021-10-12Extend TMEM cache implementationScott Mansell
Now works with games that deliberately avoid invalidating TMEM because they know textures are too large to fit: * Sonic Riders * Metal Arms: Glitch in the System * Godzilla: Destroy All Monsters Melee * NHL Slapshot * Tak and the Power of Juju * Night at the Museum: Battle of the Smithsonian * 428: Fūsa Sareta Shibuya de
2021-07-05treewide: convert GPLv2+ license info to SPDX tagsPierre Bourdon
SPDX standardizes how source code conveys its copyright and licensing information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX tags are adopted in many large projects, including things like the Linux kernel.
2021-05-13Merge pull request #9681 from iwubcode/texture-infoMat M
VideoCommon: move all texture calculations to a "TextureInfo" class
2021-05-11VideoCommon: move all texture calculations to a "TextureInfo" class. This ↵iwubcode
ever so slightly improves readability and allows for the full texture name to be generated outside of the hires texture cache
2021-05-08VideoCommon: simplify TextureCacheBase by comparing a xfb's hash against a ↵iwubcode
newly calculated one. This fixes games like Teenage Mutant Ninja Turtles (Wii) which use oversized textures where the stride doesn't match the BytesPerRow and that resulted in a different hash algorithm being used. By not hashing the texture before, we improve performance by hashing at most once in all direct XFB lookup scenarios.
2021-03-06Convert BPMemory to BitField and enum classPokechu22
Additional changes: - For TevStageCombiner's ColorCombiner and AlphaCombiner, op/comparison and scale/compare_mode have been split as there are different meanings and enums if bias is set to compare. (Shift has also been renamed to scale) - In TexMode0, min_filter has been split into min_mip and min_filter. - In TexImage1, image_type is now cache_manually_managed. - The unused bit in GenMode is now exposed. - LPSize's lineaspect is now named adjust_for_aspect_ratio.
2020-10-03InputCommon: Introducing the "Dynamic Input Texture". Configuration links ↵iwubcode
an emulated input action to an image based on what host key is defined for that emulated input. Specific regions are called out in configuration that mark where to replace an input button with a host key image.
2019-08-04VideoCommon/TextureCacheBase: Make OnConfigChanged's parameter a const referenceLioncash
This reference isn't actually modified within this function
2019-07-24TextureCache: Support saving cache entries, including EFB copiesStenzek
2019-07-16VideoCommon: Remove unused MathUtil.h include from VideoCommon.hLioncash
This header doesn't actually make use of MathUtil.h within itself, so this can be removed. Many other source files used VideoCommon.h as an indirect include to include MathUtil.h, so these includes can also be adjusted. While we're at it, we can also migrate valid inclusions of VideoCommon.h into cpp files where it can feasibly be done to minimize propagating it via other headers.
2019-07-14TextureCache: Support reinterpreting formats for VRAM texturesStenzek
2019-07-14TextureCache: Combine ApplyPaletteToEntry and ConvertTextureStenzek
2019-04-21Replace EFBRectangle/TargetRectangle with MathUtil::RectangleStenzek
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