Massive amounts of fixes for various parts of Monado
- XRT Interface
- compositor: Remove the
array_size
field from the struct, this was the only state tracker supplied value that was on the struct, only have values that the compositor decides over on the struct.
- compositor: Remove the
- State Trackers
- OpenXR: Verify that the XrViewConfigurationType is supported by the system as required by the OpenXR spec in xrEnumerateEnvironmentBlendModes.
- OpenXR: Return the correct error code when verifying the sub action, if it is
a valid sub action path but not given at action creation we should return
XR_ERROR_PATH_UNSUPPORTED
. - OpenXR: Validate the subImage data for both projection and quad layers layers,
refactor code out so it can be shared with the different types of layers. Need
to track some state on the
oxr_swapchain
in order to do the checking. - OpenXR: Correct the return error code for action and action set localized name validation.
- OpenXR: Correct the error messages on sub action paths errors.
- OpenXR: Track the name and localized name for both actions and action sets, that way we can make sure that there are no duplicates. This is required by the spec.
- OpenXR: Do better checking if action sets and actions have been attached to the session or not.
- OpenXR: Validate the arguments for
xrSuggestInteractionProfileBindings
better so that it follows the spec better. - OpenXR: Rework the logging formatting of error messages, this makes it easier to read for the application developer.
- OpenXR: Correctly ensure that the application has called the required get graphics requirements function when creating a session.
- OpenXR: When a
XrSession
is destroyed purge the event queue of any events that references to it so that no events gets delivered to the applications with stales handles. - OpenXR: Make the event queue thread safe, all done with a simple mutex that is not held for long at all.
- OpenXR: A major overhaul of the swapchain acquire, wait and release code. This makes it almost completely conformant with the spec. Tricky parts include that multiple images can be acquired, but only one can be waited on before being released.
- OpenXR: Enforce that static swapchains can only be acquired once, this is required by the spec and make sure that a image is only rendered to once, and allows the runtime to perform special optimizations on the image.
- OpenXR: Make the function
xrGetReferenceSpaceBoundsRect
at least conform to the spec without actually implementing it, currently we do not track bounds in Monado. - OpenXR: Make the session state changes obey the specification. The code is fairly hair as is and should be improved at a later time.
- OpenXR: Use the correct XrPath for
/user/gamepad
while it sits in the users hand itsn't/user/hand/gamepad
as previously believed.
- Drivers
- psvr: Normalize the rotation to not trip up the client app when it gives the
rotation back to
st/oxr
again.
- psvr: Normalize the rotation to not trip up the client app when it gives the
rotation back to
- IPC
- server: Almost completely overhaul the handling of swapchain life cycle including: correctly track which swapchains are alive; reuse ids; enforce the maximum number of swapchains; and destroy underlying swapchains when they are destroyed by the client.
- util: Make sure to not access NULL control messages, say in the case of the server failing to create a swapchain. Also add a whole bunch of paranoia when it comes to the alignment of the control message buffers.
- Compositor
- swapchain: Give out the oldset image index when a image is acquired. This logic can be made better, but will work for the good case.
- swapchain: Close any FDs that are still valid, for instance the ipc server copies the FDs to the client.
- client: When we give a image fd to the either OpenGL or Vulkan it is consumed
and can not be rused. So make sure that it is set to an invalid fd value on the
xrt_image_fd
on the owningxrt_swapchain_fd
.
- Helper Libraries
- util: Add a very simple fifo for indices, this is used to keep track of swapchain in order of age (oldness).
- util: Expand
u_hashset
to be able to automatically allocate au_hashet_item
and insert it.