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
2.9. Handles
Runtimes are not required to detect invalid handles. Usage of an invalid handle may result in undefined behavior.
All functions that take a handle parameter may return XR_ERROR_HANDLE_INVALID.
This looks like runtimes are allowed to just cast internal object pointers to handles and to leave invalid handle detection to the validation layers. But in several function descriptions the opposite is stated, for example:
7.3.3. xrCreateActionSpace
The runtime must return XR_ERROR_HANDLE_INVALID if the action provided in action is not a valid action.
Is it must or may? Are runtimes required to implement invalid handle detection or not?
The text was updated successfully, but these errors were encountered:
This, among other inconsistencies you've seen, is the result of back-and-forth design decisions in this area. The current intent was that runtimes are not required to validate handles (i.e. undefined behavior). Like you suggest, these musts should be mays or the sentence should be removed entirely. The intent is that developers use the validation layer to ensure the application is correctly written (e.g. only using valid handles).
In the fundamentals chapter it is stated that:
This looks like runtimes are allowed to just cast internal object pointers to handles and to leave invalid handle detection to the validation layers. But in several function descriptions the opposite is stated, for example:
Is it must or may? Are runtimes required to implement invalid handle detection or not?
The text was updated successfully, but these errors were encountered: