feat(resource): refactor heap management & suballocation

Major overhaul of GPU resource/heap management:
- Replace resource pooling and upload buffer logic with transient heap/page-based suballocation in ResourceManager.
- Add support for suballocation and heap flags/types, with D3D12 helpers.
- Remove ICommandBuffer.UploadBuffer/UploadTexture; add UpdateSubResources and CopyBuffer, move upload logic to RenderingContext.
- Refactor D3D12ResourceAllocator/Database for suballocation, heap flags, and mapping.
- Standardize on Handle<GPUBuffer> usage.
- Update meshlet/mesh utilities for new allocation handles and memory pools.
- Refactor RenderGraph and docs to use "heap" terminology.
- Use cpuFrame/gpuFrame consistently for frame sync.
- Add s2h.hlsl, s2h_3d.hlsl, s2h_scatter.hlsl shader debug libs.
- Miscellaneous fixes, cleanup, and dependency updates.

BREAKING CHANGE: Resource pooling and upload APIs replaced with new heap/page-based suballocation system. Update all buffer/texture creation and upload code to use new ResourceManager and ICommandBuffer methods.
This commit is contained in:
2026-04-03 01:48:49 +09:00
parent d03eb659fa
commit 6321b36ef5
47 changed files with 2552 additions and 526 deletions

View File

@@ -209,7 +209,7 @@ public class ShaderVisitor : GhostShaderParserBaseVisitor<object>
if (stop >= start)
{
var input = context.Start.InputStream;
hlsl.Code = input.GetText(new Antlr4.Runtime.Misc.Interval(start, stop));
hlsl.Code = input.GetText(new Interval(start, stop));
}
return hlsl;

View File

@@ -13,7 +13,7 @@ namespace Ghost.Editor.Properties {
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// A strongly-typed heap class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
@@ -48,7 +48,7 @@ namespace Ghost.Editor.Properties {
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// heap lookups using this strongly typed heap class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {

View File

@@ -1,6 +1,4 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/View/Controls/Docking/DockingLayout.xaml" />

View File

@@ -18,7 +18,7 @@ public partial class AssetPathToGlyphConverter : IValueConverter
var extension = Path.GetExtension(path).ToLowerInvariant();
// TODO: Use resource dictionary for icons.
// TODO: Use heap dictionary for icons.
return extension switch
{
".ghostscene" => "\uF159",

View File

@@ -10,9 +10,10 @@
<Setter.Value>
<ControlTemplate TargetType="local:DockDocument">
<Border Background="Transparent">
<ContentPresenter Content="{TemplateBinding Content}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
<ContentPresenter
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}" />
</Border>
</ControlTemplate>
</Setter.Value>

View File

@@ -157,7 +157,7 @@ public partial class DockGroup : DockContainer
Content = doc
};
existingTab.SetBinding(TabViewItem.HeaderProperty, new Microsoft.UI.Xaml.Data.Binding
existingTab.SetBinding(TabViewItem.HeaderProperty, new Binding
{
Source = doc,
Path = new PropertyPath(nameof(DockDocument.Title)),

View File

@@ -7,7 +7,12 @@
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="local:DockRegionHighlight">
<Border Background="{ThemeResource SystemControlHighlightAccentBrush}" Opacity="0.25" BorderBrush="{ThemeResource SystemControlHighlightAccentBrush}" BorderThickness="2" CornerRadius="4" />
<Border
Background="{ThemeResource SystemControlHighlightAccentBrush}"
BorderBrush="{ThemeResource SystemControlHighlightAccentBrush}"
BorderThickness="2"
CornerRadius="4"
Opacity="0.25" />
</ControlTemplate>
</Setter.Value>
</Setter>

View File

@@ -108,7 +108,7 @@ internal sealed partial class ProjectBrowser : UserControl
_isUpdatingSelection = false;
}
private async void PART_FilesView_DoubleTapped(object sender, Microsoft.UI.Xaml.Input.DoubleTappedRoutedEventArgs e)
private async void PART_FilesView_DoubleTapped(object sender, DoubleTappedRoutedEventArgs e)
{
if (PART_FilesView.SelectedItem is ExplorerItem selectedItem)
{