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.
28 lines
741 B
C#
28 lines
741 B
C#
using Ghost.Core;
|
|
using Ghost.Graphics.Contracts;
|
|
|
|
namespace Ghost.Graphics.RHI;
|
|
|
|
public interface IShaderPipeline
|
|
{
|
|
/// <summary>
|
|
/// Pipeline type
|
|
/// </summary>
|
|
PipelineType Type
|
|
{
|
|
get;
|
|
}
|
|
}
|
|
|
|
public interface IPipelineLibrary : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// Load pipeline library from disk.
|
|
/// </summary>
|
|
/// <param name="filePath">File path. If null, load default library.</param>
|
|
void InitializeLibrary(string? filePath);
|
|
void SaveLibraryToDisk(string filePath);
|
|
Result<GraphicsPipelineKey> CompilePSO(ref readonly GraphicsPSODescriptor descriptor, ref readonly GraphicsCompiledResult compiled);
|
|
Result<CBufferInfo, ResultStatus> GetCBufferInfo(ShaderPassKey passId);
|
|
}
|