cad-editor/src/scene/pipeline
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Hakan Seven 38c8583d27 perf(render): in-place GPU wire arena for move/edit (phase 4, OCS_WIRE_GPU_PATCH)
On a geometry edit the resident set gets a fresh content id, so the batched wire
path (build_wire_buffers) re-emits and re-uploads EVERY wire instance — the whole
buffer even when one line moved. Behind the OCS_WIRE_GPU_PATCH flag (default off,
native only), add a persistent per-entity instance arena: one long-lived
VERTEX|COPY_DST instance buffer + its WireConst storage, with a per-entity slab
table. An in-place edit (move / rotate / scale / colour — same segment count)
becomes a queue.write_buffer of just that entity`s slab.

Scope is deliberately IN-PLACE ONLY. draw_depth_map normalises each entity`s
draw-order z-bias by the block`s entity count, so an Add or Remove re-scales EVERY
entity`s z-bias — which a per-slab patch can`t honour — and a segment-count change
relocates the entity. patch() returns false for any of those (and for mesh-edge /
scissored sets), and the caller falls back to the identical full batched rebuild,
so correctness never rides on the fast path. An adversarial review of an earlier
append/tombstone design surfaced exactly these draw-order hazards; restricting to
in-place removes them while keeping the common interactive-edit win.

The Scene hands the changed handles to the arena via model_wire_gpu_patch,
recorded by try_resident_patch for the Model block and matched by content id in
prepare(); scissored paper viewports and mixed 2D/3D sets keep the batched path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-15 06:02:25 +03:00
..
face3d_gpu.rs fix(render): draw 3D surface fills at their real depth, not draw order 2026-07-02 01:23:27 +03:00
hatch_gpu.rs feat(web): render hatches on WebGL2 via a texture-backed renderer 2026-07-14 00:53:51 +03:00
hatch_web_gpu.rs feat(web): render hatches on WebGL2 via a texture-backed renderer 2026-07-14 00:53:51 +03:00
image_gpu.rs feat(render): double-single corners for the image pipeline 2026-06-23 18:28:52 +03:00
mesh_gpu.rs feat(render): draw ACIS solids as B-rep feature edges, meshes as tri edges 2026-07-04 17:57:00 +03:00
mod.rs perf(render): in-place GPU wire arena for move/edit (phase 4, OCS_WIRE_GPU_PATCH) 2026-07-15 06:02:25 +03:00
text_gpu.rs fix(text): show text in command previews (move/copy/etc) (#316) 2026-07-10 10:49:13 +03:00
uniforms.rs refactor: remove the legacy full view_proj (CPU cull now relative-to-eye) 2026-06-24 20:14:41 +03:00
viewcube.rs refactor(viewcube): shrink cube 30%, compact controls, centre UCS picker 2026-06-27 01:56:17 +03:00
wipeout_gpu.rs refactor(pipeline): name the real hatch renderer hatch_gpu, legacy → wipeout_gpu 2026-07-09 10:45:40 +03:00
wire_arena.rs perf(render): in-place GPU wire arena for move/edit (phase 4, OCS_WIRE_GPU_PATCH) 2026-07-15 06:02:25 +03:00
wire_gpu.rs perf(render): in-place GPU wire arena for move/edit (phase 4, OCS_WIRE_GPU_PATCH) 2026-07-15 06:02:25 +03:00