Add mesh shader support to rendering context and fix some bugs.

This commit is contained in:
2025-11-05 09:37:54 +00:00
parent 3bcf0ad539
commit b3eeb8d366
8 changed files with 65 additions and 28 deletions

View File

@@ -106,7 +106,7 @@ internal class D3D12ResourceDatabase : IResourceDatabase, IDisposable
private readonly UnsafeSlotMap<Mesh> _meshes;
private readonly UnsafeSlotMap<Material> _materials;
private readonly DynamicArray<Shader?> _shaders; // NOTE: We use a simple list since shader is not frequently added/removed. This can save 4 bytes for each ecs component.
private readonly Dictionary<ShaderPassKey, ShaderPass> _shaderPasses;
private readonly Dictionary<ShaderPassKey, ShaderPass> _shaderPasses; // NOTE: The reason we use Dictionary here is that ShaderPassKey is a presistence identifier across multiple application sessions.
private bool _disposed;