- Rename D3D12Enum.h to D3D12Enums.h for naming consistency - Fix OpenGL unit test GLAD initialization by using gladLoadGL() instead of gladLoadGLLoader(wglGetProcAddress) for fallback support - Migrate remaining tests to use gtest_discover_tests for granular test discovery (math, core, containers, memory, threading, debug, components, scene, resources, input, opengl) - Remove obsolete TEST_RESOURCES_DIR and copy_directory commands from OpenGL unit test CMakeLists (minimal/Res doesn't exist) - Update TEST_SPEC.md with performance metrics and per-module build/test commands for faster development workflow - Update CMake path references to use lowercase paths
38 lines
1.1 KiB
C++
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
|