Files
XCEngine/tests/RHI/D3D12/unit/fixtures/D3D12TestFixture.h
ssdfasd 12b71a319f chore: snapshot editor work and restore tests
Key points:\n- restore the tests tree removed by bc47e6e\n- capture current editor workspace, scene, and docs reshuffle changes\n- keep local cloud.nvdb resources ignored from this commit
2026-04-25 22:11:47 +08:00

38 lines
1.1 KiB
C++

#pragma once
#include <gtest/gtest.h>
#include <wrl/client.h>
#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"
namespace XCEngine {
namespace RHI {
class D3D12TestFixture : public ::testing::Test {
protected:
static void SetUpTestSuite();
static void TearDownTestSuite();
void SetUp() override;
void TearDown() override;
D3D12Device* GetDevice() { return m_device.get(); }
D3D12CommandQueue* GetCommandQueue() { return m_commandQueue.get(); }
D3D12CommandList* GetCommandList() { return m_commandList.get(); }
D3D12CommandAllocator* GetCommandAllocator() { return m_commandAllocator.get(); }
void WaitForGPU();
private:
std::unique_ptr<D3D12Device> m_device;
std::unique_ptr<D3D12CommandQueue> m_commandQueue;
std::unique_ptr<D3D12CommandAllocator> m_commandAllocator;
std::unique_ptr<D3D12CommandList> m_commandList;
};
} // namespace RHI
} // namespace XCEngine