Skip the descriptor clock unless a slow binding is being logged #306

Merged
SkippySteve merged 1 commit from fix/desc-clock into main 2026-11-07 20:18:17 +00:00
SkippySteve commented 2026-11-07 20:04:16 +00:00 (Migrated from github.com)

Summary

  • build_descriptors read steady_clock before every uniform binding, every storage-buffer entry, and every written-buffer stamp, then slow_descriptor read it again. That log prints at most 40 lines, and only when a binding takes 2 ms, so a normal frame paid for the clock and never logged.
  • The reads now happen only while RX_VK_SLOW_DESC is set. With it unset, descriptor resolution is the same work as before, minus the clock.

Test plan

  • python -I -B tests/test_desc_clock.py passes: the three clocks and the three slow-descriptor calls inside build_descriptors sit behind slow_desc_timing()
  • Unguarding one of those clocks makes the test fail
  • CI: "Check descriptor timing stays off"
## Summary - `build_descriptors` read `steady_clock` before every uniform binding, every storage-buffer entry, and every written-buffer stamp, then `slow_descriptor` read it again. That log prints at most 40 lines, and only when a binding takes 2 ms, so a normal frame paid for the clock and never logged. - The reads now happen only while `RX_VK_SLOW_DESC` is set. With it unset, descriptor resolution is the same work as before, minus the clock. ## Test plan - [x] `python -I -B tests/test_desc_clock.py` passes: the three clocks and the three slow-descriptor calls inside `build_descriptors` sit behind `slow_desc_timing()` - [x] Unguarding one of those clocks makes the test fail - [ ] CI: "Check descriptor timing stays off"
Commenting is not possible because the repository is archived.
No description provided.