summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureCacheBase.cpp
AgeCommit message (Collapse)Author
2026-01-18VideoCommon: Defer creating TextureInfoJosJuice
TextureCacheBase::LoadImpl has a hot path where the passed-in TextureInfo never gets used. Instead of passing in a TextureInfo, let's pass in the stage and create the TextureInfo from the stage if needed. This unlocks somewhere above an additional 4% performance boost in the Hoth level of Rogue Squadron 2 on my PC. Performance varies, making it difficult for me to measure, so treat this as a very approximate number.
2026-01-17Merge pull request #14289 from Sintendo/typosJMC47
Fix various typos and spelling mistakes
2026-01-17Merge pull request #14268 from JoshuaVandaele/std-tounderlyingiwubcode
c++23: Replace Common::ToUnderlying with std::to_underlying
2026-01-17Fix various typos and spelling mistakesSintendo
2026-01-17VideoCommon: Don't create mipmap vector in TextureInfoJosJuice
The TextureInfo constructor creates a vector of MipLevels. This could be good for performance if MipLevels are accessed very often for each TextureInfo, but that's not the case. Dolphin creates thousands of TextureInfos per second that it never accesses the mipmap levels of because there's a hit in the texture cache, and in the uncommon case of a texture cache miss, the mipmap levels only get looped through once. To make the common case of texture cache hits as fast as possible, let's not create a vector in the TextureInfo constructor. This commit implements a custom iterator for MipLevels instead. In my testing on the Death Star level of Rogue Squadron 2, this speeds up TextureInfo::FromStage by 200%, giving an overall emulation speedup of a bit over 1%. Results on the Hoth level are even better, with TextureInfo::FromStage being close to 300% faster and overall emulation being over 4% faster. (Single core, no GPU texture decoding.)
2026-01-09c++23: Replace Common::ToUnderlying with std::to_underlyingJoshua Vandaële
Requires at least GCC 11, Clang 13, MSVC 19.30 (VS2022 17.0), or AppleClang 13.1.6 (XCode 13.3).
2025-11-23VideoCommon: separate the concept of a 'resource' from an 'asset'. A ↵iwubcode
resource is potentially multiple assets that are chained together but represent one type of data to the rest of the system. An example is a 'material'. A 'material' is a collection of textures, a custom shader, and some metadata that all comes together to form what the concept of the material is. There will be a 'material' resource. For now, start small by introducing the interface and change our texture loading which used assets from the old resource manager, to an actual resource.
2025-11-23VideoCommon: rename 'IsAnisostropicEnhancementSafe' to ↵iwubcode
'IsAnisotropicEnhancementSafe' in TextureCacheBase
2025-10-30VideoCommon: Fix render to texture in wrong layoutTellowKrinkle
2025-08-01Merge pull request #13780 from jordan-woyak/fix-text-filter-nearestAdmiral H. Curtiss
VideoCommon: Fix "Force Nearest" texture filter setting.
2025-07-08Avoid map/set double lookupsSintendo
Fix some common anti-patterns with these data structures. - You can dereference the iterator returned by `find` to access the underlying value directly, without an extra `operator[]`/`at`. - Rather than checking for an element before insertion/deletion, you can just do the operation and if needed check the return value to determine if the insertion/deletion succeeded.
2025-06-28VideoCommon: Fix "Force Nearest" texture filter setting.Jordan Woyak
2025-06-06VideoCommon: use CustomResourceManager in the texture cache and hook up to ↵iwubcode
our hires textures
2025-03-23Merge pull request #13093 from mitaclaw/ranges-modernization-4-projectionJMC47
Ranges Algorithms Modernization - Projection
2025-03-17Config: Expose Default and 1x Anisotropic Filtering setting.Jordan Woyak
2025-03-17Enable anisotropic filtering when the game requests itPokechu22
2025-03-09Modernize `std::max_element` with ranges and projectionsmitaclaw
2025-03-09Modernize `std::sort` with ranges and projectionsmitaclaw
In PPCTables.cpp, the code is currently unused so I was unable to test it. In CustomPipeline.cpp, a pointer to member function cannot be used due to 16.4.5.2.1 of the C++ Standard regarding "addressable functions". https://eel.is/c++draft/namespace.std#6 In Fs.cpp and DirectoryBlob.cpp, these examples used projections in a previous iteration of this commit, but no longer do. Still, they remain in this commit because the PR they would actually belong to is already merged.
2025-03-09VideoCommon: Move backend_info out of VideoConfig struct.Jordan Woyak
2024-12-28Core/VideoCommon: Fix duplicate OSD Custom Textures messagesdreamsyntax
Resolves duplicate OSD messages for Loading and Found custom textures. VideoBackend initialization results in HiresTexture::Init being called. We already call HiresTexture::Update when OnNewTitleLoad is called. Thus we can remove HiresTextures::Init completely as it is redundant.
2024-10-10Modernize `std::find` with rangesmitaclaw
2024-08-14Use 'contains' methodDr. Dystopia
2024-06-01VideoCommon: pull texture sampler out of texture cache so that it can be ↵iwubcode
used in other places in the future
2024-04-20VideoCommon: Use GetSpanForAddress safely in texture decodingJosJuice
Now only VertexLoader remains... But that one might be tricky.
2024-04-09VideoCommon: Remove calls to GetPointerJosJuice
This fourth part of my series of patches to get rid of unsafe uses of GetPointer takes care of the "easy" cases in VideoCommon. Three uses of GetPointer now remain in Dolphin: VertexLoaderManager, TextureInfo, and the software renderer's TextureSampler.
2024-03-21VideoCommon: Scan texture dumping directory + subdirectories to not re-dump ↵Jordan Woyak
existing files.
2024-01-12FifoRecorder: Move instance to System.Admiral H. Curtiss
2023-12-15VideoBackends / VideoCommon: add type enum to dictate whether a texture is a ↵iwubcode
2D texture, a texture array, or a cube map; support 2D texture type across backends Co-authored-by: TellowKrinkle <tellowkrinkle@gmail.com>
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-28Remove _M_X86 in favour of _M_X86_64Zopolis4
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-03Merge pull request #12102 from iwubcode/cubemap_custom_textureJMC47
VideoCommon: add ability to load cube maps into custom texture data
2023-09-03Merge pull request #12148 from ↵Admiral H. Curtiss
Dentomologist/fifo_convert_memoryupdate_type_to_enum_class Fifo: Convert MemoryUpdate::Type to enum class
2023-09-02VideoCommon: add loading cube maps from DDS files and loading it into our ↵iwubcode
custom texture object. Custom texture object now has the concept of slices in addition to levels. Traditional custom textures have a single slice
2023-09-02Fifo: Convert MemoryUpdate::Type to enum classDentomologist
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-09Merge pull request #12022 from iwubcode/texture_create_gmod_implAdmiral H. Curtiss
VideoCommon: call into graphics mods create texture callback
2023-07-02VideoCommon: don't do pointer copies during graphics mod callback iterationiwubcode
2023-07-02VideoCommon: call into graphics mods create texture callback, providing ↵iwubcode
additional asset dependencies that trigger the texture to be reloaded
2023-07-02Merge pull request #11991 from iwubcode/tcache_multiple_texture_dependenciesAdmiral H. Curtiss
VideoCommon: allow multiple texture assets to associate with a texture cache entry
2023-07-02VideoCommon: add support for allowing a TextureCache entry to be associated ↵iwubcode
with multiple assets
2023-06-28VideoBackends: support multiple compute images for some backends (D3D, OGL, ↵iwubcode
Vulkan)
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-06-02VideoCommon: move custom texture data to assetsiwubcode
2023-06-01Add compression option for texture dumps.joon
Enable through command line options: -C Graphics.Settings.TexturePNGCompressionLevel=[0-9] Or from GFX.ini: [Settings] TexturePNGCompressionLevel=[0-9] @see #10792