summaryrefslogtreecommitdiffstats
path: root/src/video_core/buffer_cache/buffer_base.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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.