Skip to content

Add Queue::submit() for command buffer submission#1057

Draft
MarijnS95 wants to merge 1 commit intollvm:mainfrom
Traverse-Research:queue-submit
Draft

Add Queue::submit() for command buffer submission#1057
MarijnS95 wants to merge 1 commit intollvm:mainfrom
Traverse-Research:queue-submit

Conversation

@MarijnS95
Copy link
Copy Markdown
Contributor

@MarijnS95 MarijnS95 commented Apr 2, 2026

Depends on #1033

Move command buffer submission logic from each backend's Device into Queue::submit(), which takes ownership of the command buffers. Each backend uses its Fence abstraction (#1007) for GPU synchronization:

  • Metal: commit() + waitUntilCompleted()
  • Vulkan: vkQueueSubmit() signaling a timeline semaphore (VulkanFence), then VulkanFence::waitForCompletion()
  • DX12: ExecuteCommandLists() + Queue::Signal() on the queue-owned DXFence, then DXFence::waitForCompletion()

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

@MarijnS95 MarijnS95 force-pushed the queue-submit branch 2 times, most recently from b77026f to b8bd9ac Compare April 2, 2026 14:15
@MarijnS95
Copy link
Copy Markdown
Contributor Author

Looks like this needs some more TLC, from CI:

# | D3D: ID3D12CommandAllocator::LUCPrepareForDestruction: A command allocator 0x00000136B8B29B10:'Unnamed ID3D12CommandAllocator Object' is being reset before previous executions associated with the allocator have completed.
# | Exception Code: 0x0000087A
...
# | #11 0x00007ffa7089c1e4 (C:\WINDOWS\SYSTEM32\D3D12SDKLayers.dll+0x3c1e4)
# | #12 0x00007ff6c4440df9 `anonymous namespace'::DXCommandBuffer::~DXCommandBuffer E:\actions-runner\_work\offload-test-suite\offload-test-suite\OffloadTest\lib\API\DX\Device.cpp:364:0

@MarijnS95 MarijnS95 force-pushed the queue-submit branch 5 times, most recently from 5e4f6d2 to 3b4f680 Compare April 13, 2026 15:09
@MarijnS95 MarijnS95 force-pushed the queue-submit branch 3 times, most recently from 0ed7539 to cfb2665 Compare April 14, 2026 15:04
@MarijnS95 MarijnS95 marked this pull request as draft April 14, 2026 15:25
Move command buffer submission logic from each backend's Device into
Queue::submit(), which takes ownership of the command buffers. Each
backend uses its Fence abstraction for GPU synchronization:

- Metal: commit() + waitUntilCompleted()
- Vulkan: vkQueueSubmit() signaling a timeline semaphore (VulkanFence),
  then VulkanFence::waitForCompletion()
- DX12: ExecuteCommandLists() + Queue::Signal() on the queue-owned
  DXFence, then DXFence::waitForCompletion()

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants