summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureCacheBase.cpp
AgeCommit message (Collapse)Author
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
2023-04-14Merge pull request #11687 from Minty-Meeo/warningsLéo Lam
Resolve GCC/Clang Warnings
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-04-06Resolve [-Wshadow]Minty-Meeo
2023-03-01VideoCommon: remove HiResTexture DDS loading, update hirestexture logic to ↵iwubcode
use custom texture data
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-02-09Lint fixesScott Mansell
2023-02-09Move xfb tracking and IR scaling out of RenderBaseScott Mansell
2023-01-31Expose Renderer's FramecountScott Mansell
We don't want to move it, because we want to complete this refactor without changing savestate version
2023-01-31Split out everying remaining from SwapScott Mansell
2023-01-31Move GraphicsMod out of RenderBaseScott Mansell
2023-01-31Split AbstractGfx out of RendererScott Mansell
Almost all the virtual functions in Renderer are part of dolphin's "graphics api abstraction layer", which has slowly formed over the last decade or two. Most of the work was done previously with the introduction of the various "AbstractX" classes, associated with texture cache cleanups and implementation of newer graphics APIs (Direct3D 12, Vulkan, Metal). We are simply taking the last step and yeeting these functions out of Renderer. This "AbstractGfx" class is now completely agnostic of any details from the flipper/hollywood GPU we are emulating, though somewhat specialized. (Will not build, this commit only contains changes outside VideoBackends)
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-12-27VideoCommon: De-globalize PixelShaderManager class.Admiral H. Curtiss
2022-12-09Core: Add option to force linear texture filtering.Admiral H. Curtiss
2022-12-03HW/Memmap: Refactor Memory to class, move to Core::System.Admiral H. Curtiss
2022-11-07VideoCommon: Add an option to disable mipmapsTellowKrinkle
Needed by M1 fifoci to work around a minor non-determinism bug
2022-10-28VideoCommon: call texture load graphics mod hook when Dolphin loads a textureiwubcode
2022-10-09VideoCommon: add structures to graphics mods to allow for future adding or ↵iwubcode
removing parameters with less code overhead
2022-10-06Common/PointerWrap: Remove DoPODPokechu22
This was added in 385d8e2b15c8accce3b4e4b4f3dc90f63e3fbee4, but became somewhat redundant with Do in 4c7bbd96e435a7516b05d3e8c791ab41505e2e0f, and completely redundant now that std::is_trivially_copyable_v is well-supported.
2022-08-01Common/Hash: use zlib-ng for adler32. small cleanups.Shawn Hoffman
2022-07-21VideoBackends: Add Metal rendererTellowKrinkle
2022-07-16Restructure parameters to TetxureConverterShaderGen/TextureConversionShaderPokechu22
This will be used for later refactoring for increased accuracy.
2022-07-15Remove casts to integers for texture and EFB formatsPokechu22
The only remaining casts for these types that I know of are in TextureInfo (where format_name is set to the int version of the format, and since that affects filenames and probably would break resource packs, I'm not changing it) and in TextureDecoder_Common's TexDecoder_DrawOverlay, which will be handled separately.
2022-06-27VideoCommon: dump EFB with size and texture format details and dump XFB with ↵iwubcode
size details. Finally move count to front of image for XFB/EFB dumps so as to make it easier to see them in order. Change the count value prefix to 'n'
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-16VideoCommon: Reduce duplicates of non-palette-requiring texture decode shadersTellowKrinkle
2022-05-25Common: Refactor PointerWrapDentomologist
2022-04-26TextureCacheBase: Don't log error while measuring state size.Admiral H. Curtiss
2022-04-18Common/PointerWrap: Prevent reads/writes past the end of the buffer.Admiral H. Curtiss
2022-01-29Fix copy filter clamping when EFB VRAM copies are disabledPokechu22
2022-01-25Fix incorrect copy filter clampingPokechu22
We need to clamp to the center of pixels, or else things end up working out incorrectly. This also fixes an off-by-1 for the bottom line.
2022-01-01VideoCommon: Add names for textures and shadersPokechu22
2021-12-18TextureCacheBase: Re-wrap GetTexture commentPokechu22
2021-11-18Merge pull request #10222 from phire/fix-copy-filter-clampingJMC47
Fix copy filter clamping
2021-11-17VideoCommon: Expose SamplerState to shadersPokechu22
The benefit to exposing this over the raw BP state is that adjustments Dolphin makes, such as LOD biases from arbitrary mipmap detection, will work properly.
2021-11-17Eliminate SamplerCommonPokechu22
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-11-17Fix copy filter clamping regression in SpyroScott Mansell
This fixes horizontal lines in the bloom effect of Spyro: A Hero's Tail, which is a regression caused by PR #10204 Screenshot of regression: https://user-images.githubusercontent.com/138484/142030503-90fcd8d5-63d3-4820-874a-72e9be0c4768.png Fixed: https://user-images.githubusercontent.com/138484/142031598-b85ff55c-1302-4e4d-bcb2-57848974056b.png Spyro uses an 640x80 pixel sub-buffer within the EFB to calculate it's bloom effects, which it places below the main 640x448 buffer. EFB layout: https://user-images.githubusercontent.com/138484/142030573-e933b6ae-c37e-4be6-86d4-0bc779b92535.png Note: Colors are wrong because the main color buffer uses RGBA6, while the bloom is calculated in RGB8 This allows it to do bloom without backing up part of the EFB to main memory, as most games do. But, since some of the sub-buffers used in the bloom effect are taller than 80 pixels, they need to be sliced up into smaller sub, sub buffers which get combined later when copied to main memory. At one point, a 320x224 buffer is broken up into 320x80, 320x64 and 320x80 slices. These are copied out with the copy filter set to a vertical blur. Because there was an off-by-one errror in the clamping coordinates, the bottom line of the color buffer would be blurred into the top of each slice. Final combined EFB copy: https://user-images.githubusercontent.com/138484/142031360-2c076839-7c96-4b3b-a093-d899d0a2c7ae.png Fixed version: https://user-images.githubusercontent.com/138484/142031370-72e41a35-3b3e-4662-a483-79203e357ecc.png Before #10204 the copy filter wasn't enabled for efb copies, and most other games don't do this type of slicing. FIFO CI shows that a few other games are effected, it's always just a minor difference to the top line where there was previously a slight hint of garbage.
2021-10-12TextureCache: Remove deleted textures from bound_texturesScott Mansell
Fixes issue where vulkan might crash trying to bind a deleted texture.
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