···55SPDX-FileCopyrightText: 2020 Collabora, Ltd. and the Monado contributors
66```
7788+## Monado 0.4.0 (2020-11-02)
99+1010+- XRT Interface
1111+ - add `xrt_device_type` to `xrt_device` to differentiate handed controllers
1212+ from
1313+ controllers that can be held in either hand.
1414+ ([!412](https://gitlab.freedesktop.org/monado/monado/merge_requests/412))
1515+ - Rename functions and types that assumed the native graphics buffer handle type
1616+ was an FD: in `auxiliary/vk/vk_helpers.{h,c}` `vk_create_image_from_fd` ->
1717+ `vk_create_image_from_native`, in the XRT headers `struct xrt_compositor_fd` ->
1818+ `xrt_compositor_native` (and method name changes from `xrt_comp_fd_...` ->
1919+ `xrt_comp_native_...`), `struct xrt_swapchain_fd` -> `struct
2020+ xrt_swapchain_native`, `struct xrt_image_fd` -> `struct xrt_image_native`, and
2121+ corresponding parameter/member/variable name changes (e.g. `struct
2222+ xrt_swapchain_fd *xscfd` becomes `struct xrt_swapchain_native *xscn`).
2323+ ([!426](https://gitlab.freedesktop.org/monado/monado/merge_requests/426),
2424+ [!428](https://gitlab.freedesktop.org/monado/monado/merge_requests/428))
2525+ - Make some fields on `xrt_gl_swapchain` and `xrt_vk_swapchain` private moving
2626+ them into the client compositor code instead of exposing them.
2727+ ([!444](https://gitlab.freedesktop.org/monado/monado/merge_requests/444))
2828+ - Make `xrt_compositor::create_swapchain` return xrt_result_t instead of the
2929+ swapchain, this makes the methods on `xrt_compositor` more uniform.
3030+ ([!444](https://gitlab.freedesktop.org/monado/monado/merge_requests/444))
3131+ - Add the method `xrt_compositor::import_swapchain` allowing a state tracker to
3232+ create a swapchain from a set of pre-allocated images. Uses the same
3333+ `xrt_swapchain_create_info` as `xrt_compositor::create_swapchain`.
3434+ ([!444](https://gitlab.freedesktop.org/monado/monado/merge_requests/444))
3535+ - Make `xrt_swapchain_create_flags` swapchain static image bit match OpenXR.
3636+ ([!454](https://gitlab.freedesktop.org/monado/monado/merge_requests/454))
3737+ - Add `XRT_SWAPCHAIN_USAGE_INPUT_ATTACHMENT` flag to `xrt_swapchain_usage_bits`
3838+ so that a client can create a Vulkan swapchain that can be used as input
3939+ attachment.
4040+ ([!459](https://gitlab.freedesktop.org/monado/monado/merge_requests/459))
4141+ - Remove the `flip_y` parameter to the creation of the native compositor, this
4242+ is
4343+ now a per layer thing.
4444+ ([!461](https://gitlab.freedesktop.org/monado/monado/merge_requests/461))
4545+ - Add `xrt_compositor_info` struct that allows the compositor carry information
4646+ to about it's capbilities and it's recommended values. Not everything is hooked
4747+ up at the moment.
4848+ ([!461](https://gitlab.freedesktop.org/monado/monado/merge_requests/461))
4949+ - Add defines for underlying handle types.
5050+ ([!469](https://gitlab.freedesktop.org/monado/monado/merge_requests/469))
5151+ - Add a native handle type for graphics sync primitives (currently file
5252+ descriptors on all platforms).
5353+ ([!469](https://gitlab.freedesktop.org/monado/monado/merge_requests/469))
5454+ - Add a whole bunch of structs and functions for all of the different layers
5555+ in
5656+ OpenXR. The depth layer information only applies to the stereo projection
5757+ so
5858+ make a special stereo projection with depth layer.
5959+ ([!476](https://gitlab.freedesktop.org/monado/monado/merge_requests/476))
6060+ - Add `xrt_image_native_allocator` as a friend to the compositor interface. This
6161+ simple interface is intended to be used by the IPC interface to allocate
6262+ `xrt_image_native` on the client side and send those to the service.
6363+ ([!478](https://gitlab.freedesktop.org/monado/monado/merge_requests/478))
6464+ - Re-arrange and document `xrt_image_native`, making the `size` field optional.
6565+ ([!493](https://gitlab.freedesktop.org/monado/monado/merge_requests/493))
6666+ - Add const to all compositor arguments that are info structs, making the
6767+ interface safer and
6868+ more clear. Also add `max_layers` field to the
6969+ `xrt_compositor_info` struct.
7070+ ([!501](https://gitlab.freedesktop.org/monado/monado/merge_requests/501))
7171+ - Add `xrt_space_graph` struct for calculating space relations. This struct and
7272+ accompanying makes it easier to reason about space relations than just
7373+ functions
7474+ operating directly on `xrt_space_relation`. The code base is changed
7575+ to use
7676+ these new functions.
7777+ ([!519](https://gitlab.freedesktop.org/monado/monado/merge_requests/519))
7878+ - Remove the `linear_acceleration` and `angular_acceleration` fields from the
7979+ `xrt_space_relation` struct, these were not used in the codebase and are not
8080+ exposed in the OpenXR API. They can easily be added back should they be
8181+ required again by code or a future feature. Drivers are free to retain this
8282+ information internally, but no longer expose it.
8383+ ([!519](https://gitlab.freedesktop.org/monado/monado/merge_requests/519))
8484+ - Remove the `out_timestamp` argument to the `xrt_device::get_tracked_pose`
8585+ function, it's not needed anymore and the devices can do prediction better
8686+ as
8787+ it knows more about it's tracking system the the state tracker.
8888+ ([!521](https://gitlab.freedesktop.org/monado/monado/merge_requests/521))
8989+ - Replace mesh generator with `compute_distortion` function on `xrt_device`. This
9090+ is used to both make it possible to use mesh shaders for devices and to provide
9191+ compatibility with SteamVR which requires a `compute_distortion` function as
9292+ well.
9393+9494+ The compositor uses this function automatically to create a mesh and
9595+ uses mesh
9696+ distortion for all drivers. The function `compute_distortion` default
9797+ implementations for `none`, `panotools` and `vive` distortion models are
9898+ provided in util.
9999+ ([!536](https://gitlab.freedesktop.org/monado/monado/merge_requests/536))
100100+ - Add a simple curl value based finger tracking model and use it for vive and
101101+ survive controllers.
102102+ ([!555](https://gitlab.freedesktop.org/monado/monado/merge_requests/555))
103103+- State Trackers
104104+ - OpenXR: Add support for attaching Quad layers to action sapces.
105105+ ([!437](https://gitlab.freedesktop.org/monado/monado/merge_requests/437))
106106+ - OpenXR: Use initial head pose as origin for local space.
107107+ ([!443](https://gitlab.freedesktop.org/monado/monado/merge_requests/443))
108108+ - OpenXR: Minor fixes for various bits of code: copy-typo in device assignment
109109+ code; better stub for the unimplemented function
110110+ `xrEnumerateBoundSourcesForAction`; better error message on internal error in
111111+ `xrGetCurrentInteractionProfile`.
112112+ ([!448](https://gitlab.freedesktop.org/monado/monado/merge_requests/448))
113113+ - OpenXR: Make the `xrGetCurrentInteractionProfile` conformance tests pass,
114114+ needed
115115+ to implement better error checking as well as generating
116116+ `XrEventDataInteractionProfileChanged` events to the client.
117117+ ([!448](https://gitlab.freedesktop.org/monado/monado/merge_requests/448))
118118+ - OpenXR: Centralize all sub-action path iteration in some x-macros.
119119+ ([!449](https://gitlab.freedesktop.org/monado/monado/merge_requests/449),
120120+ [!456](https://gitlab.freedesktop.org/monado/monado/merge_requests/456))
121121+ - OpenXR: Improve the validation in the API function for
122122+ `xrGetInputSourceLocalizedName`.
123123+ ([!451](https://gitlab.freedesktop.org/monado/monado/merge_requests/451))
124124+ - OpenXR: Implement the function `xrEnumerateBoundSourcesForAction`, currently we
125125+ only bind one input per top level user path and it's easy to track this.
126126+ ([!451](https://gitlab.freedesktop.org/monado/monado/merge_requests/451))
127127+ - OpenXR: Properly handle more than one input source being bound to the same
128128+ action
129129+ according to the combination rules of the specification.
130130+ ([!452](https://gitlab.freedesktop.org/monado/monado/merge_requests/452))
131131+ - OpenXR: Fix multiplicity of bounds paths per action - there's one per
132132+ input/output.
133133+ ([!456](https://gitlab.freedesktop.org/monado/monado/merge_requests/456))
134134+ - OpenXR: Implement the MND_swapchain_usage_input_attachment_bit extension.
135135+ ([!459](https://gitlab.freedesktop.org/monado/monado/merge_requests/459))
136136+ - OpenXR: Refactor the native compositor handling a bit, this creates the
137137+ compositor earlier then before. This allows us to get the viewport information
138138+ from it.
139139+ ([!461](https://gitlab.freedesktop.org/monado/monado/merge_requests/461))
140140+ - OpenXR: Implement action set priorities and fix remaining action conformance
141141+ tests.
142142+ ([!462](https://gitlab.freedesktop.org/monado/monado/merge_requests/462))
143143+ - st/oxr: Fix crash when calling `xrPollEvents` when headless mode is selected.
144144+ ([!475](https://gitlab.freedesktop.org/monado/monado/merge_requests/475))
145145+ - OpenXR: Add stub functions and support plumbing for a lot of layer extensions.
146146+ ([!476](https://gitlab.freedesktop.org/monado/monado/merge_requests/476))
147147+ - OpenXR: Be sure to return `XR_ERROR_FEATURE_UNSUPPORTED` if the protected
148148+ content bit is set and the compositor does not support it.
149149+ ([!481](https://gitlab.freedesktop.org/monado/monado/merge_requests/481))
150150+ - OpenXR: Update to 1.0.11 and start returning the new
151151+ `XR_ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING` code added in this release.
152152+ ([!482](https://gitlab.freedesktop.org/monado/monado/merge_requests/482))
153153+ - OpenXR: Enable the `XR_KHR_android_create_instance` extension.
154154+ ([!492](https://gitlab.freedesktop.org/monado/monado/merge_requests/492))
155155+ - OpenXR: Add support for creating swapchains with depth formats and submitting
156156+ depth layers. The depth layers are passed through to the compositor, but are
157157+ not used yet.
158158+ ([!498](https://gitlab.freedesktop.org/monado/monado/merge_requests/498))
159159+ - OpenXR: For pose actions the any path (`XR_NULL_PATH`) needs to be special
160160+ cased, essentially turning into a separate action sub path, that is assigned
161161+ at
162162+ binding time.
163163+ ([!510](https://gitlab.freedesktop.org/monado/monado/merge_requests/510))
164164+ - OpenXR: More correctly implement `xrGetInputSourceLocalizedName` allowing apps
165165+ to more accurently tell the user which input to use.
166166+ ([!532](https://gitlab.freedesktop.org/monado/monado/merge_requests/532))
167167+ - OpenXR: Pass through equirect layer data to the compositor.
168168+ ([!566](https://gitlab.freedesktop.org/monado/monado/merge_requests/566))
169169+- Drivers
170170+ - psvr: We were sending in the wrong type of time to the 3DOF fusion code,
171171+ switch
172172+ to nanoseconds instead of fractions of seconds.
173173+ ([!474](https://gitlab.freedesktop.org/monado/monado/merge_requests/474))
174174+ - rs: Make the pose getting from the T265 be threaded. Before we where getting
175175+ the
176176+ pose from the update input function, this would cause some the main thread
177177+ to
178178+ block and would therefore cause jitter in the rendering.
179179+ ([!486](https://gitlab.freedesktop.org/monado/monado/merge_requests/486))
180180+ - survive: Add lighthouse tracking system type
181181+ hydra: Add lighthouse tracking
182182+ system type
183183+ ([!489](https://gitlab.freedesktop.org/monado/monado/merge_requests/489))
184184+ - rs: Add slam tracking system type
185185+ northstar: Use tracking system from tracker
186186+ (e.g. rs) if available.
187187+ ([!494](https://gitlab.freedesktop.org/monado/monado/merge_requests/494))
188188+ - psmv: Introduce proper grip and aim poses, correctly rotate the grip pose to
189189+ follow the spec more closely. The aim poses replaces the previous ball tip pose
190190+ that was used before for aim.
191191+ ([!509](https://gitlab.freedesktop.org/monado/monado/merge_requests/509))
192192+ - survive: Implement haptic feedback.
193193+ ([!557](https://gitlab.freedesktop.org/monado/monado/merge_requests/557))
194194+ - dummy: Tidy the code a bit and switch over to the new
195195+ logging API.
196196+ ([!572](https://gitlab.freedesktop.org/monado/monado/merge_requests/572),
197197+ [!573](https://gitlab.freedesktop.org/monado/monado/merge_requests/573))
198198+ - psvr: Switch to the new logging API.
199199+ ([!573](https://gitlab.freedesktop.org/monado/monado/merge_requests/573))
200200+ - Add initial "Cardboard" phone-holder driver for Android.
201201+ ([!581](https://gitlab.freedesktop.org/monado/monado/merge_requests/581))
202202+- IPC
203203+ - Generalize handling of native-platform handles in IPC code, allow bi-
204204+ directional handle transfer, and de-duplicate code between server and client.
205205+ ([!413](https://gitlab.freedesktop.org/monado/monado/merge_requests/413),
206206+ [!427](https://gitlab.freedesktop.org/monado/monado/merge_requests/427))
207207+ - generation: Fix handling 'in_handle' by adding a extra sync round-trip, this
208208+ might be solvable by using `SOCK_SEQPACKET`.
209209+ ([!444](https://gitlab.freedesktop.org/monado/monado/merge_requests/444))
210210+ - Implement the `xrt_compositor::import_swapchain` function, uses the earlier
211211+ `in_handle` work.
212212+ ([!444](https://gitlab.freedesktop.org/monado/monado/merge_requests/444))
213213+ - proto: Transport the `xrt_compositor_info` over the wire so that the client can
214214+ get the needed information.
215215+ ([!461](https://gitlab.freedesktop.org/monado/monado/merge_requests/461))
216216+ - client: Implement the usage of the `xrt_image_native_allocator`, currently not
217217+ used. But it is needed for platforms where for various reasons the allocation
218218+ must happen on the client side.
219219+ ([!478](https://gitlab.freedesktop.org/monado/monado/merge_requests/478))
220220+ - client: Add a "loopback" image allocator, this code allocates a swapchain from
221221+ the service then imports that back to the service as if it was imported. This
222222+ tests both the import code and the image allocator code.
223223+ ([!478](https://gitlab.freedesktop.org/monado/monado/merge_requests/478))
224224+ - ipc: Allow sending zero handles as a reply, at least the Linux fd handling code
225225+ allows this.
226226+ ([!491](https://gitlab.freedesktop.org/monado/monado/merge_requests/491))
227227+ - Use a native AHardwareBuffer allocator on the client side when building for
228228+ recent-enough Android.
229229+ ([!493](https://gitlab.freedesktop.org/monado/monado/merge_requests/493))
230230+ - ipc: Add functionality to disable a device input via the `monado-ctl` utility,
231231+ this allows us to pass the conformance tests that requires the runtime to turn
232232+ off a device.
233233+ ([!511](https://gitlab.freedesktop.org/monado/monado/merge_requests/511))
234234+- Compositor
235235+ - compositor: Add support for alpha blending with premultiplied alpha.
236236+ ([!425](https://gitlab.freedesktop.org/monado/monado/merge_requests/425))
237237+ - compositor: Implement subimage rectangle rendering for quad layers.
238238+ ([!433](https://gitlab.freedesktop.org/monado/monado/merge_requests/433))
239239+ - compositor: Enable subimage rectangle rendering for projection layers.
240240+ ([!436](https://gitlab.freedesktop.org/monado/monado/merge_requests/436))
241241+ - compositor: Fix printing of current connected displays on nvidia when no
242242+ whitelisted display is found.
243243+ ([!477](https://gitlab.freedesktop.org/monado/monado/merge_requests/477))
244244+ - compositor: Add env var to temporarily add display string to nvidia whitelist.
245245+ ([!477](https://gitlab.freedesktop.org/monado/monado/merge_requests/477))
246246+ - compositor and clients: Use a generic typedef to represent the platform-
247247+ specific graphics buffer, allowing use of `AHardwareBuffer` on recent Android.
248248+ ([!479](https://gitlab.freedesktop.org/monado/monado/merge_requests/479))
249249+ - compositor: Check the protected content bit, and return a non-success code if
250250+ it's set. Supporting this is optional in OpenXR, but lack of support must be
251251+ reported to the application.
252252+ ([!481](https://gitlab.freedesktop.org/monado/monado/merge_requests/481))
253253+ - compositor: Implement cylinder layers.
254254+ ([!495](https://gitlab.freedesktop.org/monado/monado/merge_requests/495))
255255+ - main: Set the maximum layers supported to 16, we technically support more than
256256+ 16, but things get out of hand if multiple clients are running and all are
257257+ using
258258+ max layers.
259259+ ([!501](https://gitlab.freedesktop.org/monado/monado/merge_requests/501))
260260+ - main: Add code to check that a format is supported by the GPU before exposing.
261261+ ([!502](https://gitlab.freedesktop.org/monado/monado/merge_requests/502))
262262+ - compositor: Remove panotools and vive shaders from compositor.
263263+ ([!538](https://gitlab.freedesktop.org/monado/monado/merge_requests/538))
264264+ - Initial work on a port of the compositor to Android.
265265+ ([!547](https://gitlab.freedesktop.org/monado/monado/merge_requests/547))
266266+ - render: Implement equirect layer rendering.
267267+ ([!566](https://gitlab.freedesktop.org/monado/monado/merge_requests/566))
268268+ - main: Fix leaks of sampler objects that was introduced in !566.
269269+ ([!571](https://gitlab.freedesktop.org/monado/monado/merge_requests/571))
270270+- Helper Libraries
271271+ - u/vk: Remove unused vk_image struct, this is later recreated for the image
272272+ allocator code.
273273+ ([!444](https://gitlab.freedesktop.org/monado/monado/merge_requests/444))
274274+ - u/vk: Add a new image allocate helper, this is used by the main compositor to
275275+ create, export and import swapchain images.
276276+ ([!444](https://gitlab.freedesktop.org/monado/monado/merge_requests/444))
277277+ - u/vk: Rename `vk_create_semaphore_from_fd` to `vk_create_semaphore_from_native`
278278+ ([!469](https://gitlab.freedesktop.org/monado/monado/merge_requests/469))
279279+ - aux/android: New Android utility library added.
280280+ ([!493](https://gitlab.freedesktop.org/monado/monado/merge_requests/493),
281281+ [!547](https://gitlab.freedesktop.org/monado/monado/merge_requests/547),
282282+ [!581](https://gitlab.freedesktop.org/monado/monado/merge_requests/581))
283283+ - aux/ogl: Add a function to compute the texture target and binding enum for a
284284+ given swapchain image creation info.
285285+ ([!493](https://gitlab.freedesktop.org/monado/monado/merge_requests/493))
286286+ - util: Tidy hand tracking header.
287287+ ([!574](https://gitlab.freedesktop.org/monado/monado/merge_requests/574))
288288+ - math: Fix doxygen warnings in vector headers.
289289+ ([!574](https://gitlab.freedesktop.org/monado/monado/merge_requests/574))
290290+- Misc. Features
291291+ - Support building in-process Monado with meson.
292292+ ([!421](https://gitlab.freedesktop.org/monado/monado/merge_requests/421))
293293+ - Allow building some components without Vulkan. Vulkan is still required for the
294294+ compositor and therefore the OpenXR runtime target.
295295+ ([!429](https://gitlab.freedesktop.org/monado/monado/merge_requests/429))
296296+ - Add an OpenXR Android target: an APK which provides an "About" activity and
297297+ eventually, an OpenXR runtime.
298298+ ([!574](https://gitlab.freedesktop.org/monado/monado/merge_requests/574),
299299+ [!581](https://gitlab.freedesktop.org/monado/monado/merge_requests/581))
300300+- Misc. Fixes
301301+ - No significant changes
302302+8303## Monado 0.3.0 (2020-07-10)
930410305- Major changes