aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/buffer_cache/buffer_base.h
Commit message (Collapse)AuthorAgeFilesLines
* [video_core] Improve synchronization and refactor buffer cache timing logic ↵MaranBr2026-07-101-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#4182) This simplifies the GPU accuracy setting by removing the intermediate Balanced mode and setting High as the default on desktop platforms. It introduces a dedicated setting for GPU fence behavior, allowing the synchronization policy to be configured independently of GPU accuracy. The Vulkan buffer cache now tracks GPU recording timeline ticks and waits only when necessary, reducing unnecessary synchronization while maintaining correctness for hard-to-trace graphical bugs. GPU buffer readback has also been refined to synchronize only the affected upload regions when needed, and default DMA behavior has been updated to align with the new GPU accuracy model. ### TL;DR The fix for particles freezing and unfreezing in mid-air in `Super Mario Odyssey` has been improved, resulting in less of a performance hit. This game requires the new `Enable GPU Buffer Readback` option to be enabled to fix this issue. The vertex explosions that occurred in `Super Mario Bros. Wonder`, especially in World 4, have been completely eliminated. You can now enjoy a smooth experience without graphical glitches exploding across the screen. This game requires the new `GPU Fence Behavior` option to be set to `Strict` to fully fix this issue. The flickering issue inside certain Shrines in `The Legend of Zelda: Tears of the Kingdom` has also been fixed. For now, this game requires the new `GPU Fence Behavior` option to be set to `Accurate` to fully fix this issue. These options are intended to fix graphical bugs in games that require better synchronization behavior between CPU and GPU, so other games may be affected as well. Co-authored-by: xbzk <xbzk@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4182 Reviewed-by: Lizzie <lizzie@eden-emu.dev>
* [texture_cache, buffer_cache] Added TLS handling + changed command queue for ↵lizzie2026-02-201-1/+7
| | | | | | | | | | | | | | | | | | | | GPU threading. (#3579) (Merge of #3495 + #3108) This PR works around to simplify math operations on hot pointers inside the access and requests to the cache of buffers and texture cache, removing previous logic of indirection and replaced by a PoD approach. This will ensure less CPU times spended on the same request and flow directly into another chain of the render, in the same way, command queue currently uses an internal mutex that constraints the flow of data within the GPU threads, we're moving over a single command, I verified to keep using mutexes instead of internal mutex + mutex per operation, which are resolved by themselves. In simplier words, this aims to improve performance on those games and devices where the waits for next orders on GPU commands were heavier than a single verification. Co-Authored-by: @CamilleLaVey Co-Authored-by: @Lizzie Co-authored-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3579 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* SMMU: Initial adaptation to video_core.Fernando Sahmkow2024-01-181-2/+1
|
* GPU: Add Reactive flushingFernando Sahmkow2023-05-071-0/+9
|
* BufferCache: Fixes and address feedbackFernando Sahmkow2023-05-011-92/+7
|
* Clang: format and ficx compile errors.Fernando Sahmkow2023-04-291-13/+13
|
* Buffer Cache: Fully rework the buffer cache.Fernando Sahmkow2023-04-291-434/+25
|
* svc: Fix type consistency (exposed on macOS)Merry2023-02-211-1/+1
|
* buffer_base: Partially revert changes from #9559ameerj2023-02-081-6/+8
| | | | This fixes a regression where Yoshi's Crafted World (and potentially other titles) would enter an infinite loop when GPU Accuracy was set to "Normal"
* BufferBase: Don't ignore GPU pages.Fernando Sahmkow2023-01-051-8/+6
|
* general: fix compile for Apple ClangLiam2022-11-221-1/+1
|
* video_core: add option for pessimistic flushingLiam2022-08-251-1/+4
|
* code: dodge PAGE_SIZE #defineKyle Kienapfel2022-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | | Some header files, specifically for OSX and Musl libc define PAGE_SIZE to be a number This is great except in yuzu we're using PAGE_SIZE as a variable Specific example `static constexpr u64 PAGE_SIZE = u64(1) << PAGE_BITS;` PAGE_SIZE PAGE_BITS PAGE_MASK are all similar variables. Simply deleted the underscores, and then added YUZU_ prefix Might be worth noting that there are multiple uses in different classes/namespaces This list may not be exhaustive Core::Memory 12 bits (4096) QueryCacheBase 12 bits ShaderCache 14 bits (16384) TextureCache 20 bits (1048576, or 1MB) Fixes #8779
* general: Convert source file copyright comments over to SPDXMorph2022-04-231-3/+2
| | | | | This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
* buffer_cache: reset cached write bits after flushing invalidationsLiam2022-03-231-1/+2
|
* Garbage Collection: Make it more agressive on high priority mode.Fernando Sahmkow2021-08-291-2/+2
|
* Garbage Collection: Adress Feedback.Fernando Sahmkow2021-08-291-1/+8
|
* VideoCore: Rework Garbage Collection.Fernando Sahmkow2021-08-281-11/+2
|
* Buffer Cache: Address Feedback.Fernando Sahmkow2021-07-101-0/+5
|
* Videocore: Address Feedback & CLANG Format.Fernando Sahmkow2021-07-091-1/+1
|
* Buffer Cache: Fix High Downloads and don't predownload on Extreme.Fernando Sahmkow2021-07-091-6/+8
|
* Initial Reaper SetupReinUsesLisp2021-06-161-0/+11
| | | | WIP
* Fix GCC undefined behavior sanitizer.Markus Wick2021-06-101-0/+3
| | | | | | | | | * Wrong alignment in u64 LOG_DEBUG -> memcpy. * Huge shift exponent in stride calculation for linear buffer, unused result -> skipped. * Large shift in buffer cache if word = 0, skip checking for set bits. Non of those were critical, so this should not change any behavior. At least with the assumption, that the last one used masking behavior, which always yield continuous_bits = 0.
* buffer_cache: Heuristically detect stream buffersReinUsesLisp2021-02-131-0/+11
| | | | | | | Detect when a memory region has been joined several times and increase the size of the created buffer on those instances. The buffer is assumed to be a "stream buffer", increasing its size should stop us from constantly recreating it and fragmenting memory.
* buffer_base: Add support for cached CPU writesReinUsesLisp2021-02-131-61/+145
| | | | | | | | | | | | | | | | Some games usually write memory pages currently used by the GPU, causing rendering issues (e.g. flashing geometry and shadows on Link's Awakening). To workaround this issue, Guest CPU writes are delayed until the command buffer finishes processing, but the pages are updated immediately. The overall behavior is: - CPU writes are cached until they are flushed, they update the page state, but don't change the modification state. Cached writes stop pages from being flushed, in case games have meaningful data in it. - Command processing writes (e.g. push constants) update the page state and are marked to the command processor as dirty. They don't remove the state of cached writes.
* video_core: Resolve -Wdocumentation warningsLioncash2021-01-171-1/+1
| | | | Silences some -Wdocumentation warnings on Clang.
* buffer_cache/buffer_base: Add a range tracking buffer containerReinUsesLisp2021-01-131-0/+495
It keeps track of the modified CPU and GPU ranges on a CPU page granularity, notifying the given rasterizer about state changes in the tracking behavior of the buffer. Use a small vector optimization to store buffers smaller than 256 KiB locally instead of using free store memory allocations.