This is a first attempt to get rid of of reference counting #1413
Basically all threads execute a global sync point, this allows
determining a time when all temporary resources (such as meshes on the
client side used in lighting on other threads) have been freed with 100%
certainty.
Remaining work:
- [x] Implement the sync point
- [x] Implement free lists and free the resources
- [x] Determine if this is worth it performance wise
- [x] Use this for chunk meshes
- [x] Remove reference counting and the locks on the chunk storage data
structure
- [x] Measure performance of gathering many light samples and compare it
with master → around 15% reduction in time
- [x] Cleanup some unused things (mesh free list)
Related to: #1507closes#1533
I'm pretty sure that the rest of the moving into a comptime mod
interface can be done in a future pr
---------
Co-authored-by: Krzysztof Wiśniewski <argmaster.world@gmail.com>