Add Device::Tick for periodic work

This commit is contained in:
Corentin Wallez
2017-06-14 13:33:45 -04:00
committed by Corentin Wallez
parent b947993e1a
commit dbb5729e64
13 changed files with 32 additions and 3 deletions

View File

@@ -99,7 +99,7 @@ namespace d3d12 {
this->renderTargetDescriptor = renderTargetDescriptor;
}
void Device::Tick() {
void Device::TickImpl() {
// Execute any pending commands
ASSERT_SUCCESS(pendingCommandList->Close());
ID3D12CommandList* commandLists[] = { pendingCommandList.Get() };

View File

@@ -105,6 +105,8 @@ namespace d3d12 {
TextureBase* CreateTexture(TextureBuilder* builder) override;
TextureViewBase* CreateTextureView(TextureViewBuilder* builder) override;
void TickImpl() override;
ComPtr<ID3D12Device> GetD3D12Device();
ComPtr<ID3D12CommandQueue> GetCommandQueue();
ComPtr<ID3D12CommandAllocator> GetPendingCommandAllocator();
@@ -114,7 +116,6 @@ namespace d3d12 {
void SetNextRenderTargetDescriptor(D3D12_CPU_DESCRIPTOR_HANDLE renderTargetDescriptor);
void Tick();
uint64_t GetSerial() const;
void IncrementSerial();