Refactor and enhance resource management and rendering

Updated multiple components to improve encapsulation, maintainability, and performance. Key changes include:

- Upgraded package dependencies in project files.
- Refactored `Mesh` and `RenderingContext` to use properties and added support for per-object constant buffers.
- Improved resource management in `D3D12CommandBuffer`, `D3D12CommandQueue`, and `D3D12ResourceAllocator` with better encapsulation and disposal handling.
- Added validation for constant buffer sizes in `D3D12PipelineLibrary`.
- Simplified `MeshBuilder` methods to accept allocators and removed hardcoded values.
- Enhanced debugging with `GPUResourceLeakException` and resource tracking updates.
- Updated shaders and rendering logic for testing, including hardcoded triangle rendering.
- Removed redundant base classes and interfaces for cleaner code structure.
This commit is contained in:
2025-11-26 01:48:24 +09:00
parent dfe786a2aa
commit 0720444c2c
40 changed files with 1008 additions and 903 deletions

View File

@@ -166,7 +166,7 @@ public ref struct GraphicsPSODescriptor
}
}
public readonly record struct CBufferPropertyInfo
public readonly struct CBufferPropertyInfo
{
public string Name
{
@@ -184,7 +184,7 @@ public readonly record struct CBufferPropertyInfo
}
}
public readonly record struct CBufferInfo
public readonly struct CBufferInfo
{
public string Name
{

View File

@@ -24,9 +24,6 @@ public interface ICommandBuffer : IDisposable
get;
}
/// <summary>
/// Gets the name of the command buffer.
/// </summary>
string Name
{
get;

View File

@@ -14,7 +14,7 @@ public interface IShaderPipeline
}
}
public interface IPipelineLibrary
public interface IPipelineLibrary : IDisposable
{
/// <summary>
/// Load pipeline library from disk.

View File

@@ -5,7 +5,7 @@ using Ghost.Graphics.Core;
namespace Ghost.Graphics.RHI;
public interface IResourceAllocator
public interface IResourceAllocator : IDisposable
{
/// <summary>
/// Creates a texture resource

View File

@@ -11,7 +11,7 @@ public interface IResourceReleasable
void ReleaseResource(IResourceDatabase database);
}
public interface IResourceDatabase
public interface IResourceDatabase : IDisposable
{
/*
/// <summary>