3 #include "renderer/d3d12_includes.h" 7 class CommandAllocatorPool;
101 void DiscardAllocator(uint64_t fence_value, ID3D12CommandAllocator* allocator);
void WaitForFence(uint64_t fence_value)
Makes the CommandQueue wait for a given fence value.
Definition: command_queue.cc:68
bool IsFenceComplete(uint64_t fence_value)
Checks if a certain fence value has been passed.
Definition: command_queue.cc:52
~CommandQueue()
Destructs the CommandQueue.
Definition: command_queue.cc:39
HANDLE fence_event_handle_
A handle to an event that we use to synchronize the CPU with the GPU.
Definition: command_queue.h:111
void DiscardAllocator(uint64_t fence_value, ID3D12CommandAllocator *allocator)
Discards a ID3D12CommandAllocator back into the CommandAllocatorPool as soon as the given fence_value...
Definition: command_queue.cc:114
ID3D12CommandQueue * Get()
Definition: command_queue.h:85
uint64_t last_completed_fence_value_
The fence value that was most recently completed by the GPU.
Definition: command_queue.h:109
void WaitForIdle()
Makes the CommandQueue wait for until it is completely empty (i.e. the GPU finished all the work subm...
Definition: command_queue.cc:79
uint64_t next_fence_value_
The next fence value that should be used when we want to submit a new unit of work.
Definition: command_queue.h:110
ID3D12CommandAllocator * RequestAllocator()
Requests a ID3D12CommandAllocator from the underlying CommandAllocatorPool.
Definition: command_queue.cc:108
void StallForProducer(CommandQueue *producer)
Makes this CommandQueue wait with execution until a given CommandQueue is finished executing work...
Definition: command_queue.cc:92
void StallForFence(uint64_t fence_value)
Makes this CommandQueue wait with execution until the given fence value is hit. See remarks! ...
Definition: command_queue.cc:85
Controls a pool of allocators of a certain type.
Definition: command_allocator_pool.h:18
uint64_t IncrementFence()
Increments the current fence and signals the CommandQueue.
Definition: command_queue.cc:61
CommandAllocatorPool * allocator_pool_
The CommandAllocatorPool that is controlled by this CommandQueue.
Definition: command_queue.h:106
ID3D12Fence * fence_
The ID3D12Fence object that we use to synchronize the CPU with the GPU.
Definition: command_queue.h:108
The main Blowbox namespace.
Definition: image.cc:8
D3D12_COMMAND_LIST_TYPE type_
The type of CommandQueue this is.
Definition: command_queue.h:104
Manages a ID3D12CommandQueue.
Definition: command_queue.h:23
CommandQueue(D3D12_COMMAND_LIST_TYPE type)
Constructs a CommandQueue of a certain type.
Definition: command_queue.cc:14
ID3D12CommandQueue * queue_
The actual ID3D12CommandQueue.
Definition: command_queue.h:105
uint64_t ExecuteCommandList(ID3D12CommandList *list)
Submits a command list to the CommandQueue.
Definition: command_queue.cc:99