Aggressively optimize multidraw command emission #32

Merged
embeddedt merged 5 commits from command-emit-opts into stonecutter 2026-08-11 18:46:23 -04:00
5 Commits
Author SHA1 Message Date
embeddedt 5bc47e50d2 Apply a few more cleanups to the SectionRenderDataUnsafe.Strategy API
ci / build (push) Successful in 2m47s
2026-08-11 18:45:45 -04:00
embeddedt 52d5989258 Refactor Strategy APIs a bit
ci / build (push) Successful in 2m56s
2026-08-10 21:43:53 -04:00
rdh ea12c39da3 compact unsorted render data
ci / build (push) Successful in 2m37s
2026-08-10 00:12:43 -04:00
rdh d34a4f6e2a coalesce more adjacent multidraw commands
ci / build (push) Successful in 2m31s
2026-08-09 23:50:40 -04:00
embeddedt 123a169a42 Aggressively optimize multidraw command emission
ci / build (push) Successful in 2m56s
This consists of multiple core architectural changes:

- Unsorted passes now use a more compact memory layout in SectionRenderDataUnsafe
- Runs of consecutive visible facings are merged into single draw commands (supersedes #31)
- Command assembly now uses multiple specialized loops depending on the region's properties, with computations that were previously per-section hoisted as far as possible
- Iterator allocations and virtual dispatch are avoided

One casualty is that the indirect multidraw emitter is likely slightly less efficient as a result of allowing higher-level code to exclusively work with MultiDrawBatch.
2026-07-31 21:53:30 -04:00