aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/buffer_cache
Commit message (Collapse)AuthorAgeFilesLines
* buffer_cache: Remove unused small_vector in CommitAsyncFlushesHigh()Lioncash2021-07-271-1/+0
| | | | | Given this is non-trivial, the constructor is required to execute, so this removes a bit of redundant codegen.
* Merge pull request #6585 from ameerj/hadesbunnei2021-07-251-32/+237
|\ | | | | Shader Decompiler Rewrite
| * buffer_cache: Fix debugging leftoverReinUsesLisp2021-07-221-1/+1
| |
| * buffer_cache: Fix size reductions not having in mind bind sizesReinUsesLisp2021-07-221-7/+23
| | | | | | | | | | A buffer binding can change between shaders without changing the shaders. This lead to outdated bindings on OpenGL.
| * buffer_cache: Invalidate fast buffers on computeReinUsesLisp2021-07-221-0/+1
| |
| * buffer_cache: Fix copy based uniform bindings trackingReinUsesLisp2021-07-221-4/+15
| |
| * buffer_cache: Reduce uniform buffer size from shader usageReinUsesLisp2021-07-221-16/+26
| | | | | | | | Increases performance significantly on certain titles.
| * buffer_cache: Mark uniform buffers as dirty if any enable bit changesReinUsesLisp2021-07-221-5/+5
| |
| * shader: Initial OpenGL implementationReinUsesLisp2021-07-221-19/+34
| |
| * spirv: Implement image buffersReinUsesLisp2021-07-221-5/+19
| |
| * 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.