- Add RHITestFixture with RHI_BACKEND env var support for backend selection - Add unit tests for: Device, Buffer, Texture, SwapChain, CommandList, CommandQueue, Shader, Fence, Sampler - Tests can run against D3D12 or OpenGL backends via RHI_BACKEND env var - Add integration folder placeholder for future integration tests
RHI Integration Tests
This folder will contain integration tests for the RHI abstraction layer.
Integration tests verify the interaction between multiple RHI components working together.
Planned Tests
- Full render pipeline test (device -> swap chain -> command list -> present)
- Multi-threaded command recording
- Resource state transitions across multiple objects
- Frame synchronization with fences
Running Tests
# Build once, run against different backends
cmake --build build --config Debug
# Test D3D12 backend
RHI_BACKEND=D3D12 ./build/tests/RHI/unit/rhi_unit_tests.exe
# Test OpenGL backend
RHI_BACKEND=OpenGL ./build/tests/RHI/unit/rhi_unit_tests.exe