Refactor descriptor handling and shader compilation
Refactored descriptor allocation and release logic by introducing `IDescriptorAllocator` and replacing `DescriptorHeapAllocator` with `D3D12DescriptorHeap`. Updated descriptor structs to include validation properties and improved memory management with `ReadOnlySpan`. Enhanced shader compilation by introducing `ShaderStage` and `CompilerVersion` enums, enabling more flexible and maintainable shader handling. Refactored `Mesh` to use `IBuffer` for vertex and index buffers, added bindless descriptor support, and improved resource cleanup. Updated `RenderSystem` and other components for better initialization, error handling, and disposal logic. General improvements to code readability and maintainability.
This commit is contained in:
@@ -64,7 +64,7 @@ internal unsafe class Renderer
|
||||
commandAllocator.Dispose();
|
||||
commandList.Dispose();
|
||||
backBuffer.Dispose();
|
||||
GraphicsPipeline.DescriptorAllocator.ReleaseRTV(rtvDescriptor);
|
||||
GraphicsPipeline.DescriptorAllocator.Release(rtvDescriptor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ internal unsafe class Renderer
|
||||
if (frameResource.backBuffer.Get() is not null)
|
||||
{
|
||||
var c = frameResource.backBuffer.Reset();
|
||||
GraphicsPipeline.DescriptorAllocator.ReleaseRTV(frameResource.rtvDescriptor);
|
||||
GraphicsPipeline.DescriptorAllocator.Release(frameResource.rtvDescriptor);
|
||||
}
|
||||
|
||||
frameResource.fenceValue = _frameResources[_backBufferIndex].fenceValue;
|
||||
|
||||
Reference in New Issue
Block a user