#pragma once #include #include #include #include using namespace Microsoft::WRL; class CD3D12CommandQueue { private: const WCHAR * m_name = nullptr; ComPtr m_queue; ComPtr m_allocator; ComPtr m_gfxList; ComPtr m_cmdList; ComPtr m_fence; Wrappers::HandleT m_event; UINT64 m_fenceValue = 0; public: bool Init(ID3D12Device3 * device, D3D12_COMMAND_LIST_TYPE type, const WCHAR * name); bool Execute(); void Wait(); bool Reset(); ComPtr GetCmdQueue() { return m_queue; } ComPtr GetGfxList() { return m_gfxList; } };