You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like shaderc_compile_into_spv() completely ignores whatever string you put into the entry_point_name parameter. You can specify anything into it without affecting anything at all, for example an empty string (just a null terminator). The output SPIR-V is completely identical regardless of what is set as the entry point.
This does not seem like intended behaviour, as this is written in a comment in the source code:
The entry_point_name null-terminated string defines the name of the entry point to associate with this GLSL source.
From this, while it is unclear if the entry point name should control which function is used in GLSL, it does seem like it definitely should at least affect the entry point name in the output SPIR-V. Currently, the entry point name "main" is always used, both when finding what function to use as an entry point in the GLSL code, and as the name for the entry point in the output SPIR-V.
I would be very grateful if someone could reproduce this issue. I'm using Shaderc through the latest version of the LWJGL Java binding, but have verified that the data I'm passing in is correct. However, I'm not entirely sure which version of Shaderc that LWJGL uses, so it would be good to confirm it. A minimal shader with just an empty main() function is enough to reproduce the issue.
The text was updated successfully, but these errors were encountered:
// the entry point name for HLSL compilation. For GLSL compilation, the
// entry point name is assumed to be "main".
// The entry_point_name parameter is a null-terminated string specifying
// the entry point name for HLSL compilation. For GLSL compilation, the
// entry point name is assumed to be "main".
So it looks like this is actually intended behaviour. The question is: why? It would be quite useful for me to specify multiple entry points in the same shader file and select one during compilation time.
It seems like shaderc_compile_into_spv() completely ignores whatever string you put into the entry_point_name parameter. You can specify anything into it without affecting anything at all, for example an empty string (just a null terminator). The output SPIR-V is completely identical regardless of what is set as the entry point.
This does not seem like intended behaviour, as this is written in a comment in the source code:
From this, while it is unclear if the entry point name should control which function is used in GLSL, it does seem like it definitely should at least affect the entry point name in the output SPIR-V. Currently, the entry point name "main" is always used, both when finding what function to use as an entry point in the GLSL code, and as the name for the entry point in the output SPIR-V.
I would be very grateful if someone could reproduce this issue. I'm using Shaderc through the latest version of the LWJGL Java binding, but have verified that the data I'm passing in is correct. However, I'm not entirely sure which version of Shaderc that LWJGL uses, so it would be good to confirm it. A minimal shader with just an empty main() function is enough to reproduce the issue.
The text was updated successfully, but these errors were encountered: