| 736 | } |
| 737 | |
| 738 | void Device::Submit(QueueID queueID, CommandBufferID commandBuffer) { |
| 739 | CommandBufferInfo& info = commandBuffers.at(commandBuffer); |
| 740 | |
| 741 | // Determine the queue |
| 742 | ID3D12CommandQueue* queue{}; |
| 743 | switch (queueID) { |
| 744 | case 0: |
| 745 | queue = graphicsQueue.Get(); |
| 746 | break; |
| 747 | case 1: |
| 748 | queue = computeQueue.Get(); |
| 749 | break; |
| 750 | case 2: |
| 751 | queue = copyQueue.Get(); |
| 752 | break; |
| 753 | } |
| 754 | |
| 755 | // Must be valid |
| 756 | REQUIRE(queue); |
| 757 | |
| 758 | // Submit on respective queue |
| 759 | ID3D12CommandList *lists[] = {info.commandList.Get()}; |
| 760 | queue->ExecuteCommandLists(1, lists); |
| 761 | } |
| 762 | |
| 763 | void Device::InitializeResources(CommandBufferID commandBuffer) { |
| 764 | CommandBufferInfo& info = commandBuffers.at(commandBuffer); |
no test coverage detected