File tree Expand file tree Collapse file tree
src/client/renderer/buffer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -295,9 +295,12 @@ pub const ChunkBufferManager = struct {
295295 }
296296
297297 /// Begin a new frame (call before staging)
298+ /// NOTE: Does NOT process deferred frees - that's done by upload thread via advanceFrameAndProcessFrees()
299+ /// This only advances the frame counter for allocation tracking and begins the staging frame
298300 pub fn beginFrame (self : * Self , frame_fence : vk.VkFence ) ! void {
299- self .frame_counter += 1 ;
300- self .processDeferredFrees ();
301+ // NOTE: frame_counter is also incremented by upload thread in advanceFrameAndProcessFrees()
302+ // This is intentional - main thread tracks its own frame for staging, upload thread tracks for deferred frees
303+ // The deferred free logic uses >= comparison so slightly out-of-sync counters are safe
301304 try self .staging .beginFrame (frame_fence );
302305 }
303306
You can’t perform that action at this time.
0 commit comments