1d181f1109
Add Phase 2: Texture and Sampler tests (9 tests)
...
- Add Texture tests: 2DTexture, CubeMap, Bind/Unbind, GenerateMipmap, SetFiltering/SetWrapping
- Add Sampler tests: Initialize (default/custom), Bind/Unbind, GetID
2026-03-17 12:27:47 +08:00
745f3ab225
Add OpenGL test infrastructure - Phase 1: Device, Buffer, Fence tests (17 tests)
...
- Create test directory structure at tests/RHI/OpenGL/
- Implement OpenGLTestFixture with GLFW/GLAD initialization
- Add Device tests: CreateRenderWindow, InitializeWithExistingWindow, GetDeviceInfo, SwapBuffers, PollEvents
- Add Buffer tests: VertexBuffer, IndexBuffer, UniformBuffer, Dynamic, Bind/Unbind, Map/Unmap
- Add Fence tests: Initialize (signaled/unsignaled), Signal, Wait, IsSignaled, GetStatus
- Add CMakeLists.txt with proper GLFW/GLAD/GTest linking
- Create implementation plan document at docs/OpenGL测试实施计划.md
2026-03-17 12:26:21 +08:00
f42a0795fb
Add D3D12 test progress report
2026-03-17 04:15:48 +08:00
19b33a3061
Add Phase 4 tests for DescriptorHeap, Shader, RootSignature, PipelineState, Views
...
- DescriptorHeap: CBV_SRV_UAV, Sampler, RTV, DSV, HandleIncrementSize
- Shader: Vertex/Pixel/Compute profiles
- RootSignature: Empty, with CBV parameter
- PipelineState: Graphics/Compute pipeline desc defaults
- Views: RTV, DSV, CBV descriptor heaps, handle increment
- All 54 tests pass
2026-03-17 04:04:57 +08:00
3f8805cde8
Add Phase 3 tests for Buffer and Texture
...
- Buffer: CreateBuffer (Default/Upload Heap), GPU Virtual Address, Map/Unmap, Alignment
- Texture: 2D, 3D, MipLevels, TextureArray
- All 38 tests pass
2026-03-17 04:02:35 +08:00
11ea2a4fc5
Fix GPU state issue - make device non-static per test
...
- Each test now creates its own D3D12 device, command queue, allocator, and command list
- Properly cleanup in TearDown to avoid GPU state issues
- All 29 tests now pass
2026-03-17 03:54:50 +08:00
0049f8334d
Add Phase 2 tests for CommandQueue, CommandAllocator, CommandList
...
- CommandAllocator: Reset, MultipleReset, DifferentTypes
- CommandList: Close, GetDesc
- CommandQueue: GetTimestampFrequency, ExecuteCommandLists
- Note: Some tests fail after ExecuteCommandLists due to GPU state
2026-03-17 03:47:51 +08:00
795cb10183
Add Phase 1 D3D12 tests for Device and Fence
...
- Implement real D3D12 tests for Device (feature level, descriptor handle,
shader model, resource binding tier, tiled resources)
- Implement real D3D12 tests for Fence (create, signal, wait, event)
- Move tests from tests/D3D12_engine/test/ to tests/RHI/D3D12/
- All 22 tests pass
2026-03-17 03:39:27 +08:00
8c6516183e
test: 添加 D3D12 引擎测试框架
...
- 修复 engine/CMakeLists.txt 路径问题
- 在 tests/D3D12_engine/test/ 创建测试框架
- 添加基础测试夹具 D3D12TestFixture
- 添加 13 个基础测试用例
- 所有测试通过
2026-03-17 03:29:39 +08:00
d1c7c23527
test: 添加 D3D12 测试框架基础设施
...
- 创建 engine/src/RHI/D3D12/test/ 目录
- 添加 CMakeLists.txt 构建配置
- 添加基础测试夹具 D3D12TestFixture.h
- 添加各组件测试文件框架
- 更新 tests/CMakeLists.txt 集成新测试
2026-03-17 02:51:34 +08:00
5683b10e65
Rename RHI header files for clarity
...
- Rename Enums.h to RHIEnums.h
- Rename Types.h to RHITypes.h
- Update all include references in D3D12 headers and test files
2026-03-17 02:39:22 +08:00
4c9c03e1a7
Refactor: use engine enums for resource states and heap types
2026-03-17 01:38:57 +08:00
ac9a62082e
Refactor: use CreateDescriptorRange
2026-03-17 01:34:00 +08:00
9fe79681fb
Refactor: use CreateDesc for SRV
2026-03-17 01:27:37 +08:00
07450e76a4
Refactor: use CreateDesc for DSV
2026-03-17 01:23:50 +08:00
97653041bd
Refactor: use CreateDesc for DescriptorHeap
2026-03-17 01:22:11 +08:00
f4db1eafea
Refactor: use CreateSamplerDesc for cleaner sampler creation
2026-03-17 01:20:00 +08:00
64bd8c5074
Refactor: use engine helpers for RootSignature and PSO creation
2026-03-17 01:16:39 +08:00
210bc450fa
Refactor: use engine封装 for Vertex/Index Buffer operations
2026-03-17 00:47:05 +08:00
4b41a4cca1
Fix D3D12 build: add missing headers and fix CMake paths
2026-03-17 00:40:29 +08:00
0be91748c2
Add OpenGLPipelineState and integrate into main.cpp
2026-03-16 18:25:58 +08:00
430d23b719
Replace GLFW window management with OpenGLDevice from engine
2026-03-16 18:06:57 +08:00
220494c3c5
Replace local Shader class with OpenGLShader from engine
2026-03-16 17:29:20 +08:00
fee738b0b9
Move OpenGL backend classes from tests/OpenGL to engine/
...
- Relocated OpenGLDevice, OpenGLShader, OpenGLBuffer, OpenGLVertexArray, OpenGLTexture to engine/
- Updated engine/CMakeLists.txt to include OpenGL backend source files
- Updated tests/OpenGL/CMakeLists.txt to use engine backend
- Added OpenGLTexture class implementation
2026-03-16 17:22:45 +08:00
434ba0f336
Add OpenGL backend core classes: Buffer, VertexArray
...
- Added OpenGLBuffer class for VBO/IBO management
- Added OpenGLVertexArray class for VAO management
- Updated CMakeLists.txt to include new source files
2026-03-16 16:11:24 +08:00
170df5506b
Add OpenGLShader class
...
- Created OpenGLShader class for shader compilation
- Supports compiling from file or source code
- Provides uniform setting methods (SetInt, SetFloat, SetVec3, SetMat4)
- Integrated with GLAD for OpenGL function loading
2026-03-16 16:09:09 +08:00
6aaf89e603
Add OpenGL backend: OpenGLDevice class
...
- Created OpenGLDevice class for window and OpenGL context management
- Added CreateWindow() and InitializeWithExistingWindow() methods
- Integrated with GLFW and GLAD
- Added to tests/OpenGL as test target
This is the first step in building the OpenGL RHI backend parallel to D3D12.
2026-03-16 16:07:12 +08:00
9c29cfa0a6
Rename README.md to AGENT.md for both D3D12 and OpenGL tests
2026-03-16 15:57:32 +08:00
722b6b86ba
Add OpenGL test framework with logging and screenshot comparison
...
- Unified resolution to 1280x720 (same as D3D12)
- Added XCEngine Logger integration for debug output
- Added screenshot capture at frame 30 (glReadPixels -> PPM)
- Added run.bat test script
- Added compare_ppm.py for screenshot comparison
- Added GT.ppm reference image
- Added README.md documentation
- Updated CMakeLists.txt to link XCEngine library
Test: OpenGL rendering test passed (screenshot comparison 100% match)
2026-03-16 15:55:49 +08:00
77a121fc4f
精简 OpenGL 测试代码,移除冗余功能
2026-03-16 14:31:21 +08:00
d2d45bd973
Add OpenGL test project with backpack model and textures
2026-03-16 14:19:32 +08:00
3a78065574
移除D3D12测试中对RHIDevice抽象层的引用
2026-03-16 13:28:59 +08:00
9314aae32d
Remove unused IRHIDevice abstraction from D3D12 test
2026-03-16 13:27:48 +08:00
2b3ac27243
Add OpenGL backend project and third phase plan
2026-03-16 13:18:53 +08:00
554c48448b
Implement IShader and ISwapChain interfaces for D3D12 backend
...
- D3D12Shader now implements IShader interface with GetBytecode, GetBytecodeSize, GetType, GetInputLayout
- D3D12SwapChain now implements ISwapChain interface with GetBackBuffer returning IResource*
- Added D3D12Texture back buffer storage to SwapChain
- Fixed ISwapChain const correctness (GetCurrentBackBufferIndex, GetBackBuffer)
- main.cpp: use GetD3D12Bytecode() instead of GetBytecode() for PSO creation
2026-03-16 12:38:17 +08:00
fb2b794156
Add IRHIDevice interface implementation to D3D12Device
...
- D3D12Device now inherits from IRHIDevice
- Implement factory methods: CreateCommandQueue, CreateCommandList, CreateFence, etc.
- Make D3D12CommandQueue implement ICommandQueue
- Add backward-compatible overloads for existing main.cpp code
- Remove duplicate Viewport/Rect definitions from D3D12CommandList.h
- Update main.cpp to use IRHIDevice* pointer
2026-03-15 23:03:06 +08:00
93bfba073c
Remove redundant InitResourceBarrier helper function from main.cpp
2026-03-15 20:41:11 +08:00
d52028e196
Update main.cpp to use D3D12CommandList wrapper methods, add SetRenderTargets and Clear overloads
2026-03-15 20:36:42 +08:00
2a5fc4f0d4
Add GetDescriptorHandleIncrementSize to D3D12Device and update main.cpp to use wrapper
2026-03-15 20:31:37 +08:00
b9285f37b1
Remove helper functions: CreateConstantBufferObject, UpdateConstantBuffer
2026-03-15 20:05:25 +08:00
a557ed75bf
Simplify depth stencil resource usage
2026-03-15 20:02:45 +08:00
e1bbe24f0d
Replace swap chain back buffers with D3D12Texture wrapper
2026-03-15 20:01:39 +08:00
13818fe641
Replace vertex/index buffer creation with D3D12Buffer wrapper
2026-03-15 19:58:22 +08:00
38e23e45c4
Replace depth buffer creation with D3D12Texture wrapper
2026-03-15 19:54:00 +08:00
632cba821d
Replace RTV/DSV/SRV creation with wrapper classes
2026-03-15 19:48:20 +08:00
70d3879687
Remove unused CreateTexture2D function
2026-03-15 19:40:24 +08:00
ff5dfc21db
Replace CreateTexture2D with D3D12Texture wrapper
2026-03-15 19:39:16 +08:00
a1f0de4e4d
Remove helper functions: GetCommandAllocator, GetCommandList, GetD3DDevice, SwapD3D12Buffers
2026-03-15 19:25:43 +08:00
c62dc58157
Replace constant buffer with D3D12Buffer wrapper
2026-03-15 18:59:28 +08:00
f25672c7d6
Replace CreateShaderFromFile with D3D12Shader wrapper
2026-03-15 18:57:01 +08:00