From 2f44d9e01234911dd563f0456b9d861fd8db286d Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 18 Oct 2021 12:19:45 -0700 Subject: 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 --- tools/gfx-unit-test/compute-smoke.cpp | 39 ++--------------------------------- 1 file changed, 2 insertions(+), 37 deletions(-) (limited to 'tools/gfx-unit-test/compute-smoke.cpp') 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(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 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); } } -- cgit v1.2.3