From 140c8b8bcc122517b897315dde31971da09c46cc Mon Sep 17 00:00:00 2001 From: ssdfasd <2156608475@qq.com> Date: Mon, 23 Mar 2026 18:54:20 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0README=EF=BC=8C?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0RHI=E6=8A=BD=E8=B1=A1=E5=B1=82=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加 RHI 抽象层测试 (rhi_tests) 到测试覆盖表 - 添加 RHI 单元测试构建和运行说明 - 添加测试目标说明 (rhi_tests, rhi_opengl_tests, rhi_d3d12_tests) --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 5304aa63..26a95fdf 100644 --- a/README.md +++ b/README.md @@ -396,6 +396,24 @@ XCEngine 采用 RHI(Render Hardware Interface)抽象层设计,支持多渲 - **OpenGL 后端**: OpenGL 4.6+ 支持 - **D3D12 后端**: DirectX 12 支持 +#### 单元测试 + +RHI 抽象层拥有独立的单元测试框架,位于 `tests/RHI/unit/`: + +```bash +# 构建 RHI 抽象层测试 +cmake --build . --target rhi_tests --config Debug + +# 运行测试 +./build/tests/RHI/unit/Debug/rhi_tests.exe +``` + +| 测试目标 | 说明 | +|----------|------| +| rhi_tests | RHI 抽象层通用测试 | +| rhi_opengl_tests | OpenGL 后端测试 | +| rhi_d3d12_tests | D3D12 后端测试 | + ## 测试覆盖 | 模块 | 测试用例数 | @@ -409,6 +427,7 @@ XCEngine 采用 RHI(Render Hardware Interface)抽象层设计,支持多渲 | Resources | 4+ | | RHI (OpenGL) | 41 (unit 14 + integration 5) | | RHI (D3D12) | 23 (unit 15 + integration 8) | +| RHI (抽象层) | 69 (unit) | ## mvs 示例程序