feat: add RHI abstraction layer unit tests
- 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
This commit is contained in:
25
tests/RHI/integration/README.md
Normal file
25
tests/RHI/integration/README.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# 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
|
||||
|
||||
```bash
|
||||
# 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
|
||||
```
|
||||
Reference in New Issue
Block a user