2026-03-17 03:29:39 +08:00
|
|
|
#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"
|
|
|
|
|
|
refactor: improve test infrastructure and fix OpenGL GLAD initialization
- 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
2026-03-23 00:43:02 +08:00
|
|
|
namespace XCEngine {
|
|
|
|
|
namespace RHI {
|
2026-03-17 03:29:39 +08:00
|
|
|
|
|
|
|
|
class D3D12TestFixture : public ::testing::Test {
|
|
|
|
|
protected:
|
|
|
|
|
static void SetUpTestSuite();
|
|
|
|
|
static void TearDownTestSuite();
|
|
|
|
|
|
|
|
|
|
void SetUp() override;
|
|
|
|
|
void TearDown() override;
|
|
|
|
|
|
refactor: improve test infrastructure and fix OpenGL GLAD initialization
- 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
2026-03-23 00:43:02 +08:00
|
|
|
D3D12Device* GetDevice() { return m_device.get(); }
|
|
|
|
|
D3D12CommandQueue* GetCommandQueue() { return m_commandQueue.get(); }
|
|
|
|
|
D3D12CommandList* GetCommandList() { return m_commandList.get(); }
|
|
|
|
|
D3D12CommandAllocator* GetCommandAllocator() { return m_commandAllocator.get(); }
|
2026-03-17 03:29:39 +08:00
|
|
|
|
|
|
|
|
void WaitForGPU();
|
|
|
|
|
|
|
|
|
|
private:
|
refactor: improve test infrastructure and fix OpenGL GLAD initialization
- 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
2026-03-23 00:43:02 +08:00
|
|
|
std::unique_ptr<D3D12Device> m_device;
|
|
|
|
|
std::unique_ptr<D3D12CommandQueue> m_commandQueue;
|
|
|
|
|
std::unique_ptr<D3D12CommandAllocator> m_commandAllocator;
|
|
|
|
|
std::unique_ptr<D3D12CommandList> m_commandList;
|
2026-03-17 03:29:39 +08:00
|
|
|
};
|
refactor: improve test infrastructure and fix OpenGL GLAD initialization
- 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
2026-03-23 00:43:02 +08:00
|
|
|
|
|
|
|
|
} // namespace RHI
|
|
|
|
|
} // namespace XCEngine
|