diff options
| author | Yong He <yonghe@outlook.com> | 2021-10-18 12:19:45 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-18 12:19:45 -0700 |
| commit | 2f44d9e01234911dd563f0456b9d861fd8db286d (patch) | |
| tree | e2727f31654ebc93bae6a1de4b25586be6fb9d10 /tools/gfx-unit-test/compute-smoke.cpp | |
| parent | 87e7c49fbfccd54be0d1cee61fba8f309b1f792e (diff) | |
GFX: implement mutable shader objects. (#1963)
* GFX: implement mutable shader objects.
* Revert unnecessary changes
* Revert more changes.
* Fix clang errors.
* Fix clang/gcc errors.
* Fix clang errors.
* Remove CPU test.
* Fix after merge.
* Fix after merge.
* Remove gl test
* Code review fixes.
* Fixing all vk validation errors.
* Flush test output more often.
* Fix a crash in `specializeDynamicAssociatedTypeLookup`.
* temporarily disable std-lib-serialize test to see what happens
* Fix crashes.
* Make sure cpu gfx unit tests are properly disabled on TeamCity.
* Disable cpu test.
* Fix.
* Fix cuda.
* Disable nv-ray-tracing-motion-blur
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tools/gfx-unit-test/compute-smoke.cpp')
| -rw-r--r-- | tools/gfx-unit-test/compute-smoke.cpp | 39 |
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); } } |
