[perf] WebGPU GPU-owned instance runs upload one writeBuffer per element (RenderingElement3D-WebGPU.cpp) #131
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Catcrafts/Crafter.Graphics#131
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found by an adversarially-verified performance audit (confirmed real after a skeptic pass).
Location:
implementations/Crafter.Graphics-RenderingElement3D-WebGPU.cpp:148-151Severity: low · Effort: moderate · Category: api-usage
Problem
For
transformOwnedByGpuruns, oneFlushDeviceRangeper element pushes 16 strided bytes each, paying per-call WebGPU validation/encode/JS-boundary cost; the CPU-driven arm correctly batches. Currently latent —transformOwnedByGpuis set nowhere in-repo (per the file's own no-op-refactor comment).Fix
Store instance metadata in a separate contiguous host array and upload the run in one
FlushDeviceRange, or write the full run once and let the compute pass overwrite transforms.