From 313677160a186efebf83fab4df7d08dd119a5cd2 Mon Sep 17 00:00:00 2001 From: cheneym2 Date: Thu, 5 Sep 2024 14:59:28 -0400 Subject: Initial -embed-spirv support (#4974) * Initial -embed-spirv support Add support for SPIR-V precompilation using the framework established for DXIL. Work on #4883 * SLANG_UNUSED * Add linkage attributes to exported spirv functions * Combine DXIL and SPIRV paths * Whitespace fix * Merge remaining precompiled spirv/dxil paths * Change inst accessors to return codegentarget * Add unit test for precompiled spirv --------- Co-authored-by: Yong He --- tools/gfx-unit-test/precompiled-module-2.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tools/gfx-unit-test/precompiled-module-2.cpp') diff --git a/tools/gfx-unit-test/precompiled-module-2.cpp b/tools/gfx-unit-test/precompiled-module-2.cpp index 93b9d1b89..e8ceb6f45 100644 --- a/tools/gfx-unit-test/precompiled-module-2.cpp +++ b/tools/gfx-unit-test/precompiled-module-2.cpp @@ -43,6 +43,9 @@ namespace gfx_test case gfx::DeviceType::DirectX12: target = SLANG_DXIL; break; + case gfx::DeviceType::Vulkan: + target = SLANG_SPIRV; + break; default: return SLANG_FAIL; } @@ -208,4 +211,9 @@ namespace gfx_test runTestImpl(precompiledModule2TestImpl, unitTestContext, Slang::RenderApiFlag::Vulkan); } + SLANG_UNIT_TEST(precompiledTargetModule2Vulkan) + { + runTestImpl(precompiledTargetModule2TestImpl, unitTestContext, Slang::RenderApiFlag::Vulkan); + } + } -- cgit v1.2.3