From 8bcffcc085b996babedfeaee674c6ad09c9b08cf Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 18 Sep 2023 06:12:30 -0700 Subject: Use direct spirv in hello-world example. (#3207) * Use direct spirv in hello-world example. * Use vulkan 1.1 * Use vulkan 1.2. * fix. * Fix test. --------- Co-authored-by: Yong He --- tools/gfx/vulkan/vk-shader-program.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'tools') diff --git a/tools/gfx/vulkan/vk-shader-program.cpp b/tools/gfx/vulkan/vk-shader-program.cpp index caa219c99..4159561d1 100644 --- a/tools/gfx/vulkan/vk-shader-program.cpp +++ b/tools/gfx/vulkan/vk-shader-program.cpp @@ -68,16 +68,8 @@ Result ShaderProgramImpl::createShaderModule( { m_codeBlobs.add(kernelCode); VkShaderModule shaderModule; - // HACK: our direct-spirv-emit path generates SPIRV that respects - // the original entry point name, while the glslang path always - // uses "main" as the name. We should introduce a compiler parameter - // to control the entry point naming behavior in SPIRV-direct path - // so we can remove the ad-hoc logic here. auto realEntryPointName = entryPointInfo->getNameOverride(); - const char* spirvBinaryEntryPointName = - m_device->m_desc.slang.targetFlags & SLANG_TARGET_FLAG_GENERATE_SPIRV_DIRECTLY - ? realEntryPointName - : "main"; + const char* spirvBinaryEntryPointName = "main"; m_stageCreateInfos.add(compileEntryPoint( spirvBinaryEntryPointName, kernelCode, -- cgit v1.2.3