feat: implement material palette management and core mesh asset handling infrastructure

This commit is contained in:
2026-04-27 22:55:55 +09:00
parent e3a02437c3
commit 631638f3fb
12 changed files with 69 additions and 6114 deletions

View File

@@ -33,8 +33,8 @@ public sealed partial class ResourceManager : IDisposable
private readonly MaterialPaletteStore _materialPalettes;
// TODO: Any better way? System.Threading.Lock is very fast though, it use spin lock before entering kernel.
// rw lock slim is an option but it has more overhead on read, and for more than 90% of the time we are reading, it may not be a good option.
// Plus UnsafeSlotMap use jagged array internally, which means we can have concurrent read and write on different slots without any issue, so we only need to lock when writing to those slots.
// rw lock slim is an option but it has more overhead on read. Because more than 90% of the time we are reading, it may not be a good option.
// Plus UnsafeSlotMap use jagged array internally, which means we can have concurrent read and write, but not add and remove, on different slots without any issue, so we only need to lock when writing to those slots.
private readonly Lock _meshWriteLock;
private readonly Lock _materialWriteLock;
private readonly Lock _shaderWriteLock;