KhronosGroup / glslang

Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator.
Other
2.9k stars 815 forks source link

Miss glslang_shader_shader_set_entry_point #3595

Closed metarutaiga closed 1 month ago

metarutaiga commented 1 month ago

I tried to use C Interface to compile HLSL. But it miss a function to set entry point.

https://github.com/KhronosGroup/glslang/blob/e8dd0b6903b34f1879520b444634c75ea2deedf5/glslang/Public/ShaderLang.h#L471

https://github.com/KhronosGroup/glslang/blob/e8dd0b6903b34f1879520b444634c75ea2deedf5/glslang/Include/glslang_c_interface.h#L257 Maybe GLSLANG_EXPORT void glslang_shader_set_entry_point(glslang_shader_t shader, const char s);

and

GLSLANG_EXPORT void glslang_shader_set_invertY(glslang_shader_t* shader, bool invertY);

arcady-lunarg commented 1 month ago

Yeah, this is definitely a missing piece of the API. If you want to add it, it shouldn't be too hard to put in the appropriate shim in glslang/CInterface/glslang_c_interface.cpp, and a patch would be very welcome.