cache: add common/core caching mechanism
Motivated by #299 (closed)
This mechanism should be more pluggable and less opaque than the previous ad-hoc dispatch cache, and gives the user better control over exactly when and where stuff is cached (or not).
TODO:
-
allow plugging in external pl_cache
inpl_dispatch
andpl_renderer
at create time -
re-add ability to use cache callbacks instead of save/load -
add more fine-grained memory management on load (to allow mmap'd cache) -
maybe add internal file-based cache callback?decided to de-emphasize callbacks, so this would have to be done via save/load wrappers, not worth it atm -
plug into other things worth caching (shader objects? 3DLUTs? gamut mapping LUTs?) -
split off ICC cache from shader cache and don't inherit pl_gpu cache unless 3DLUT small -
plug into d3d11 pl_pass cache -
plug into opengl pl_pass cache -
make thedecided to just require users hash it into key for now, can be changed later when I'm less scared about breaking sh_lutsh_lut
cache also look at LUT sizes etc., instead of only signature -
plug into gamut mapping LUT -
plug into plplay? -
testtttttttttting
Edited by Niklas Haas