Render graph: native pass merging & heap-based aliasing

Major architecture upgrade:
- Add native render pass merging (hardware pass grouping, load/store op inference)
- Implement heap-based aliasing for textures & buffers (D3D12-style)
- Unify resource model: buffers and textures in one registry
- Extend builder API for buffer creation/usage, access flags, hints
- Improve barrier/state tracking (buffer hints, indirect argument state)
- Update caching, hashing, and debug output for new model
- Add enums/structs: AttachmentLoadOp, StoreOp, BufferHint, etc.
- D3D12 backend: support named resources, temp upload buffers, correct heap usage
- Update docs, benchmarks, and project files for new features

Brings render graph closer to AAA engine standards, enabling efficient memory usage, lower driver overhead, and a more flexible API.
This commit is contained in:
2026-01-16 01:59:33 +09:00
parent ac36bbf8c7
commit 1c155f962c
51 changed files with 2002 additions and 2314 deletions

View File

@@ -224,6 +224,22 @@ public struct PassRenderTargetDesc
get; set;
}
/// <summary>
/// Specifies how to load the render target at the start of the render pass.
/// </summary>
public AttachmentLoadOp LoadOp
{
get; set;
}
/// <summary>
/// Specifies how to store the render target at the end of the render pass.
/// </summary>
public AttachmentStoreOp StoreOp
{
get; set;
}
}
public struct PassDepthStencilDesc
@@ -243,6 +259,38 @@ public struct PassDepthStencilDesc
get; set;
}
/// <summary>
/// Specifies how to load the depth buffer at the start of the render pass.
/// </summary>
public AttachmentLoadOp DepthLoadOp
{
get; set;
}
/// <summary>
/// Specifies how to store the depth buffer at the end of the render pass.
/// </summary>
public AttachmentStoreOp DepthStoreOp
{
get; set;
}
/// <summary>
/// Specifies how to load the stencil buffer at the start of the render pass.
/// </summary>
public AttachmentLoadOp StencilLoadOp
{
get; set;
}
/// <summary>
/// Specifies how to store the stencil buffer at the end of the render pass.
/// </summary>
public AttachmentStoreOp StencilStoreOp
{
get; set;
}
}
@@ -704,7 +752,7 @@ public struct SwapChainTarget
{
Type = SwapChainTargetType.WindowHandle,
WindowHandle = hwnd,
CompositionSurface = null
CompositionSurface = 0
};
}
@@ -878,3 +926,42 @@ public enum ComparisonFunction
GreaterEqual,
Always
}
/// <summary>
/// Specifies how to load attachment contents at the start of a render pass.
/// </summary>
public enum AttachmentLoadOp
{
/// <summary>
/// Load existing contents from memory. Use when you need to preserve previous data.
/// </summary>
Load,
/// <summary>
/// Clear the attachment to a specified value. Use when you want to start with a clean slate.
/// </summary>
Clear,
/// <summary>
/// Don't care about previous contents. Use when you'll overwrite all pixels (fullscreen pass).
/// On tile-based deferred renderers (TBDR), this can save significant memory bandwidth.
/// </summary>
DontCare
}
/// <summary>
/// Specifies how to store attachment contents at the end of a render pass.
/// </summary>
public enum AttachmentStoreOp
{
/// <summary>
/// Store the contents to memory for later use.
/// </summary>
Store,
/// <summary>
/// Discard the contents (not needed after this pass).
/// On tile-based deferred renderers (TBDR), this can save significant memory bandwidth.
/// </summary>
DontCare
}