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

@@ -176,7 +176,13 @@ public unsafe partial struct EntityQuery
public readonly ComponentIterator<T0> GetComponentIterator<T0>()
where T0 : unmanaged, IComponent
{
return new ComponentIterator<T0>(_matchingArchetypes.AsReadOnly(), _mask, World.GetWorld(_worldID).GetValueOrThrow());
var world = World.GetWorld(_worldID);
if (world is null)
{
return default;
}
return new ComponentIterator<T0>(_matchingArchetypes.AsReadOnly(), _mask, world);
}
public readonly ref struct ComponentIterator<T0, T1>
@@ -373,7 +379,13 @@ public unsafe partial struct EntityQuery
where T0 : unmanaged, IComponent
where T1 : unmanaged, IComponent
{
return new ComponentIterator<T0, T1>(_matchingArchetypes.AsReadOnly(), _mask, World.GetWorld(_worldID).GetValueOrThrow());
var world = World.GetWorld(_worldID);
if (world is null)
{
return default;
}
return new ComponentIterator<T0, T1>(_matchingArchetypes.AsReadOnly(), _mask, world);
}
public readonly ref struct ComponentIterator<T0, T1, T2>
@@ -580,7 +592,13 @@ public unsafe partial struct EntityQuery
where T1 : unmanaged, IComponent
where T2 : unmanaged, IComponent
{
return new ComponentIterator<T0, T1, T2>(_matchingArchetypes.AsReadOnly(), _mask, World.GetWorld(_worldID).GetValueOrThrow());
var world = World.GetWorld(_worldID);
if (world is null)
{
return default;
}
return new ComponentIterator<T0, T1, T2>(_matchingArchetypes.AsReadOnly(), _mask, world);
}
public readonly ref struct ComponentIterator<T0, T1, T2, T3>
@@ -797,7 +815,13 @@ public unsafe partial struct EntityQuery
where T2 : unmanaged, IComponent
where T3 : unmanaged, IComponent
{
return new ComponentIterator<T0, T1, T2, T3>(_matchingArchetypes.AsReadOnly(), _mask, World.GetWorld(_worldID).GetValueOrThrow());
var world = World.GetWorld(_worldID);
if (world is null)
{
return default;
}
return new ComponentIterator<T0, T1, T2, T3>(_matchingArchetypes.AsReadOnly(), _mask, world);
}
public readonly ref struct ComponentIterator<T0, T1, T2, T3, T4>
@@ -1024,7 +1048,13 @@ public unsafe partial struct EntityQuery
where T3 : unmanaged, IComponent
where T4 : unmanaged, IComponent
{
return new ComponentIterator<T0, T1, T2, T3, T4>(_matchingArchetypes.AsReadOnly(), _mask, World.GetWorld(_worldID).GetValueOrThrow());
var world = World.GetWorld(_worldID);
if (world is null)
{
return default;
}
return new ComponentIterator<T0, T1, T2, T3, T4>(_matchingArchetypes.AsReadOnly(), _mask, world);
}
public readonly ref struct ComponentIterator<T0, T1, T2, T3, T4, T5>
@@ -1261,7 +1291,13 @@ public unsafe partial struct EntityQuery
where T4 : unmanaged, IComponent
where T5 : unmanaged, IComponent
{
return new ComponentIterator<T0, T1, T2, T3, T4, T5>(_matchingArchetypes.AsReadOnly(), _mask, World.GetWorld(_worldID).GetValueOrThrow());
var world = World.GetWorld(_worldID);
if (world is null)
{
return default;
}
return new ComponentIterator<T0, T1, T2, T3, T4, T5>(_matchingArchetypes.AsReadOnly(), _mask, world);
}
public readonly ref struct ComponentIterator<T0, T1, T2, T3, T4, T5, T6>
@@ -1508,7 +1544,13 @@ public unsafe partial struct EntityQuery
where T5 : unmanaged, IComponent
where T6 : unmanaged, IComponent
{
return new ComponentIterator<T0, T1, T2, T3, T4, T5, T6>(_matchingArchetypes.AsReadOnly(), _mask, World.GetWorld(_worldID).GetValueOrThrow());
var world = World.GetWorld(_worldID);
if (world is null)
{
return default;
}
return new ComponentIterator<T0, T1, T2, T3, T4, T5, T6>(_matchingArchetypes.AsReadOnly(), _mask, world);
}
public readonly ref struct ComponentIterator<T0, T1, T2, T3, T4, T5, T6, T7>
@@ -1765,7 +1807,13 @@ public unsafe partial struct EntityQuery
where T6 : unmanaged, IComponent
where T7 : unmanaged, IComponent
{
return new ComponentIterator<T0, T1, T2, T3, T4, T5, T6, T7>(_matchingArchetypes.AsReadOnly(), _mask, World.GetWorld(_worldID).GetValueOrThrow());
var world = World.GetWorld(_worldID);
if (world is null)
{
return default;
}
return new ComponentIterator<T0, T1, T2, T3, T4, T5, T6, T7>(_matchingArchetypes.AsReadOnly(), _mask, world);
}
}