Commit Graph

16 Commits (aef647f53e54601b4dbfe1bf610a5ea6bc1ac810)

Author SHA1 Message Date
Fernando Sahmkow 590d9b7e1d Core: Clang format and other small issues. 2 years ago
Fernando Sahmkow 0a2536a0df SMMU: Initial adaptation to video_core. 2 years ago
Kelebek1 dfb7fc8293 Fix shader dumps with nvdisasm
skip fragment shaders when rasterizer is disabled
initialize env_ptrs
2 years ago
Fernando Sahmkow da440da9f5 Memory Tracking: Optimize tracking to only use atomic writes when contested with the host GPU 2 years ago
Liam 9737615948 general: fix compile for Apple Clang 3 years ago
Fernando Sahmkow 139ea93512 VideoCore: implement channels on gpu caches. 3 years ago
Kyle Kienapfel 14e9de6678 code: dodge PAGE_SIZE #define
Some header files, specifically for OSX and Musl libc define PAGE_SIZE to be a number
This is great except in yuzu we're using PAGE_SIZE as a variable

Specific example
`static constexpr u64 PAGE_SIZE = u64(1) << PAGE_BITS;`

PAGE_SIZE PAGE_BITS PAGE_MASK are all similar variables.
Simply deleted the underscores, and then added YUZU_ prefix

Might be worth noting that there are multiple uses in different classes/namespaces
This list may not be exhaustive

Core::Memory   12 bits (4096)
QueryCacheBase 12 bits
ShaderCache    14 bits (16384)
TextureCache   20 bits (1048576, or 1MB)

Fixes #8779
3 years ago
Morph 99ceb03a1c general: Convert source file copyright comments over to SPDX
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.
4 years ago
Lioncash 360a97ab54 video_core/shader_cache: Remove unused algorithm include 4 years ago
Lioncash 540ed72e99 video_core/shader_cache: Take std::span in RemoveShadersFromStorage()
Same behavior, but without the need to move into the function to avoid
an allocation.
4 years ago
ReinUsesLisp d621e96d0d shader: Initial OpenGL implementation 4 years ago
ReinUsesLisp 025b20f96a shader: Move pipeline cache logic to separate files
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.
4 years ago
Lioncash 969100d41a shader_cache: Make use of std::erase_if
Now that we use C++20, we can also make use of std::erase_if instead of
needing to do the erase-remove idiom.
5 years ago
ReinUsesLisp f6cb128eac shader_cache: Fix use-after-free and orphan invalidation cache entries
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.
5 years ago
MerryMage 8ae7154541 Rename PAGE_SHIFT to PAGE_BITS
macOS header files #define PAGE_SHIFT
5 years ago
ReinUsesLisp dc27252352 shader_cache: Implement a generic shader cache
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.
5 years ago