Refactor core systems and improve resource management

- Updated dependencies, including `Misaki.HighPerformance` and `TerraFX.Interop`.
- Refactored `Result` struct for better error handling and chaining.
- Removed `Ptr<T>` struct as it was no longer necessary.
- Enhanced `Win32Utility` with `Attach` and `Dispose` methods.
- Improved `ProjectService` and `AppStateMachine` with `Result` integration.
- Refactored `IShaderCompiler` to support SPIR-V cross-compilation and pass-level compilation.
- Standardized Direct3D12 resource management with `UniquePtr` and added `D3D12Object` base class.
- Improved shader reflection validation and pipeline creation in `D3D12PipelineLibrary`.
- Updated `SDLCompiler` for better error handling during shader generation.
- Enhanced logging, debugging, and code readability across the codebase.
- Performed general code cleanup, including unused namespace removal and naming consistency.
This commit is contained in:
2025-11-23 15:02:37 +09:00
parent 5c4e1a3350
commit dfe786a2aa
46 changed files with 1193 additions and 733 deletions

View File

@@ -73,17 +73,17 @@ internal partial class CreateProjectViewModel(INotificationService notificationS
}
var result = await projectService.CreateProjectAsync(ProjectName, ProjectLocation, EngineData.s_engineVersion, SelectedTemplate.Value.directory);
if (!result.success)
if (result.IsFailure)
{
notificationService.ShowNotification(result.message, MessageType.Error);
notificationService.ShowNotification(result.Message, MessageType.Error);
return;
}
try
{
await stateService.TransitionToAsync(StateKey.EngineEditor, result.value);
await stateService.TransitionToAsync(StateKey.EngineEditor, result.Value);
}
catch (System.Exception e)
catch (Exception e)
{
notificationService.ShowNotification($"Failed to load project: {e.Message}", MessageType.Error);
}

View File

@@ -66,14 +66,14 @@ internal partial class OpenProjectViewModel(ProjectService projectService, INoti
if (rootFolder != null)
{
var result = await projectService.AddProjectFromDirectoryAsync(rootFolder.Path);
if (result.success)
if (result.IsSuccess)
{
projects.Add(result.value);
projects.Add(result.Value);
goto CloseDropPanel;
}
else
{
errorMessage = result.message;
errorMessage = result.Message;
}
}
}