aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/buffer_cache
Commit message (Collapse)AuthorAgeFilesLines
...
| * shader: Interact texture buffers with buffer cacheReinUsesLisp2021-07-221-0/+138
| |
* | buffer_cache: Simplify clear logicReinUsesLisp2021-07-201-6/+2
|/ | | | | Use existing helper functions and avoid looping when only one buffer has to be active.
* Buffer cache: Fixes, Clang and Feedback.Fernando Sahmkow2021-07-151-10/+4
|
* Buffer Cache: Fixes to DMA Copy.Fernando Sahmkow2021-07-141-6/+7
|
* BufferCache: fix clearing on forced download.Fernando Sahmkow2021-07-141-10/+20
|
* DMAEngine: Accelerate BufferClearFernando Sahmkow2021-07-131-4/+61
|
* accelerateDMA: Fixes and feedback.Fernando Sahmkow2021-07-121-83/+54
|
* accelerateDMA: Accelerate Buffer Copies.Fernando Sahmkow2021-07-111-1/+80
|
* Buffer Cache: Address Feedback.Fernando Sahmkow2021-07-102-4/+9
|
* Buffer Cache: Fix GCC copmpile errorFernando Sahmkow2021-07-091-1/+0
|
* BufferCache: Additional download fixes.Fernando Sahmkow2021-07-091-21/+99
|
* Buffer Cache: Revert unnecessary range reduction.Fernando Sahmkow2021-07-091-29/+13
|
* Fence Manager: Force ordering on WFI.Fernando Sahmkow2021-07-091-38/+57
|
* Buffer Cache: Eliminate the AC Hack as the base game is fixed in Hades.Fernando Sahmkow2021-07-091-14/+4
|
* Fence Manager: Add fences on Reference Count.Fernando Sahmkow2021-07-091-3/+13
|
* Videocore: Address Feedback & CLANG Format.Fernando Sahmkow2021-07-092-78/+75
|
* Buffer Cache: Fix High Downloads and don't predownload on Extreme.Fernando Sahmkow2021-07-092-89/+120
|
* buffer_cache: Only flush downloaded sizeReinUsesLisp2021-06-261-2/+3
| | | | | | | 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.
* buffer_cache/texture_cache: Make GC functions privateReinUsesLisp2021-06-261-2/+2
|
* buffer_cache: Silence implicit cast warningReinUsesLisp2021-06-261-1/+1
|
* common: Replace common_sizes into user-literalsWunkolo2021-06-241-4/+7
| | | | | | | | | | | | | 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.
* Reaper: Change memory restrictions on TC depending on host memory on VK.Fernando Sahmkow2021-06-171-23/+25
|
* Reaper: Address Feedback.Fernando Sahmkow2021-06-161-6/+7
|
* Reaper: Setup settings and final tuning.Fernando Sahmkow2021-06-161-3/+4
|
* Reaper: Tune it up to be an smart GC.Fernando Sahmkow2021-06-161-5/+22
|
* Initial Reaper SetupReinUsesLisp2021-06-162-44/+105
| | | | 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: Simplify uniform disabling logicameerj2021-06-011-4/+7
|
* Fix two GCC 11 warnings: Unneeded copies.Markus Wick2021-05-291-2/+2
| | | | | std::move created an unneeded copy. iterating without reference also created copies.
* buffer_cache: Ensure null buffers cannot take the fast uniform bind pathameerj2021-05-161-1/+4
| | | | Fixes a crash in New Pokemon Snap
* common: Move settings to common from core.bunnei2021-04-141-1/+1
| | | | - Removes a dependency on core and input_common from common.
* buffer_cache: Heuristically decide to skip cache on uniform buffersReinUsesLisp2021-03-021-10/+35
| | | | | | | | | 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.
* buffer_cache: Add extra bytes to guest SSBOsReinUsesLisp2021-02-131-1/+7
| | | | | | | 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.
* gl_buffer_cache: Drop interop based parameter buffer workaroundsReinUsesLisp2021-02-131-2/+2
| | | | | Sacrify runtime performance to avoid generating kernel exceptions on Windows due to our abusive aliasing of interop buffer objects.
* buffer_cache: Heuristically detect stream buffersReinUsesLisp2021-02-132-6/+33
| | | | | | | 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_cache: Split CreateBuffer in separate functionsReinUsesLisp2021-02-131-29/+52
| | | | | Allow adding functionality to each function without making CreateBuffer more complex.
* buffer_cache: Skip cache on small uploads on VulkanReinUsesLisp2021-02-131-8/+9
| | | | | | | | 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.
* vk_staging_buffer_pool: Add stream buffer for small uploadsReinUsesLisp2021-02-131-8/+20
| | | | | | | | 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.
* video_core: Reimplement the buffer cacheReinUsesLisp2021-02-135-667/+1132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 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.
* video_core: Rewrite the texture cacheReinUsesLisp2020-12-301-12/+7
| | | | | | | | | | | | | | 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.
* video_core: Make use of ordered container contains() where applicableLioncash2020-12-071-1/+1
| | | | | | 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.
* Merge pull request #5149 from comex/xx-map-intervalbunnei2020-12-071-1/+2
|\ | | | | map_interval: Change field order to address uninitialized field warning
| * map_interval: Change field order to address uninitialized field warningcomex2020-12-061-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).
* | buffer_block: Mark interface as nodiscard where applicableLioncash2020-12-071-7/+7
| | | | | | | | Prevents logic errors from occurring from unused values.
* | buffer_block: Remove unnecessary includesLioncash2020-12-071-5/+0
|/ | | | Reduces the amount of dependencies the header pulls in.
* video_core: Remove all Core::System references in rendererReinUsesLisp2020-09-061-26/+25
| | | | | | | | | Now that the GPU is initialized when video backends are initialized, it's no longer needed to query components once the game is running: it can be done when yuzu is booting. This allows us to pass components between constructors and in the process remove all Core::System references in the video backend.
* buffer_cache: Eliminate redundant map lookup in MarkRegionAsWritten()Lioncash2020-07-201-6/+3
| | | | | | | | We can make use of emplace()'s return value to determine whether or not we need to perform an increment. emplace() performs no insertion if an element already exist, so this can eliminate a find() call.