Many functions returned void and were assumed to always succeed, and some functions
returned only a bool to indicate vague success/failure.
Now that these functions get piped over IPC all of them have to be able to indicate
an IPC failure like for example an unreachable service.
With the xrt_result_t return type they now have the opportunity to report various
types of failures.
Functions down the line should be able to fail and return a status.
They can be called either through IPC or directly depending on compile settings,
therefore we need an internal result type for various XR_ERROR_* errors, but also IPC failure.
For now functions in ipc_client_utils.c only return XRT_SUCCESS or XRT_ERROR_IPC_FAILURE.
If there is no IPC failure, the generated protocol will extract and return the called functions'
actual return value from the reply.
v2: make failure results negative
This fixes a regression introduced by the IPC and layer rendering
patchsets and passes the array_index to the correct places, so the
correct VkImageView is used instead of the one with index 0.
Make the renderer and IPC aware of multiple projection and quad layers
using the layer renderer.
Remove redundant code related to idle images and imported buffers and
command buffer rebuild, since we now always just display the layer
renderer's frame buffer.
Get view and projection properties from xrt_device.
Version 2 additions by Jakob, still use a semaphore to wake up the client.
But now instead call the compositor wait frame and have that thread wake up
the client, and return immediatly on the IPC channel.
When multiple threads call OpenXR functions, make sure one thread
can not read the reply meant for another thread.
Unfortunately this also blocks other OpenXR functions from being
called while xrWaitFrame() is blocking.
The service considers clients to be connected as long as the fd is not closed.
After destroying an XrInstance this prevents the client from creating a subsequent XrInstance.