summaryrefslogtreecommitdiff
path: root/src/video_core/texture_cache
AgeCommit message (Collapse)Author
2025-05-12video_core: Improve texture cache memory management to prevent leaksZephyron
Implement several improvements to the texture cache memory management system to address memory leaks that occur in memory-intensive games like TOTK (Title ID 0100F2C0115B6000). These changes prevent the gradual memory increase that eventually leads to crashes or undefined behavior. Key improvements: - Enhance garbage collection with more aggressive cleanup thresholds - Add emergency resource cleanup for persistent high memory usage - Improve DeleteImage to ensure proper resource deallocation - Make DelayedDestructionRing thread-safe with proper mutex protection - Track consecutive high-memory frames to detect potential leaks - Add emergency cleanup mechanism for extreme memory pressure situations - Use proper type casting in std::max to fix compilation errors This should significantly improve stability during extended gameplay sessions with memory-intensive titles. Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-05-12texture_cache: Add equality operators for ImageInfo and ImageViewInfoZephyron
- Add operator== to ImageInfo and ImageViewInfo classes to enable direct equality comparisons. The implementations use std::tie to perform member-wise comparisons of all relevant fields in a safe and efficient manner. This allows for easier comparison of texture cache entries and view information, which can be useful for cache management and debugging.
2025-05-12build: upgrade fmt and SDL2Zephyron
Update fmt library to version 11.0.2 and make necessary adjustments: - Replace fmt/format.h includes with fmt/ranges.h - Add const qualifiers to formatter::format functions - Update CMake to require fmt version 11 Additional dependency updates: - Update SDL2 bundled version from 2.28.2 to 2.32.0 - Update catch2 to version 3.7.1 - Update vcpkg baseline to ca846b21276c9a3171074ac8d2b4f6516894a7d0
2024-12-20externals: update fmt to 11.0.2 and vcpkg to 2024.09.30 (#68)lui
Updated to fmt 11 with the required source changes for it to work. Also updated vcpkg for this, and as an added benefit it fixes the `Unable to find a valid Visual Studio instance` error, and the VS 2019 build tools are no longer required. Just make sure to delete the existing downloaded vcpkg tool and binaries in `externals/vcpkg` if you have compiled before, or else it will continue to use the old version and give the error. Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/68 Co-authored-by: lui <lui@vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion> Co-committed-by: lui <lui@vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion>
2024-12-20mark format functions as constSamuliak
2024-12-20Use fmt 11.0.0Mike Lothian
2024-02-27Merge pull request #13171 from liamwhite/fake-addressliamwhite
texture_cache: do not track invalid addresses
2024-02-27texture_cache: use two-pass collection for costly load resources (#13096)liamwhite
2024-02-26texture_cache: do not track invalid addressesLiam
2024-02-20Merge pull request #10529 from liamwhite/critical-spacingMatías Locatti
caches: make critical reclamation less eager and possible in more cases
2024-02-13Merge pull request #12975 from FernandoS27/keep-your-own-vodoo-doll-away-from-gfliamwhite
Texture Cache: Fix untracking on GPU remap
2024-02-11texture_cache: tweak iteration tracking changeLiam
2024-02-11texture_cache: avoid overestimation of ASTC texture sizesLiam
2024-02-11caches: make critical reclamation less eager and possible in more casesLiam
2024-02-10Texture Cache: Fix untracking on GPU remapFernando Sahmkow
2024-02-09nvnflinger/gpu: implement blendingLiam
2024-02-04VideoCore: Move Slot Vector to CommonFernando Sahmkow
2024-01-31video_core: consistently account for resolution scaling when renderingLiam
2024-01-31Texture Cache: make sparse texture table per channelFernando Sahmkow
2024-01-25Merge pull request #12499 from Kelebek1/timeliamwhite
Rework time services
2024-01-24Rework time service to fix time passing offline.Kelebek1
2024-01-18Core: Eliminate core/memory dependancies.Fernando Sahmkow
2024-01-18SMMU: Initial adaptation to video_core.Fernando Sahmkow
2023-12-26video_core: Fix buffer_row_length computation for linear compressed texturesGPUCode
2023-12-19Merge pull request #12382 from liamwhite/image-limitFernando S
renderer_vulkan: allow up to 7 swapchain images
2023-12-17Revert "video_core: use interval map for page count tracking"liamwhite
2023-12-16renderer_vulkan: allow up to 7 swapchain imagesLiam
2023-12-14video_core: use interval map for page count trackingLiam
2023-12-03texture_cache: fix max_element comparison functionLiam
2023-12-03renderer_vulkan: do not recreate swapchain for srgbLiam
2023-12-01texture_cache: use pedantic type namesLiam
2023-11-12renderer_vulkan: Introduce separate cmd buffer for uploadsGPUCode
2023-10-17Merge pull request #11747 from Kelebek1/image_alias_sample_namesliamwhite
Small things
2023-10-17Merge pull request #11788 from Squall-Leonhart/IFREMOVEDFernando S
[crash fix]brings back the removed if statement in util.cpp and adds the num_level test to it like previous discontinued PR
2023-10-15brings back the removed If statement and adds the num_level testSquall Leonhart
This resolves the out of bounds read/writes in the linear swizzler, it brings back the scaled TOTK Recall bug however, pending further work in the block size calculation. Recall is not glitched in the Dynamic FPS resolution mod to the degree that it is in the native yuzu scaler, this can be a workaround for the time being. The recall effect is constructed from multiple 320x180 texture slices, it breaking may have a similar origin to https://github.com/Ryujinx/Ryujinx/pull/5640 but it may also be connected to the other deficiencies identified in the Yuzu size calculations, such as no apparent implementation of slice testing for end of slce depth as opposed to full aligned size as implemented in https://github.com/Ryujinx/Ryujinx/pull/5220
2023-10-11Transition MSAA images to general layout without uploading dataKelebek1
2023-10-11Get out of render pass before query barriers, fix image names with samples > ↵Kelebek1
1, remove image alias bit
2023-10-11Merge pull request #11743 from Squall-Leonhart/IFREMOVEDFernando S
Fix mistaken usage of info.block instead of level_info.block
2023-10-11Fix mistaken usage of info.block instead of level_info.blockSquall-Leonhart
Fixed an error on my part, in the last change I had mistakenly passed unadjusted block info into FullUploadSwizzles and UnswizzleImage Revert (my mistaken changing of) the construction of SwizzleParameters in UnswizzleImage and FullUploadSwizzles to use level_info.block instead of info.block. This ensures that the block information used in the swizzling process is correctly adjusted for each mip level.
2023-10-10Merge pull request #11534 from Squall-Leonhart/IFREMOVEDliamwhite
Partial revert of #10433 (Texture Cache Util: Fix block depth adjustment on slices)
2023-10-09add Z32, FLOAT, UINT, UINT, UINT, LINEAR to format lookup tableSquall Leonhart
Should fix and close #11711
2023-10-06Implement X8_D24 formatKelebek1
2023-10-02ci: fix new codespell errorsLiam
2023-09-20Reuse part of my previous idea to to use num_levels to check within ↵Squall-Leonhart
AdjustMipBlockSize The partial revert was not enough for Tsukihime, this might do the trick
2023-09-18Merge pull request #11258 from Squall-Leonhart/Z16_Assert_Fixliamwhite
Fix a logged assert in the format lookup table for Z16
2023-09-18Partial revert of #10433Squall Leonhart
The If block in this change was causing some 2D textures to be treated as if their mip 0 was a 3D Slice, this could be ascertained as the same texture viewed from different distances would render fine, but then close up would look like a decoding failure. It also resulted in some 3D ASTC textures not being scaled appropriate leading to broken graphical effects such as the jagged TOTK recall animation being a circle, as the If block was only accepting the image based on its original info without any adjustments applied.
2023-09-11Look for the most recently modified image for presentKelebek1
2023-08-13Mark accelerted DMA destination buffers and images as GPU-modifiedKelebek1
2023-08-11Needed to make this an extra case so it didnt also start asserting in BOTW.Squall-Leonhart
Thanks Liam
2023-08-11Fix an assert in the format lookup table fir Z16Squall Leonhart
Came across this while looking into Asterix and Obelix XXL glitching