-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enum array output parameter validation of xrEnumerate functions is awkward #14
Comments
Good catch - looks like the valid usage generation (and validation layer generator) aren't paying attention to the fact that this is an output array of scalars. Output arrays of structs with type/next need their type/next initialized, but output arrays of scalars don't need to be initialized. Although, on the other hand, it is true that it's a requirement on the runtime that all those values must be valid values - after the call. Maybe we just need to refine that generated validity. cc @daveh-lunarg for validation layer |
I have opened internal issue 1195 to track working group discussion on this. |
FYI, this was fixed in the validation layer by KhronosGroup/OpenXR-SDK-Source#138 |
An issue (number 1195) has been filed to correspond to this issue in the internal Khronos GitLab. If you have a Khronos account, you can access that issue at KHR:openxr/openxr#1195. |
1 similar comment
An issue (number 1195) has been filed to correspond to this issue in the internal Khronos GitLab. If you have a Khronos account, you can access that issue at KHR:openxr/openxr#1195. |
Fixed long ago, as noted. |
The
xrEnumerateViewConfigurations
valid usage section states:Consequently, the core validation layer checks that all array members have a valid
XrViewConfigurationType
enum value before the function is called, even thoughviewConfigurationTypes
is purely an output parameter. Since there is no enum value for an undefined / uninitialized view configuration type, the user has to awkwardly pick a valid value and initialize the array with that:This enforced initialization loop is confusing at best, especially if the runtime doesn't even support
XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO
. It would be better to allow passing an uninitialized or at least zero-initializedviewConfigurations
array.xrEnumerateReferenceSpaces
has the same issue:The text was updated successfully, but these errors were encountered: