Refactor RenderGraph barrier/state tracking system

Major overhaul of resource barrier and state tracking in RenderGraph:
- Introduce ResourceBarrierData for explicit (layout, access, sync) tracking.
- Separate aliasing and transition barriers; explicit aliasing support.
- Remove BufferHint; infer buffer usage from BufferUsage flags.
- Update TextureAccess/BufferAccess to include usage requirements.
- Improve enums (BarrierSync, BarrierAccess, BarrierLayout) for D3D12 alignment.
- Update D3D12CommandBuffer to use new barrier data and error handling.
- Make D3D12DescriptorHeap a class; add ReleaseSampler to IResourceDatabase.
- Reset resource pools and aliasing managers each frame.
- Batch and flush barriers efficiently per pass.
- Update HLSL mesh shader macros to [NumThreads].
- Remove obsolete code and improve documentation.
This refactor improves correctness, extensibility, and prepares for advanced features.
This commit is contained in:
2026-01-22 20:51:58 +09:00
parent 139312d73b
commit 4173ff2432
18 changed files with 395 additions and 488 deletions

View File

@@ -32,7 +32,7 @@ shader "Hidden/Blit"
float4 uv : TEXCOORD0;
};
[MESH_SHADER_THREADS(4)]
[NumThreads(4, 1, 1)]
[OUTPUT_TRIANGLE_TOPOLOGY]
void MSMain(
uint gtid : SV_GroupThreadID,
@@ -45,7 +45,6 @@ shader "Hidden/Blit"
float2 uv = float2(gtid & 1, (gtid >> 1) & 1);
verts[gtid].position = float4(uv * 2.0 - 1.0, 0.0, 1.0);
// verts[gtid].position.y *= -1.0;
verts[gtid].uv = float4(uv, 0.0, 0.0);
if (gtid == 0)

View File

@@ -49,7 +49,6 @@ struct Vertex
#define SAMPLE_TEXTURE2D_ARRAY(texId, sampId, uvw) SampleTextureArray(texId, sampId, uvw)
#define MESH_SHADER_THREADS(x) NumThreads(x, 1, 1)
#define OUTPUT_TRIANGLE_TOPOLOGY OutputTopology("triangle")
#define OUTPUT_LINE_TOPOLOGY OutputTopology("line")