Clear the uniform overlays once their copies are recorded

After vk_exec_ub_flush the full barrier barrier_to records makes the copied bytes visible, so later bindings can read
the real buffer. The overlays stayed until the submission's end instead: every later binding inside their span
scanned them, and a block an overlay covered in part got a merged scratch copy that the descriptor build skip then
left alone. With the updates between passes overlaid too (Great Sky Island: 274 of 594 per submission) that was 290
merged copies and 1.1 ms more replay a frame, more than the barriers saved on the GPU (0.3 ms).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BspNcezsiV8zT8wcnXrrME
This commit is contained in:
Claude committed 2026-11-07 00:18:52 +00:00
1 parent 49b2314dd8
commit 324f85602f
1 file changed
+5
+5
View File
@@ -3381,6 +3381,11 @@ void vk_exec_ub_flush(VkExec *ex) {
ex->recorded++;
}
OV.np = 0;
// The full barrier barrier_to records next makes the copied bytes visible: later bindings read the real buffer,
// as after an update copied at once, and need no overlay lookups or merged copies (ov_at answers 0 for them, so
// the descriptor build skip rebuilds the draws that bound an overlay)
OV.n = 0;
ov_span();
OV.c_flush++;
}