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
Due to inlining everything, HLSL doesn't allow recursion. We need to detect recursion and produce an error when it is encountered.
My initial investigations suggest this isn't currently detected in clang and existing checks in the inliner rely on inlining itself to detect loops involving multiple functions. There is a norecurse attribute, but it is descriptive rather than prescriptive.
The text was updated successfully, but these errors were encountered:
Previously, functions named "main" got the NoRecurse attribute
consistent with the behavior of C++, which HLSL largely follows.
However, standard recursion is not allowed in HLSL, so all functions
should really have this attribute. This doesn't prevent recursion, but
rather signals that these functions aren't expected to recurse.
Practically, this was done so that entry point functions named "main"
would have all have the same attributes as otherwise identical entry
points with other names.
This required small changes to the this assignment tests because they no
longer generate so many attribute sets since more of them match.
related to #105244
but done to simplify testing for #89806
Due to inlining everything, HLSL doesn't allow recursion. We need to detect recursion and produce an error when it is encountered.
My initial investigations suggest this isn't currently detected in clang and existing checks in the inliner rely on inlining itself to detect loops involving multiple functions. There is a norecurse attribute, but it is descriptive rather than prescriptive.
The text was updated successfully, but these errors were encountered: