Commit Graph

153 Commits

Author SHA1 Message Date
3d2fd5c8ee Add Vulkan graphics descriptor offset unit test 2026-03-28 00:17:16 +08:00
539df6a03a Add Vulkan resource view unit coverage 2026-03-28 00:13:02 +08:00
a1bc8f163e Add Vulkan backend sphere integration test 2026-03-28 00:09:05 +08:00
e546afa327 Add Vulkan backend quad integration test 2026-03-27 23:55:23 +08:00
837a4ce631 Add Vulkan backend triangle integration test 2026-03-27 23:40:56 +08:00
6b3f5a9b93 Add Vulkan backend minimal integration test 2026-03-27 23:26:45 +08:00
b1ddf77e51 Add Vulkan descriptor and layout unit coverage 2026-03-27 22:33:26 +08:00
77ff318558 Split Vulkan backend tests by responsibility 2026-03-27 22:28:18 +08:00
f37c9261d8 Extract Vulkan backend test fixture 2026-03-27 22:22:34 +08:00
e3ddf10d79 Split Vulkan backend-specific unit tests 2026-03-27 22:13:17 +08:00
1ea00a1879 Fix D3D12 compute pipeline unit coverage 2026-03-27 21:48:23 +08:00
126860e79d Split backend-specific RHI unit tests 2026-03-27 21:26:32 +08:00
3514e424de Normalize RHI test entry points and docs 2026-03-27 20:51:13 +08:00
6aa0e73a05 Add Vulkan coverage to generic RHI unit tests 2026-03-27 20:21:36 +08:00
5a49812ea9 Add Vulkan GLSL shader compilation path 2026-03-27 19:30:28 +08:00
53ac1dbc44 Add Vulkan shader, UAV, and compute coverage 2026-03-27 18:55:38 +08:00
cf8e669f75 Add Vulkan render pass and copy coverage 2026-03-27 17:36:57 +08:00
fe56117d8e Add Vulkan backpack integration test 2026-03-27 15:17:36 +08:00
22ccdfb371 Add Vulkan sphere integration support 2026-03-27 15:07:21 +08:00
727b6ca249 Add Vulkan quad integration path 2026-03-27 13:52:56 +08:00
79e7452245 Add Vulkan triangle integration path 2026-03-27 12:40:17 +08:00
c33404767e Add Vulkan RHI minimal backend path 2026-03-27 12:05:12 +08:00
93de4199d1 Adjust backpack framing and remove lighting 2026-03-26 17:22:19 +08:00
122495e581 Add backpack RHI integration test 2026-03-26 16:57:54 +08:00
18fa150843 fix(rhi): validate opengl compute uav set bindings 2026-03-26 15:42:44 +08:00
733b573963 fix(rhi): make opengl descriptor binding set-aware 2026-03-26 15:10:03 +08:00
9218ea20b5 fix(rhi): honor firstSet in set-aware d3d12 bindings 2026-03-26 14:43:51 +08:00
476a56724f refactor(rhi): let pipeline layouts own set metadata 2026-03-26 12:40:49 +08:00
36d2f479cd refactor(rhi): untangle d3d12 descriptor bindings 2026-03-26 12:21:49 +08:00
d8e14df78a fix(rhi): align empty pipeline layout contract 2026-03-26 11:44:33 +08:00
1ef3048da1 Fix OpenGL sampler and copy semantics 2026-03-26 02:14:21 +08:00
c47e871c5a Fix OpenGL device initialization and file shaders 2026-03-26 02:07:21 +08:00
2e17c0019c Fix OpenGL render target binding composition 2026-03-26 01:56:10 +08:00
39edb0b497 Fix RHI constant binding and add sphere test 2026-03-26 01:23:29 +08:00
c5605c2a32 Align OpenGL textured integration baselines 2026-03-26 01:07:36 +08:00
9adac63b4c Fix RHI texture binding and add pure quad test 2026-03-26 00:47:12 +08:00
76c4c2ace2 Add RHI texture upload and descriptor set fixes 2026-03-26 00:04:51 +08:00
605ef56e16 Add pipeline layout support for graphics PSOs 2026-03-25 23:49:48 +08:00
83cd2fa591 Refresh test spec and align minimal shared GT 2026-03-25 23:41:45 +08:00
8f9a2d17a5 Use indexed drawing in RHI triangle test 2026-03-25 23:34:12 +08:00
8fabdc603c Add pure RHI triangle integration test 2026-03-25 23:29:58 +08:00
2470451d96 Honor input layouts in OpenGL vertex bindings 2026-03-25 23:24:06 +08:00
1597181458 Add graphics shader support to RHI pipeline states 2026-03-25 23:19:18 +08:00
aaf9cce418 Add RHI vertex and index buffer views 2026-03-25 23:07:22 +08:00
30b5f93157 Fix RHI swap chain queue binding and restore minimal GT checks 2026-03-25 21:50:57 +08:00
8f76564ded test: Add new RHI unit tests for capabilities, views, screenshot, descriptor set and pipeline layout 2026-03-25 20:50:56 +08:00
a9b9a6ebfc test: Add RHI integration tests and update unit tests
- Add CommandQueue unit tests for WaitForIdle and synchronization
- Add SwapChain unit tests for Present and buffer operations
- Add Texture unit tests for various texture types and mipmaps
- Fix RHIIntegrationFixture with proper logging and debug output
- Update minimal integration test with RHI abstraction layer
- Add GT reference image for minimal test
- Update TEST_SPEC.md documentation
2026-03-25 20:50:49 +08:00
6bbd35873b test: Update RHI unit tests to use CreateShader API
Rename CompileShader to CreateShader in all RHI unit tests:
- test_command_list.cpp
- test_compute.cpp
- test_shader.cpp
2026-03-25 19:01:59 +08:00
238ebb50f4 test: Add RHI integration test framework
Add integration tests for RHI module:
- Add tests/RHI/integration/ directory with CMakeLists.txt
- Add RHIIntegrationFixture for shared test utilities
- Add minimal integration test (window creation, basic rendering)
- Add compare_ppm.py for image comparison
- Add run_integration_test.py test runner script

These integration tests verify the complete rendering pipeline
by comparing rendered output against ground truth PPM files.
2026-03-25 19:00:30 +08:00
b11f59e144 Fix RHI D3D12 RTV creation and GetFormat bug
1. Add ALLOW_RENDER_TARGET flag for color textures in CreateTexture
   - This was the root cause of 5 failing RTV-related tests
   - Without this flag, creating RTV caused device removal

2. Add FromD3D12() reverse conversion for Format enum
   - GetFormat() was incorrectly casting DXGI_FORMAT to Format
   - DXGI_FORMAT_R8G8B8A8_UNORM=28 but Format::R8G8B8A8_UNorm=3
   - Added FromD3D12() to properly convert back

3. Update RHITestFixture to pre-create CommandQueue and Fence
   - Prevents potential timing issues with GPU synchronization

4. Update RHITestFixture tests to pass correct format in ResourceViewDesc
   - Previously passed empty desc.format=0 which caused issues

All 234 RHI unit tests now pass (117 D3D12 + 117 OpenGL)
2026-03-25 18:12:50 +08:00