Skip to content

vk_native: window-space view-cache eviction can free in-flight descriptor sets on the split path (+ #1783 nits) #1792

Open

Description

@dfattal

Follow-up from the #1783 review.

1. The split path can free descriptor sets that in-flight frames still use. vk_compositor_forget_dead_window_space_images (#1783) assumes the previous frame's submit has always been waited on before the window-space pass records. That's true for the windowed path (fence), shared-texture (vkQueueWaitIdle) and DP self-submit. It's not true for vk_split_composite_window_space: its VK_SPLIT_PLANE_CMD_RING (3 deep) only waits on the slot it reuses, so up to two earlier command buffers may still be executing.

Failure: on a hybrid box with the weave-on-scanout split engaged, more than 64 window-space images get destroyed between two passes. The overflow branch then frees the descriptor sets of every cached entry, including live HUD images bound by an in-flight command buffer (VUID-vkFreeDescriptorSets-pDescriptorSets-00309). The neighbouring atlas-framebuffer eviction comment makes the same "always waited" claim.

Fix: on the split path, wait for the outstanding ws_cmd_value[] before forgetting, or route eviction through a deferred-free list keyed on timeline values. At minimum, correct both comments.

2. Nits from the same review:

  • The overflow loop while (image_count > 0) forget(cached_images[0].image) spins forever if entry 0's image is VK_NULL_HANDLE (unreachable today). Add a vk_hud_blend_forget_all().
  • The doxygen block for vk_compositor_render_window_space_into_atlas is now separated from its function by the new function.

3. Pre-existing:

  • vk_swapchain_destroy calls vkDestroyImage with no GPU wait.
  • comp_multi_system's hud_blend / chrome_blend / shared_chrome_blend caches never evict.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions