summaryrefslogtreecommitdiffstats
path: root/src/video_core/shader_cache.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* general: Convert source file copyright comments over to SPDXMorph2022-04-231-3/+2
| | | | | This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
* video_core/shader_cache: Remove unused algorithm includeLioncash2022-02-011-1/+0
|
* video_core/shader_cache: Take std::span in RemoveShadersFromStorage()Lioncash2022-02-011-1/+1
| | | | | Same behavior, but without the need to move into the function to avoid an allocation.
* shader: Initial OpenGL implementationReinUsesLisp2021-07-231-2/+21
|
* shader: Move pipeline cache logic to separate filesReinUsesLisp2021-07-231-148/+50
| | | | | | | | | Move code to separate files to be able to reuse it from OpenGL. This greatly simplifies the pipeline cache logic on Vulkan. Transform feedback state is not yet abstracted and it's still intrusively stored inside vk_pipeline_cache. It will be moved when needed on OpenGL.
* shader_cache: Make use of std::erase_ifLioncash2020-07-141-2/+2
| | | | | Now that we use C++20, we can also make use of std::erase_if instead of needing to do the erase-remove idiom.
* shader_cache: Fix use-after-free and orphan invalidation cache entriesReinUsesLisp2020-07-011-29/+41
| | | | | | | | | | | | | This fixes some cases where entries could have been removed multiple times reading freed memory. To address this issue this commit removes duplicates from entries marked for removal and sorts out the removal process to fix another use-after-free situation. Another issue fixed in this commit is orphan invalidation cache entries. Previously only the entries that were invalidated in the current operations had its entries removed. This led to more use-after-free situations when these entries were actually invalidated but referenced an object that didn't exist.
* Rename PAGE_SHIFT to PAGE_BITSMerryMage2020-06-181-5/+5
| | | | macOS header files #define PAGE_SHIFT
* shader_cache: Implement a generic shader cacheReinUsesLisp2020-06-071-0/+228
Implement a generic shader cache for fast lookups and invalidations. Invalidations are cheap but expensive when a shader is invalidated. Use two mutexes instead of one to avoid locking invalidations for lookups and vice versa. When a shader has to be removed, lookups are locked as expected.