Refactor and optimize rendering pipeline

- Added `<IsTrimmable>` property in project files for trimming.
- Replaced bindless texture types with non-bindless equivalents.
- Refactored `ShaderDescriptor` and `ShaderPass` for better modularity.
- Introduced `ShaderDescriptorExtensions` for property size calculations.
- Simplified constant buffer handling in `Material.cs`.
- Improved resource management in `D3D12` components.
- Added support for static meshes and optimized resource barriers.
- Refactored shader code generation and property merging in `SDLCompiler`.
- Removed unused or redundant code (e.g., `IncludesBlock` parser).
- Updated comments, documentation, and error handling for clarity.
This commit is contained in:
2025-11-28 18:58:50 +09:00
parent 0720444c2c
commit bd97d233cb
49 changed files with 842 additions and 1025 deletions

View File

@@ -48,11 +48,6 @@ public interface IFenceSynchronizer
public interface IRenderSystem : IFenceSynchronizer, IDisposable
{
RenderingConfig Config
{
get;
}
IGraphicsEngine GraphicsEngine
{
get;
@@ -80,8 +75,8 @@ internal class RenderSystem : IRenderSystem
public FrameResource()
{
cpuReadyEvent = new(false);
gpuReadyEvent = new(true);
cpuReadyEvent = new AutoResetEvent(false);
gpuReadyEvent = new AutoResetEvent(true);
}
public void Dispose()
@@ -105,7 +100,6 @@ internal class RenderSystem : IRenderSystem
private bool _isRunning;
private bool _disposed;
public RenderingConfig Config => _config;
public IGraphicsEngine GraphicsEngine => _graphicsEngine;
public bool IsRunning => _isRunning;
@@ -123,16 +117,16 @@ internal class RenderSystem : IRenderSystem
_ => throw new NotSupportedException($"Graphics API {config.GraphicsAPI} is not supported.")
};
_shutdownEvent = new(false);
_shutdownEvent = new AutoResetEvent(false);
// Create frame resources for synchronization
_frameResources = new FrameResource[config.FrameBufferCount];
for (var i = 0; i < config.FrameBufferCount; i++)
{
_frameResources[i] = new();
_frameResources[i] = new FrameResource();
}
_renderThread = new(RenderLoop)
_renderThread = new Thread(RenderLoop)
{
IsBackground = true,
Name = "Graphics Render Thread",