summaryrefslogtreecommitdiffstats
path: root/src/video_core/buffer_cache/map_interval.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* video_core: Reimplement the buffer cacheReinUsesLisp2021-02-131-93/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reimplement the buffer cache using cached bindings and page level granularity for modification tracking. This also drops the usage of shared pointers and virtual functions from the cache. - Bindings are cached, allowing to skip work when the game changes few bits between draws. - OpenGL Assembly shaders no longer copy when a region has been modified from the GPU to emulate constant buffers, instead GL_EXT_memory_object is used to alias sub-buffers within the same allocation. - OpenGL Assembly shaders stream constant buffer data using glProgramBufferParametersIuivNV, from NV_parameter_buffer_object. In theory this should save one hash table resolve inside the driver compared to glBufferSubData. - A new OpenGL stream buffer is implemented based on fences for drivers that are not Nvidia's proprietary, due to their low performance on partial glBufferSubData calls synchronized with 3D rendering (that some games use a lot). - Most optimizations are shared between APIs now, allowing Vulkan to cache more bindings than before, skipping unnecesarry work. This commit adds the necessary infrastructure to use Vulkan object from OpenGL. Overall, it improves performance and fixes some bugs present on the old cache. There are still some edge cases hit by some games that harm performance on some vendors, this are planned to be fixed in later commits.
* map_interval: Change field order to address uninitialized field warningcomex2020-12-071-1/+2
| | | | | | Clang complains about `new_chunk`'s constructor using the then-uninitialized `first_chunk` (even though it's just to get a pointer into it).
* map_interval: Add interval allocator and drop hackReinUsesLisp2020-05-211-0/+41
| | | | | | | | | | Drop the std::list hack to allocate memory indefinitely. Instead use a custom allocator that keeps references valid until destruction. This allocates fixed chunks of memory and puts pointers in a free list. When an allocation is no longer used put it back to the free list, this doesn't heap allocate because std::vector doesn't change the capacity. If the free list is empty, allocate a new chunk.
* buffer_cache: Use boost::intrusive::set for cachingReinUsesLisp2020-05-211-14/+18
| | | | | | | | Instead of using boost::icl::interval_map for caching, use boost::intrusive::set. interval_map is intended as a container where the keys can overlap with one another; we don't need this for caching buffers and a std::set-like data structure that allows us to search with lower_bound is enough.
* buffer_cache: Remove shared pointersReinUsesLisp2020-05-211-13/+15
| | | | | Removing shared pointers is a first step to be able to use intrusive objects and keep allocations close to one another in memory.
* buffer_cache: Minor style changesReinUsesLisp2020-05-211-78/+16
| | | | | Minor style changes. Mostly done so I avoid editing it while doing other changes.
* BufferCache: Implement OnCPUWrite and SyncGuestHostFernando Sahmkow2020-04-221-0/+18
|
* Buffer Cache: Use vAddr instead of physical memory.Fernando Sahmkow2020-04-061-6/+6
|
* Buffer_Cache: Optimize and track written areas.Fernando Sahmkow2019-08-211-1/+22
|
* BufferCache: Rework mapping caching.Fernando Sahmkow2019-08-211-21/+41
|
* Buffer_Cache: Fixes and optimizations.Fernando Sahmkow2019-08-211-1/+1
|
* Video_Core: Implement a new Buffer CacheFernando Sahmkow2019-08-211-0/+48