6 Commits
Author SHA1 Message Date
ItsNotRexedandClaude Opus 5.5 f50dac3b8b Merge pull request #4501 from pmilewsskiedu-gif
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:15:19 -05:00
pmilewsskiedu-gif 00832c18cd Runtime: propagate queue progress counter device loss 2026-11-22 20:51:10 -05:00
AlxcBTWandClaude Opus 5.5 48cee7c2c6 Queue holds: second review fixes (claim after submit, presenter locking and bound, teardown pump, tests)
- A Signal counts as submitted only after vkQueueSubmit succeeded: a failed submit releases no waiter and the retry goes through.
- ~VulkanQueue pumps after dropping held work; fence keep-alives are also drained in wait() and marker().
- VulkanPresenter: counters are atomics, read_back/enable_capture take the presenter mutex, set_abort has its own mutex,
  a deferred present reports not tearing, and at most 8 presents queue up before the caller waits.
- Tests: three presents (blit, blank, composed) queued behind held work run in order, a present behind a destroyed
  queue's held work runs, a failed Signal does not release its waiters; the handover modes also run on the host runtime.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:20:36 +01:00
AlxcBTWandClaude Opus 5.5 f8007dda67 Queue holds: review fixes (Present ordering, pins, timeline monotonicity, fence lifetime, teardown, docs)
- Present is queued behind held work (QueueHolds::after_held) and submitted in order by the releasing thread.
- Held batches keep the pipeline states and root signatures of their lists; fences a queue waits on or signals are
  kept until the submission has completed on the GPU (a D3D12 queue holds them).
- A held Signal released below an unheld one on the same fence leaves the Vulkan signal out (claimed under the submit lock).
- A queue destroyed with held Signals completes the CPU waits on their fences and reports it.
- A failed held batch is reported (take_held_failure, last_execute_result), its waits stay for the next submission,
  and the Signal behind it still signals.
- d3d12_queue_handover_test: pairs, two-thread signalling stress, held Signal of a released fence, shared fence,
  teardown with a CPU waiter; --two-queues and --shared-queue modes on a caller-owned device.
- Tests for each fix in vk_presenter_sync_test, vk_queue_query_sync_test and d3d12_m4_compute_test; docs section 4.4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 21:02:33 +01:00
AlxcBTWandClaude Opus 5.5 fbc11e973d D3D12 queues: hold a batch that waits for a Signal not yet submitted, so layouts follow dependency order
A queue's ExecuteCommandLists is replayed against one LayoutTracker in call order, so a batch that waits (cross-queue) for a Signal submitted later was
recorded against layouts from before the work it waits for. Track, per fence, the highest Signal value submitted (CPU Signal and the creation value
count); a queue holds a batch, and what follows it, while a Wait names a higher value, and the thread that submits the satisfying Signal releases the
held work in dependency order on its own VkQueue. Reports a queue destroyed with held work and a fence released under a waiter; nothing blocks.

Adds d3d12_queue_handover_test (27 queue-type assignments x 6 submission orders, two producers, CPU Signal cases, never-signaled and released fences,
byte-exact against the host runtime) and updates docs section 4.4 and the M4 row. Two existing tests that used an unsignaled Wait as a GPU gate or
expected a synchronous submit failure under a pending Wait now declare the Signal first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 19:22:39 +01:00
Emirhan Karaca 07b5dabec3 Runtime: serialize QueryReplay plan/commit with remove_query_pool and keep pending waits on failed submit 2026-11-22 16:14:35 +03:00