summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureInfo.cpp
AgeCommit message (Collapse)Author
2026-01-19VideoCommon: Move TextureInfo getters to headerJosJuice
This improves my PC's performance on RS2 Hoth by... 0.1% or so, which I think is within the margin of error. But this change also cuts down on boilerplate.
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.)
2025-03-10GCC: Remedy NRVO Failsmitaclaw
Using the `-Wnrvo` flag introduced by GCC 14, I identified a few places where NRVO was clearly intended, but is fumbled.
2024-04-20VideoCommon: Use GetSpanForAddress safely in texture decodingJosJuice
Now only VertexLoader remains... But that one might be tricky.
2024-04-20Memmap: Replace GetPointer with GetSpanForAddressJosJuice
To ensure memory safety, callers of GetPointer have to perform a bounds check. But how is this bounds check supposed to be performed? GetPointerForRange contained one implementation of a bounds check, but it was cumbersome, and it also isn't obvious why it's correct. To make doing the right thing easier, this commit changes GetPointer to return a span that tells the caller how many bytes it's allowed to access.
2023-04-15Common/MathUtil: Move IntLog2 into MathUtil namespaceLioncash
Gets this out of the global namespace.
2022-12-03HW/Memmap: Refactor Memory to class, move to Core::System.Admiral H. Curtiss
2022-08-29TextureInfo: Reorder members in constructorMerry
m_stage is initialized last
2022-06-26VideoCommon: add support for setting and getting the stage from the texture infoiwubcode
2021-11-17Eliminate SamplerCommon::AreBpTexMode0MipmapsEnabledPokechu22
This was added in 0b9a72a62d38481ff08f742b2318d07f29ff5dff but became irrelevant in 70f9fc4e7526fc9cfc008a43cd33229f62be99b6 as the check is now self-explanatory due to a rejiggering of the bitfields.
2021-10-10BPMemory: Refactor/consolidate TexUnit AddressingScott Mansell
Currently the logic for addressing the individual TexUnits is splattered all across dolphin's codebase, this commit attempts to consolidate it all into a single place and formalise it using our new TexUnitAddress struct.
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-06-23Merge pull request #9826 from Techjar/fix-tmem-mipsJMC47
VideoCommon/TextureInfo: Fix mipmap loading from tmem
2021-06-20VideoCommon/TextureInfo: Fix mipmap loading from tmemTechjar
Even address needs to be offset to the first mipmap entry.
2021-06-19VideoCommon: split the texture hash from the base name when generating the ↵iwubcode
texture name
2021-05-30Fix -Wreorder warningsTillmann Karras
2021-05-22VideoCommon/TextureInfo: Restore old mipmap detection logicTechjar
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