Update asset system for deferred allocation & add unit tests
Modernize Misaki.HighPerformance dependencies. Refactor texture asset creation to use deferred resource slots via CreateEmpty(). Remove fallback resource fields and update texture resolution logic. Add CreateEmpty() to resource database interfaces. Introduce comprehensive unit tests with mocks for asset management. Enable unsafe code in tests.
This commit is contained in:
@@ -442,6 +442,15 @@ internal unsafe class D3D12ResourceDatabase : IResourceDatabase
|
||||
}
|
||||
}
|
||||
|
||||
public Handle<GPUResource> CreateEmpty()
|
||||
{
|
||||
lock (_writeLock)
|
||||
{
|
||||
var id = _resources.Add(default, out var generation);
|
||||
return new Handle<GPUResource>(id, generation);
|
||||
}
|
||||
}
|
||||
|
||||
public void* MapResource(Handle<GPUResource> handle, uint subResource, ResourceRange? readRange)
|
||||
{
|
||||
var r = GetResourceRecord(handle);
|
||||
|
||||
Reference in New Issue
Block a user