No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Catcrafts/Crafter.Graphics!156
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "claude/issue-155"
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?
Resolves #155.
What
Issue #155 asked for an actual measurement of the net performance gain
from #40 to current master, in a representative scene (Sponza). This adds a
headless benchmark harness (
examples/SponzaBench) and reports the measuredresult.
SponzaBench is the native Vulkan Sponza RT scene, but it times setup and a
measured
Render()loop and printsBENCH …lines instead of opening aninteractive window. Its closest-hit shades from barycentrics (samples no
texture), so unlike the interactive Sponza it builds the full 25-mesh
atrium (~262 k triangles) as one multi-instance TLAS — the dynamic-heap
hit-shader driver fault that forces single-material on native doesn't apply.
A second small change adds
CRAFTER_PRESENT_IMMEDIATEtoWindowso framepacing can be uncapped from the compositor's vblank for the measurement
(FIFO stays the default).
Method
Built the same SponzaBench sources against each library revision (#40 =
1451e3a, HEAD = master, via a git worktree). RTX 4090, driver610.43.02,1280×720, validation disabled,
IMMEDIATEpresent, 200 warmup + 2000measured frames, median of 9 runs.
Result — the net gain in Sponza is small (~1–2 % frames, ~2–3 % setup)
Full atrium (GPU-traversal bound):
Light scene (CPU-bound): fps 15 022 → 15 237 (+1.4 %), frame p50
0.0662 → 0.0650 ms (−1.8 %).
*#40 predates the disk pipeline cache (#69), so its setup is always cold.
Why so small (the honest part)
This is a real result, not a flat run — it's about what Sponza exercises:
#122–129, #132). Sponza has no UI → zero contribution.
dirty-track, #119 mesh refit, #120 staging ring). A static scene
builds its TLAS once and never re-uploads → not exercised in steady state.
native Vulkan build.
#65/#72/#73/#75, staging release #66/#67/#114, pipeline cache #69,
deferred deletion #101/#116, barrier scoping #48/#115, heap-bind caching
#42/#43) act on setup cost and memory, not frame time — which is
exactly where the measured ~2–3 % setup change and the warm-cache RSS drop
appear. Steady-state frame time is GPU-traversal bound, so CPU savings are
hidden behind traversal.
Takeaway: the perf work is real but concentrated in UI/text and
dynamic-upload paths; a static UI-less RT scene is the wrong workload to see
most of it. Quantifying those would need a text-heavy
UIRendererbenchmarkor an animated/deforming scene. Full analysis in
examples/SponzaBench/README.md.Note (pre-existing, unrelated)
Stock
examples/Sponzanative no longer compiles against the unpinnedVulkan-Headers
main—VkResourceDescriptorDataEXTdropped thepCombinedImageSamplermember it uses. SponzaBench avoids it; portingSponza to the split sampled-image + sampler-heap model is a good follow-up.
Tests
crafter-build test→ 25 passed (run with--jobs=1; the defaultparallel run hits a pre-existing race in the external-dep
git pull, notrelated to this change).