feat: implement material palette management and core mesh asset handling infrastructure
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user