branchrust_reboot/main/buoyancy_optimizationcancel
13 Commits over 0 Days - ∞cph!
Fix water collision jobs in buoyancy throwing exceptions due to temp allocator use.
Further optimize GetBuoyancyWaterInfoBatched, let topology queries run in burst(no batch yet), batch water ignores.
Batched Buoyancy is now functional, but still missing some code and needs more optimization:
- Move buoyancy data into persistent arrays and reuse them.
- Add convar for switching between batched/old buoyancy.
- Add 3D positions for water info step.
- Add Ocean Simulation.GetHeights span overloads for interop with native arrays. (they still need a XZ3D step, otherwise we'd use the native arrays directly - TODO later.)
- Add GetBuoyancyWaterInfoBatched. (wip, missing entity fast paths for inside terrain/above water)
- Shim Ocean simulation into WaterSystem.GetHeightArray_Native, it's already batched, works for now.
Still heavily wip, run the watermap jobs from burst.
Start tracking buoyancy components to track them, split batches into deepsea/mainland.
merge from main to fix playmode
WIP, it's getting annoying to drag these changes across branches:
- Move a good chunk of buoyancy into burst.
- Add burst methods for filling buoyancy point data arrays.
- Introduce methods for running buoyancy in a batch rather than on every component separately.
Make terrain height and shore vector methods readonly to indicate that they're pure.
Add indexer to pooled array, add extension for copying managed arrays into native arrays. (intended for smaller collections)