Skip to content

cache: add common/core caching mechanism

Niklas Haas requested to merge haasn/libplacebo:pl_cache into master

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 in pl_dispatch and pl_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 the sh_lut cache also look at LUT sizes etc., instead of only signature decided to just require users hash it into key for now, can be changed later when I'm less scared about breaking sh_lut
  • plug into gamut mapping LUT
  • plug into plplay?
  • testtttttttttting
Edited by Niklas Haas

Merge request reports

Loading