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
So, the C++ specification (normative for GLSL preprocessing) says
If (before argument substitution) any argument consists of no preprocessing tokens, the behavior is undefined.
So, generally, for portability, you'd want to set things up without using arguments that have no tokens in them.
Now, if you want to identify a specific behavior that HLSL does define and is important to use, I could look and see whether that is difficult to support or not.
Imagine the following code:
In gcc's and clang's preprocessor the outpout is
AC
. glslang in the other hand outputsACtokenC
.A slight twist of the above:
In gcc's and clang's preprocessor the outpout is
AC
once again. glslang in the other hand throws some errors:The following also fails on glslang:
I'm not sure which behavior is correct but maybe you can verify. Thank you.
The text was updated successfully, but these errors were encountered: