Add Ghost.Nvtt C# wrapper and integrate nvtt texture pipeline

- Introduce full managed C# wrapper for NVIDIA Texture Tools (nvtt) with safe handle classes, idiomatic APIs, and managed callback support.
- Integrate Ghost.Nvtt into Ghost.Editor.Core and Ghost.MicroTest; update TextureAssetHandler to use the new nvtt wrapper for texture compression.
- Add comprehensive end-to-end binding test (NvttBindingTest).
- Refactor D3D12 resource management: add deferred/immediate release APIs, update allocator/database usage, and ensure proper resource cleanup.
- Update project files for new native DLL layout and dependency versions.
- Minor API cleanups: EditorApplication properties, D3D12 input layout, and removal of obsolete code.
- Update shaders, tests, and documentation for new APIs and usage patterns.
This commit is contained in:
2026-02-23 17:13:10 +09:00
parent 78e3b4ef31
commit 93c58fa7fb
91 changed files with 3124 additions and 313 deletions

View File

@@ -1,11 +1,13 @@
using Ghost.Entities;
using Ghost.Graphics;
using Misaki.HighPerformance.Jobs;
namespace Ghost.Engine;
public interface IEngineContext : IDisposable
{
JobScheduler JobScheduler { get; }
IJobScheduler JobScheduler { get; }
IRenderSystem RenderSystem { get; }
}
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
@@ -17,13 +19,24 @@ internal class EngineEntryAttribute : Attribute
internal sealed partial class EngineCore : IEngineContext
{
private readonly JobScheduler _jobScheduler;
private readonly RenderSystem _renderSystem;
public JobScheduler JobScheduler => _jobScheduler;
public IJobScheduler JobScheduler => _jobScheduler;
public IRenderSystem RenderSystem => _renderSystem;
public EngineCore()
{
_jobScheduler = new JobScheduler(Environment.ProcessorCount - 2); // We -2 here, one for main thread, one for render thread
// TODO: Remove the windows dependency from RenderSystem.
var renderingConfig = new RenderingConfig
{
FrameBufferCount = 2,
GraphicsAPI = GraphicsAPI.Direct3D12,
};
_renderSystem = new RenderSystem(renderingConfig);
ComponentRegistry.GetOrRegisterComponentID<ManagedEntityRef>();
}