From 42a198ea6e0df7f54d819c26d7d2529fb3494f85 Mon Sep 17 00:00:00 2001 From: Jayou <906832263@qq.com> Date: Wed, 21 Oct 2020 20:44:04 +0800 Subject: [PATCH] add custom entrypoint support (hlsl). --- glsl2spv.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/glsl2spv.cpp b/glsl2spv.cpp index 771038b..79442ad 100644 --- a/glsl2spv.cpp +++ b/glsl2spv.cpp @@ -224,8 +224,9 @@ extern "C" struct CompileInfo { ShaderType shader_type = ShaderType::GLSL; + const char *entrypoint; uint32_t includes_count; - const char** includes; + const char **includes; }; enum class VertexAttribBaseType @@ -498,7 +499,7 @@ extern "C" messages = (EShMessages)(EShMsgReadHlsl | EShMsgSpvRules | EShMsgVulkanRules); // HLSL Request! - shader.setEntryPoint("main"); + shader.setEntryPoint(compile_info->entrypoint); } for (uint32_t i = 0; i < compile_info->includes_count; i++)