summaryrefslogtreecommitdiff
path: root/tools/gfx-unit-test/compute-smoke.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gfx-unit-test/compute-smoke.cpp')
-rw-r--r--tools/gfx-unit-test/compute-smoke.cpp39
1 files changed, 2 insertions, 37 deletions
diff --git a/tools/gfx-unit-test/compute-smoke.cpp b/tools/gfx-unit-test/compute-smoke.cpp
index 9038cd5b6..9a8298bf8 100644
--- a/tools/gfx-unit-test/compute-smoke.cpp
+++ b/tools/gfx-unit-test/compute-smoke.cpp
@@ -96,49 +96,14 @@ namespace gfx_test
Slang::makeArray<float>(11.0f, 12.0f, 13.0f, 14.0f));
}
- void computeSmokeTestAPI(UnitTestContext* context, Slang::RenderApiFlag::Enum api)
- {
- if ((api & context->enabledApis) == 0)
- {
- SLANG_IGNORE_TEST
- }
- Slang::ComPtr<IDevice> device;
- IDevice::Desc deviceDesc = {};
- switch (api)
- {
- case Slang::RenderApiFlag::D3D11:
- deviceDesc.deviceType = gfx::DeviceType::DirectX11;
- break;
- case Slang::RenderApiFlag::D3D12:
- deviceDesc.deviceType = gfx::DeviceType::DirectX12;
- break;
- case Slang::RenderApiFlag::Vulkan:
- deviceDesc.deviceType = gfx::DeviceType::Vulkan;
- break;
- default:
- SLANG_IGNORE_TEST
- }
- deviceDesc.slang.slangGlobalSession = context->slangGlobalSession;
- const char* searchPaths[] = { "", "../../tools/gfx-unit-test", "tools/gfx-unit-test" };
- deviceDesc.slang.searchPathCount = (SlangInt)SLANG_COUNT_OF(searchPaths);
- deviceDesc.slang.searchPaths = searchPaths;
- auto createDeviceResult = gfxCreateDevice(&deviceDesc, device.writeRef());
- if (SLANG_FAILED(createDeviceResult))
- {
- SLANG_IGNORE_TEST
- }
-
- computeSmokeTestImpl(device, context);
- }
-
SLANG_UNIT_TEST(computeSmokeD3D11)
{
- computeSmokeTestAPI(unitTestContext, Slang::RenderApiFlag::D3D11);
+ runTestImpl(computeSmokeTestImpl, unitTestContext, Slang::RenderApiFlag::D3D11);
}
SLANG_UNIT_TEST(computeSmokeVulkan)
{
- computeSmokeTestAPI(unitTestContext, Slang::RenderApiFlag::Vulkan);
+ runTestImpl(computeSmokeTestImpl, unitTestContext, Slang::RenderApiFlag::Vulkan);
}
}