refactor: address PR review feedback on meshlet LOD system

- Remove WORK_SUMMARY.md
- Use Debug.Assert for stride validation in ClodBuilder
- Fix ClodBuilder.Build return value after cluster disposal
- Update ClodPartition to accept AllocationHandle for return collections
- Standardize on camelCase for public fields in ClodConfig, ClodMesh, ClodBounds, etc.
- Remove redundant Resize calls where capacity suffices or Add is used
- Enforce stack allocator usage for internal temporary collections
- Ensure proper allocator propagation for collections returned from methods
This commit is contained in:
2026-03-17 02:18:37 +00:00
parent f7fb7da496
commit 92c503b253
5 changed files with 64 additions and 113 deletions

View File

@@ -1,16 +1,41 @@
using System;
using Ghost.MeshOptimizer;
using Misaki.HighPerformance;
namespace Ghost.Graphics.Meshlet;
public unsafe struct ClodMesh
{
public float* vertexPositions;
public nuint vertexCount;
public nuint vertexPositionsStride;
public float* vertexAttributes;
public nuint vertexAttributesStride;
public float* attributeWeights;
public nuint attributeCount;
public uint* indices;
public nuint indexCount;
public byte* vertexLock;
public uint attributeProtectMask;
}
public struct ClodGroup
{
public int depth;
public ClodBounds simplified;
}
public unsafe struct ClodCluster
{
public int refined;
public ClodBounds bounds;
public uint* indices;
public nuint indexCount;
public nuint vertexCount;
public float* vertexPositions;
public nuint vertexPositionsStride;
public float* vertexAttributes;
public nuint vertexAttributesStride;
public byte* vertexLock;
public float* attributeWeights;
public nuint attributeCount;
public uint attributeProtectMask;
}
public unsafe delegate int ClodOutputDelegate(void* context, ClodGroup group, ClodCluster* clusters, nuint clusterCount);