Refactor and enhance rendering pipeline

- Added new C# formatting rules in .editorconfig.
- Introduced `IKeyType`, `Key<T>`, and `Ptr<T>` structs.
- Updated `Result` and `Result<T>` for implicit conversions.
- Added AOT compatibility to project files.
- Introduced a `Camera` class and refactored namespaces.
- Enhanced rendering with bindless support and pipeline state management.
- Refactored `D3D12CommandBuffer` for new rendering features.
- Improved `D3D12PipelineLibrary` with disk caching methods.
- Added support for UAVs and raw buffers in `D3D12ResourceAllocator`.
- Improved shader compilation and reflection in `D3D12ShaderCompiler`.
- Refactored descriptor heap and swap chain initialization.
- Added enums and structs for rendering configurations.
- Expanded `ICommandBuffer` and `IPipelineLibrary` interfaces.
- Updated `MeshRenderPass` to align with the new pipeline.
- Consolidated namespaces and improved code maintainability.
This commit is contained in:
2025-11-01 22:30:08 +09:00
parent 9dc4f63e40
commit a8d7cd8828
41 changed files with 974 additions and 491 deletions

View File

@@ -2,6 +2,7 @@
public interface IHandleType;
public interface IIdentifierType;
public interface IKeyType;
public readonly struct Handle<T>
where T : IHandleType
@@ -93,4 +94,49 @@ public readonly struct Identifier<T>
{
return !a.Equals(b);
}
}
}
public readonly struct Key<T>
where T : IKeyType
{
public readonly ulong value;
public Key(ulong value)
{
this.value = value;
}
public static Key<T> Invalid => new(0);
public bool IsValid => this != Invalid;
public readonly override int GetHashCode()
{
return value.GetHashCode();
}
public readonly override bool Equals(object? obj)
{
return obj is Key<T> id && Equals(id);
}
public readonly bool Equals(Key<T> other)
{
return value == other.value;
}
public readonly int CompareTo(Key<T> other)
{
return value.CompareTo(other.value);
}
public static bool operator ==(Key<T> a, Key<T> b)
{
return a.Equals(b);
}
public static bool operator !=(Key<T> a, Key<T> b)
{
return !a.Equals(b);
}
}