aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/buffer_cache
AgeCommit message (Collapse)Author
2021-07-22buffer_cache: Fix copy based uniform bindings trackingReinUsesLisp
2021-07-22buffer_cache: Reduce uniform buffer size from shader usageReinUsesLisp
Increases performance significantly on certain titles.
2021-07-22buffer_cache: Mark uniform buffers as dirty if any enable bit changesReinUsesLisp
2021-07-22shader: Initial OpenGL implementationReinUsesLisp
2021-07-22spirv: Implement image buffersReinUsesLisp
2021-07-22shader: Interact texture buffers with buffer cacheReinUsesLisp
2021-07-15Buffer cache: Fixes, Clang and Feedback.Fernando Sahmkow
2021-07-14Buffer Cache: Fixes to DMA Copy.Fernando Sahmkow
2021-07-14BufferCache: fix clearing on forced download.Fernando Sahmkow
2021-07-13DMAEngine: Accelerate BufferClearFernando Sahmkow
2021-07-12accelerateDMA: Fixes and feedback.Fernando Sahmkow
2021-07-11accelerateDMA: Accelerate Buffer Copies.Fernando Sahmkow
2021-07-10Buffer Cache: Address Feedback.Fernando Sahmkow
2021-07-09Buffer Cache: Fix GCC copmpile errorFernando Sahmkow
2021-07-09BufferCache: Additional download fixes.Fernando Sahmkow
2021-07-09Buffer Cache: Revert unnecessary range reduction.Fernando Sahmkow
2021-07-09Fence Manager: Force ordering on WFI.Fernando Sahmkow
2021-07-09Buffer Cache: Eliminate the AC Hack as the base game is fixed in Hades.Fernando Sahmkow
2021-07-09Fence Manager: Add fences on Reference Count.Fernando Sahmkow
2021-07-09Videocore: Address Feedback & CLANG Format.Fernando Sahmkow
2021-07-09Buffer Cache: Fix High Downloads and don't predownload on Extreme.Fernando Sahmkow
2021-06-26buffer_cache: Only flush downloaded sizeReinUsesLisp
Fixes a regression unintentionally introduced by the garbage collector. This makes regular memory downloads only flush the requested sizes. This negatively affected Koei Tecmo games.
2021-06-26buffer_cache/texture_cache: Make GC functions privateReinUsesLisp
2021-06-26buffer_cache: Silence implicit cast warningReinUsesLisp
2021-06-24common: Replace common_sizes into user-literalsWunkolo
Removes common_sizes.h in favor of having `_KiB`, `_MiB`, `_GiB`, etc user-literals within literals.h. To keep the global namespace clean, users will have to use: ``` using namespace Common::Literals; ``` to access these literals.
2021-06-17Reaper: Change memory restrictions on TC depending on host memory on VK.Fernando Sahmkow
2021-06-16Reaper: Address Feedback.Fernando Sahmkow
2021-06-16Reaper: Setup settings and final tuning.Fernando Sahmkow
2021-06-16Reaper: Tune it up to be an smart GC.Fernando Sahmkow
2021-06-16Initial Reaper SetupReinUsesLisp
WIP
2021-06-10Fix GCC undefined behavior sanitizer.Markus Wick
* 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.
2021-06-01buffer_cache: Simplify uniform disabling logicameerj
2021-05-29Fix two GCC 11 warnings: Unneeded copies.Markus Wick
std::move created an unneeded copy. iterating without reference also created copies.
2021-05-16buffer_cache: Ensure null buffers cannot take the fast uniform bind pathameerj
Fixes a crash in New Pokemon Snap
2021-04-14common: Move settings to common from core.bunnei
- Removes a dependency on core and input_common from common.
2021-03-02buffer_cache: Heuristically decide to skip cache on uniform buffersReinUsesLisp
Some games benefit from skipping caches (Pokémon Sword), and others don't (Animal Crossing: New Horizons). Add an heuristic to decide this at runtime. The cache hit ratio has to be ~98% or better to not skip the cache. There are 16 frames of buffer.
2021-02-13buffer_cache: Add extra bytes to guest SSBOsReinUsesLisp
Bind extra bytes beyond the guest API's bound range. This is due to some games like Astral Chain operating out of bounds. Binding the whole map range would be technically correct, but games have large maps that make this approach unaffordable for now.
2021-02-13gl_buffer_cache: Drop interop based parameter buffer workaroundsReinUsesLisp
Sacrify runtime performance to avoid generating kernel exceptions on Windows due to our abusive aliasing of interop buffer objects.
2021-02-13buffer_cache: Heuristically detect stream buffersReinUsesLisp
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.
2021-02-13buffer_cache: Split CreateBuffer in separate functionsReinUsesLisp
Allow adding functionality to each function without making CreateBuffer more complex.
2021-02-13buffer_cache: Skip cache on small uploads on VulkanReinUsesLisp
Ports from OpenGL the optimization to skip small 3D uniform buffer uploads. This will take advantage of the previously introduced stream buffer. Fixes instances where the staging buffer offset was being ignored.
2021-02-13vk_staging_buffer_pool: Add stream buffer for small uploadsReinUsesLisp
This uses a ring buffer similar to OpenGL's stream buffer for small uploads. This stops us from allocating several small buffers, reducing memory fragmentation and cache locality. It uses dedicated allocations when possible.
2021-02-13video_core: Reimplement the buffer cacheReinUsesLisp
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.
2021-02-13buffer_base: Add support for cached CPU writesReinUsesLisp
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.
2021-01-17video_core: Resolve -Wdocumentation warningsLioncash
Silences some -Wdocumentation warnings on Clang.
2021-01-13buffer_cache/buffer_base: Add a range tracking buffer containerReinUsesLisp
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.
2020-12-30video_core: Rewrite the texture cacheReinUsesLisp
The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage.The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage. This commit aims to address those issues.
2020-12-07video_core: Make use of ordered container contains() where applicableLioncash
With C++20, we can use the more concise contains() member function instead of comparing the result of the find() call with the end iterator.
2020-12-07Merge pull request #5149 from comex/xx-map-intervalbunnei
map_interval: Change field order to address uninitialized field warning
2020-12-07buffer_block: Mark interface as nodiscard where applicableLioncash
Prevents logic errors from occurring from unused values.