Files
OneCAD-Draft/src/scene/pipeline
Hakan SevenandClaude Opus 4.8 d0dcc6cb4c fix(render): size mesh-batch buffers to the device limit
The batch split at a fixed 6M-vertex cap that assumed 40 B/vertex, but
MeshVertex grew to 52 B when the double-single `position_low` field was
added — so a full chunk was 6M x 52 = 312 MB, past wgpu's 256 MB
max_buffer_size, and Device::create_buffer panicked on large models.

Derive the caps from device.limits().max_buffer_size and the real vertex
size, bound both the vertex buffer and the (fatter) wire-index buffer,
and split any single mesh too large for one chunk into triangle-soup
sub-chunks so no batch buffer can exceed the device limit.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 10:20:24 +03:00
..