summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/HiresTextures.cpp
AgeCommit message (Collapse)Author
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.
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-08-16VideoCommon: Fix std::filesystem::path encoding conversionJosJuice
In std::string, you can store strings using any encoding, but in Dolphin we have decided to use UTF-8. The problem is that if you convert between std::string and std::filesystem::path using the built-in methods, the standard library will make up its own assumption of what encoding you're using in the std::string. On most OSes this is UTF-8, but on Windows it's whatever the user's code page is. What I believe is the C++ standard authors' intended solution to this is to use std::u8string instead of std::string, but that's a big hassle to move over to, because there's no convenient way to convert between std::string and std::u8string. Instead, in Dolphin, we have added helper functions that convert between std::string and std::filesystem::path in the manner we want. You *always* have to use these when converting between std::string and std::filesystem::path, otherwise we get these kinds of encoding problems that we've been having with custom textures. Fixes https://bugs.dolphin-emu.org/issues/13328.
2023-08-11VideoCommon: fix regression with texture load order where the custom texture ↵iwubcode
code was always updating the asset map for each texture with each entry, making it so the last value actually would be loaded instead of the first
2023-07-21VideoCommon: add custom texture message to provide a dirty means of ↵iwubcode
debugging whether custom textures are installed correctly
2023-06-05Core / VideoCommon: update HiresTexture to use CustomAssetLoaderiwubcode
2023-03-01VideoCommon: remove HiResTexture DDS loading, update hirestexture logic to ↵iwubcode
use custom texture data
2022-08-02Timer: protect usages of ms timers from rolloverShawn Hoffman
2022-08-02Common::Timer: use chrono::steady_clock internallyShawn Hoffman
2022-06-27VideoCommon: trigger mod calls in TextureCacheBase (efb/xfb calls), ↵iwubcode
VertexManagerBase (draw calls), and VertexShaderManager (projection calls)
2022-06-26VideoCommon: add a way to get have a graphics directory count for all games ↵iwubcode
by using a special 'all.txt' instead of a 'gameid.txt' file
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-19VideoCommon: enhance hi res texture support by having exact matches be ↵iwubcode
picked before wildcard matches. Additionally, add the ability to ignore the texture hash portion of the texture name when loading a hi res texture
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-02-11VideoCommon: Join the prefetch thread before clearing to avoid a potential ↵iwubcode
crash that can occur by multiple threads touching a single resource
2021-01-27rename Common/File to Common/IOFileShawn Hoffman
2020-11-17VideoCommon: Migrate over to fmtLioncash
Migrates off the printf-based formatting where applicable.
2020-10-03Core: Load custom textures after inputs has been loaded and avoid sending ↵iwubcode
force texture reload during startup for dynamic textures. This ensures that custom texture loading only happens once and users don't see any weird flashes on startup
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.
2020-10-03VideoCommon: Make a reusable free function for getting top level directories ↵iwubcode
that have a matching gameid text file underneath
2020-03-15VideoCommon: Allow texture folders to be determined by a <gameid>.txt fileiwubcode
2019-11-23VideoCommon: Make use of fmt outside of shader generatorsLioncash
Migrates most of VideoCommon over to using fmt, with the exception being the shader generator code. The shader generators are quite large and have more corner cases to deal with in terms of conversion (shaders have braces in them, so we need to make sure to escape them). Because of the large amount of code that would need to be converted, the conversion of VideoCommon will be in two parts: - This change (which converts over the general case string formatting), - A follow up change that will specifically deal with converting over the shader generators.
2018-08-21VideoCommon/HiresTextures: Change wildcard to a Windows-compatible characterTechjar
2018-05-22HiresTextures: Do not load compressed textures with unaligned dimensionsStenzek
D3D11 cannot handle block compressed textures where the first mip level is not a multiple of the block size. The simple fix for texture pack authors: leave these textures uncompressed. You can still use a .dds container.
2018-05-20VideoCommon: Remove a workaround mutex used for SOILEmmanuel Gil Peyrot
2018-05-20VideoCommon: Replace SOIL with libpng for hires texturesEmmanuel Gil Peyrot
2018-04-12Reformat all the things!spycrab
2018-04-03HiresTexture: Correct texture hashesLioncash
Fixes a regression introduced in 2da8d98b2f94a33e337d37dc7153e5ba445961f3
2018-03-27HiresTextures: Use std::minmax or std::minmax_element where applicable in ↵Lioncash
GenBaseName() Minimizes repetition. std::minmax_element can be used for the 256 * 2 case, as it's only performing byte comparisons and thus, there will always be an element smaller than 0xffff, so it doesn't need to be included in the set of compared values.
2018-03-27HiresTextures: Remove unnecessary pointer casts in GenBaseName()Lioncash
swap16 has an overload that accepts a u8*, performing the same behavior in a well-defined manner.
2018-01-20CustomTexture: Drop old texture format.degasus
2018-01-20CustomTextures: Drop format convertion.degasus
2018-01-10Clean up variable naming in HiresTextures::UpdateJosJuice
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.
2017-12-02VideoCommon: Fix -Wformat warningsLéo Lam
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-06-23replace DoFileSearch with optimized versionShawn Hoffman
2017-06-18Merge pull request #5305 from iwubcode/abstract_textureshuffle2
Abstract Texture
2017-06-15Move IOFile to a separate fileJosJuice
Reduces the number of files that need to be recompiled when making changes to FileUtil.h.
2017-06-13Video Backends: Move and rename HostTextureFormat to AbstractTextureFormatiwubcode
2017-06-03GameConfigLoader: Add GFX Game INI translationsMerryMage
2017-04-29HiresTextures: Move the maximum mip level check from DDS to main loaderStenzek
This way that the mip count check occurs on .png and uncombined DDS textures as well.
2017-04-29HiresTextures: Load full mipmap chain from DDS filesStenzek
This removes the need for multiple texture files to store the mipmap chain for a texture. As many mipmaps will be loaded as are present in the DDS file, and any remaining mipmaps will fall back to the old behavior.
2017-04-29HiresTextures: Support parsing DDS files directlyStenzek
This leaves DDS textures using DXT1/3/5 compressed in-memory, which can be passed directly to the backend.
2017-04-07FileSearch: Namespace functions under the Common namespaceLioncash
2017-03-09Unify the way of setting game ID, title ID, revisionJosJuice
The existing code from ConfigManager, ES and MIOS is merged into a new set of functions called SetRunningGameMetadata.
2017-03-03Common: Move byte swapping utilities into their own headerLioncash
This moves all the byte swapping utilities into a header named Swap.h. A dedicated header is much more preferable here due to the size of the code itself. In general usage throughout the codebase, CommonFuncs.h was generally only included for these functions anyway. These being in their own header avoids dumping the lesser used utilities into scope. As well as providing a localized area for more utilities related to byte swapping in the future (should they be needed). This also makes it nicer to identify which files depend on the byte swapping utilities in particular. Since this is a completely new header, moving the code uncovered a few indirect includes, as well as making some other inclusions unnecessary.
2016-10-29DiscIO/SConfig: Rename GetUniqueID to GetGameIDJosJuice
We call this "game ID" everywhere else, and it's not actually completely unique.
2016-08-07Common: namespace MemoryUtilLioncash
2016-06-24Reformat all the things. Have fun with merge conflicts.Pierre Bourdon