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.
This commit is contained in:
ReinUsesLisp
2020-05-22 20:53:27 -03:00
parent 03fd5aa384
commit dc27252352
2 changed files with 229 additions and 0 deletions

View File

@ -93,6 +93,7 @@ add_library(video_core STATIC
renderer_opengl/utils.h
sampler_cache.cpp
sampler_cache.h
shader_cache.h
shader/decode/arithmetic.cpp
shader/decode/arithmetic_immediate.cpp
shader/decode/bfe.cpp