#pragma once #include #include #include #include #include "XCEngine/RHI/D3D12/D3D12Device.h" #include "XCEngine/RHI/D3D12/D3D12CommandQueue.h" #include "XCEngine/RHI/D3D12/D3D12CommandAllocator.h" #include "XCEngine/RHI/D3D12/D3D12CommandList.h" #include "XCEngine/RHI/D3D12/D3D12Fence.h" using namespace Microsoft::WRL; class D3D12TestFixture : public ::testing::Test { protected: static void SetUpTestSuite(); static void TearDownTestSuite(); void SetUp() override; void TearDown() override; ID3D12Device* GetDevice() { return mDevice.Get(); } ID3D12CommandQueue* GetCommandQueue() { return mCommandQueue.Get(); } ID3D12CommandList* GetCommandList() { return mCommandList.Get(); } ID3D12CommandAllocator* GetCommandAllocator() { return mCommandAllocator.Get(); } void WaitForGPU(); private: static ComPtr mDevice; ComPtr mCommandQueue; ComPtr mCommandAllocator; ComPtr mCommandList; };