Render graph integration and resource management refactor

Introduces a full-featured render graph system with pass culling, resource aliasing, and automatic barrier generation. Refactors resource and barrier APIs, improves error handling, and unifies result types. Renderer and render passes now use the new graph-based workflow. Updates shader includes, adds a blit shader, and improves HLSL parsing. Removes dynamic descriptor heaps in favor of persistent ones. Project file now includes the render graph module. Lays the foundation for advanced rendering features and improved memory efficiency.
This commit is contained in:
2026-01-21 18:32:03 +09:00
parent 1c155f962c
commit 92b966fe0d
62 changed files with 4843 additions and 621 deletions

View File

@@ -294,28 +294,41 @@ public struct PassDepthStencilDesc
}
[StructLayout(LayoutKind.Explicit)]
public struct BarrierDesc
{
public Handle<GPUResource> Resource
public struct barrierdesc_transition
{
get; set;
public Handle<GPUResource> resource;
public ResourceState stateBefore;
public ResourceState stateAfter;
}
public ResourceState StateBefore
public struct barrierdesc_aliasing
{
get; set;
public Handle<GPUResource> resourceBefore;
public Handle<GPUResource> resourceAfter;
}
public ResourceState StateAfter
public struct barrierdesc_uav
{
get; set;
public Handle<GPUResource> resource;
}
[FieldOffset(0)]
public BarrierType type;
[FieldOffset(4)]
public barrierdesc_transition transition;
[FieldOffset(4)]
public barrierdesc_aliasing aliasing;
[FieldOffset(4)]
public barrierdesc_uav uav;
}
public struct ResourceDesc
{
[StructLayout(LayoutKind.Explicit)]
private struct resource_union
internal struct resource_union
{
[FieldOffset(0)]
public TextureDesc textureDescription;
@@ -323,7 +336,7 @@ public struct ResourceDesc
public BufferDesc bufferDescription;
}
private resource_union _desc;
internal resource_union _desc;
public TextureDesc TextureDescription
{
@@ -774,9 +787,17 @@ public enum SwapChainTargetType
}
[Flags]
public enum ResourceState
public enum BarrierType : int
{
Transition,
Aliasing,
UAV
}
[Flags]
public enum ResourceState : int
{
Auto = -1,
Common = 0,
VertexAndConstantBuffer = 1 << 0,
IndexBuffer = 1 << 1,