···99There are plenty of valid reasons why someone might not be able
1010to follow all of the guidelines in this section, and that's OK,
1111especially for new contributors or those new to open source entirely.
1212-Just let us know and we'll figure out a way to help you get involved successfully.
1212+Let us know and we'll figure out a way to help you get involved successfully.
13131414> Important note: Unlike the guidelines here, the Code of Conduct,
1515> available at <https://www.freedesktop.org/wiki/CodeOfConduct/>,
···2525 to begin a discussion and help smooth the acceptance of your contribution.
26262727- If you are able, please make sure to run clang-format
2828- (ideally version 7 or newer) before each commit,
2828+ (ideally version 11 or newer) before each commit,
2929 so that you only commit things that are cleanly styled.
3030 Consistent, machine-performed formatting improves readability and makes it easier for others to contribute.
3131 It also makes it easier to review changes.
3232- If you can't run clang-format, just mention this fact in your request and we'd be happy to help,
3232+ If you can't run clang-format, mention this fact in your request and we'd be happy to help,
3333 either in a single "Clean up formatting." commit on top of your work,
3434 or by "re-writing history" (with your permission and leaving your commit authorship intact),
3535 revising each commit to apply formatting.
···5252 please help by making sure your changes build cleanly (and pass all tests).
5353 When on compilers that take warning flags like gcc and clang do,
5454 the build system automatically turns on quite a few of them.
5555- If a warning stumps you, just mention it in the request so we can figure it out together.
5555+ If you can't figure out a warning, mention it in the request so we can figure it out together.
56565757### Issues
5858
+3-6
README.md
···2121come up with a lot of weird hardware).
2222Monado aims to be a complete and conforming implementation
2323of the OpenXR API made by Khronos.
2424-The project currently is being developed for GNU/Linux
2525-and aims to support other operating systems in the near future.
2424+The project is primarily developed on GNU/Linux, but also runs on Android and Windows.
2625"Monado" has no specific meaning and is just a name.
27262827## Monado source tree
···248247You can optionally put something like `CLANG_FORMAT=clang-format-7` before that command
249248if your clang-format binary isn't named `clang-format`.
250249**Note that you'll typically prefer** to use something like `git clang-format`
251251-to just re-format your changes, in case version differences in tools result in overall format changes.
252252-The CI "style" job currently runs on Debian Buster, so it has clang-format-7.
253253-We will probably update that job to Bullseye or Ubuntu 20.10, which will allow
254254-using clang-format-11 by default, soon.
250250+to re-format only your changes, in case version differences in tools result in overall format changes.
251251+The CI "style" job currently runs on Debian Bullseye, so it has clang-format-11.
255252256253[OpenHMD]: http://openhmd.net
257254[drm-lease]: https://haagch.frickel.club/#!drmlease%2Emd
+2-2
doc/CHANGELOG.md
···566566 - comp: Set a compositor window title.
567567 ([!418](https://gitlab.freedesktop.org/monado/monado/merge_requests/418))
568568- IPC
569569- - server: Almost completely overhaul the handling of swapchain life cycle
569569+ - server: Almost completely overhaul the handling of swapchain lifecycle
570570 including: correctly track which swapchains are alive; reuse ids; enforce the
571571 maximum number of swapchains; and destroy underlying swapchains when they are
572572 destroyed by the client.
573573 ([!359](https://gitlab.freedesktop.org/monado/monado/merge_requests/359))
574574- - util: Make sure to not access NULL control messages, say in the case of the
574574+ - util: Make sure to not dereference NULL control messages, say in the case of the
575575 server failing to create a swapchain. Also add a whole bunch of paranoia when
576576 it comes to the alignment of the control message buffers.
577577 ([!359](https://gitlab.freedesktop.org/monado/monado/merge_requests/359))
+4-6
doc/changes/README.md
···5555Markdown-formatted text describing the change briefly. Reference metadata will
5656be used to automatically add links to associated issues/merge requests/pull
5757requests, so no need to add these in your fragment text. The simplest changelog
5858-fragment just contains one line of Markdown text describing the change:
5858+fragment contains one line of Markdown text describing the change:
59596060```md
6161Here the author of a change has written some text about it.
6262```
6363-6464-(If you change the template in your Proclamation config file, your project can use a different markup format than Markdown.)
65636664### References
6765···9593project.)
96949795To specify additional references in a file, prefix the contents of the changelog
9898-fragment with a block delimited above and below by `---`, with one reference on
9696+fragment with a block delimited before and after by `---`, with one reference on
9997each line. (This can be seen as a very minimal subset of "YAML Front Matter", if
10098you're familiar with that concept.) For example:
10199···109107110108There are provisions for providing your own reference parser if this format is
111109entirely unusable, but they're underdeveloped. (Most use cases found by the
112112-original author can actually be accommodated just by changing the template and
110110+original author can actually be accommodated by changing the template and
113111specifying `.`-delimited fields in references.) If this functionality is
114112interesting to you, get involved in the development of Proclamation and help
115113finish it!
···166164 - `insert_point_pattern` - Useful mainly if you're not using the default
167165 template. The first match of this regex will be considered the first line of
168166 a release entry, and your new release will be put in your changelog file
169169- above it. Default works with the default template (looks for a second-level
167167+ before it. Default works with the default template (looks for a second-level
170168 Markdown heading).
171169 - `extra_data` - Any extra data you'd like to pass along to your custom
172170 template.
+1-1
doc/changes/auxiliary/mr.839.1.md
···11util: added `u_device_2d_extents` and `u_setup_2d_extents_split_side_by_side` -
22this is hopefully to eliminate confusion: the FOV you had to give to
33-`u_device_split_side_by_side` was just a dummy value, but some people thought
33+`u_device_split_side_by_side` was a placeholder value, but some people thought
44it was the actual headset's FOV.
+1-1
doc/changes/misc_features/mr.695.md
···11-Implement tracking overrides via wrapper devices and add a tracking override configuration gui.
11+Implement tracking overrides using wrapper devices and add a tracking override configuration gui.
+1-1
doc/changes/misc_features/mr.715.md
···11-a/gst: Add a small and fairly dumb framework for integrating gstreamer pipelines
11+a/gst: Add a small and fairly naive framework for integrating gstreamer pipelines
22into Monado pipelines. Enough to be able to push frames into it and use various
33encoder elements.
+2-2
doc/changes/xrt/mr.1258.md
···11xrt: Add xrt_swapchain_create_properties to allow client compositors and IPC
22-code to query the main compositor how many images to create on a swapchain
33-(and in the future or properties as needed).
22+code to query the main compositor how many images to create on a swapchain,
33+and provide an extension point for more properties as needed.
+1-1
doc/changes/xrt/mr.721.4.md
···11Add `xrt_multi_compositor_control` that allows the `xrt_system_compositor` to
22expose a interface that the IPC layer can use to manage multiple clients
33without having to do the rendering. This allows us to move a lot of the code
44-out the IPC layer and make it more about just passing calls.
44+out the IPC layer and make it more about passing calls.
+6-6
doc/conventions.md
···11# Code Style and Conventions {#conventions}
2233<!--
44-Copyright 2021, Collabora, Ltd. and the Monado contributors
44+Copyright 2021-2022, Collabora, Ltd. and the Monado contributors
55SPDX-License-Identifier: BSL-1.0
66-->
77···1919## APIs
20202121Internal APIs, when it makes sense, should be C APIs. Headers that define
2222-general communication interfaces between modules (not just use of utilities)
2222+general communication interfaces between modules (not only use of utilities)
2323belong in the `xrt/include/xrt` directory, and should not depend on any other module outside
2424that directory. (As a historical note: this directory gets its name from a
2525compressed version of the phrase "XR RunTime", a generic term for Monado and an
···161161destroy function that does not take a pointer-to-a-pointer, make sure to do
162162null checks before calling and set it to null after it returns.
163163164164-Also note: when an interface includes a "destroy" function pointer, it just
165165-takes the normal pointer to an object: The free function wrapper is the one that
166166-takes a pointer-to-a-pointer and handles the null checks. See for example @ref
164164+Also note: when an interface includes a "destroy" function pointer, it takes the
165165+normal pointer to an object: The free function wrapper is the one that takes a
166166+pointer-to-a-pointer and handles the null checks. See for example @ref
167167xrt_instance_destroy takes the pointer-to-a-pointer, while the interface method
168168-@ref xrt_instance::destroy takes just the single pointer.
168168+@ref xrt_instance::destroy takes the single pointer.
+2-2
doc/frame-pacing.md
···7788A "brief" overview of the various time-points that a frame goes through, from
99when the application gets go ahead to render the frame to when pixels are turned
1010-into photons. This is only a single frame, where all of the timings are hit and
1010+into photons. This is only a single frame, where all of the timings are achieved and
1111the application is single threaded. The HMD also only turns on the display
1212during the vblank period, meaning the pixel to photon transformation is delayed
1313from scanout starting to the vblank period (like for the Index).
···4343* @ref xrt_comp_layer_stereo_projection - This and other layer functions are
4444 called to list the layers the compositor should render.
4545* @ref xrt_comp_layer_commit - The compositor starts to render the frame,
4646- trying to hit the **present** time.
4646+ trying to finish at the **present** time.
47474848[`VK_GOOGLE_display_timing`]: https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_GOOGLE_display_timing.html
+1-1
doc/howto-release.md
···47474848## Do gitlab release
49495050-The Gitlab UI has a friendly interface, just follow the guide there.
5050+The Gitlab UI has a friendly interface, follow the guide there.
+2-2
doc/howto-remote-driver.md
···55SPDX-License-Identifier: BSL-1.0
66-->
7788-## Prerequisites
88+## Prerequisites
991010Before proceeding you will need to have monado installed (or built) and capable
1111of running applications. If you do not have any hardware this should still work
1212-with the dummy driver. For those building Monado themselves you have to make
1212+with the simulated driver. For those building Monado themselves you have to make
1313sure the GUI is built. In short the commands `monado-gui` and `monado-service`
1414are needed.
1515
+1-1
doc/implementing-extensions.md
···2323* Implement the `oxr_` Monado internal functions in an appropriate source file
2424 `src/state_trackers/oxr/oxr_api_*.c`. Trivial functions can be implemented
2525 right there along with the usual parameter checks. More complex functions that
2626- access more internal monado state should call functions implemented in the
2626+ use more internal Monado state should call functions implemented in the
2727 relevant `oxr_*.c` file (without `_api_`). The definitions for those functions
2828 go into `src/xrt/state_trackers/oxr/oxr_objects.h`.
2929* Monado internal implementations of "objects" (think XrSession or
+12-12
doc/ipc.md
···1717 any, to start communication. (Auto-starting, where available, is handled by
1818 platform-specific mechanisms: the client currently has no code to explicitly
1919 start up the service.)
2020-- The client and service must share a dedicated channel for IPC calls (aka
2121- **RPC** - remote procedure call), typically a socket.
2222-- The service must share access to device data updating at various rates, shared
2323- by all clients. This is typically done with a form of **shared memory**.
2020+- The client and service must share a dedicated channel for IPC calls (also
2121+ known as **RPC** - remote procedure call), typically a socket.
2222+- The service must share device data updating at various rates, shared by all
2323+ clients. This is typically done with a form of **shared memory**.
24242525Each platform's implementation has a way of meeting each of these needs. The
2626specific way each need is met is highlighted below.
···47474848## Android Platform Details
49495050-On Android, in order to pass platform objects, allow for service activation, and
5050+On Android, to pass platform objects, allow for service activation, and
5151fit better within the idioms of the platform, Monado provides a Binder/AIDL
5252service instead of a named socket. (The named sockets we typically use are not
5353permitted by the platform, and "abstract" named sockets are currently available,
···9090`Surface`. By default, the JVM code will signal the mainloop to shut down a short
9191time after the last client disconnects, to work best within the platform.
92929393-At startup, just as on Linux, the shared memory segment is created. The
9494-[ashmem][] API is used to create/destroy an anonymous **shared memory** segment
9595-on Android, instead of standard POSIX shared memory, but is otherwise treated
9696-and used exactly the same as on standard Linux: file descriptors are duplicated
9797-and passed through IPC calls, etc.
9393+At startup, as on Linux, the shared memory segment is created. The [ashmem][]
9494+API is used to create/destroy an anonymous **shared memory** segment on Android,
9595+instead of standard POSIX shared memory, but is otherwise treated and used
9696+exactly the same as on standard Linux: file descriptors are duplicated and
9797+passed through IPC calls, etc.
98989999When the client side starts up, it creates an __anonymous socket pair__ to use
100100for IPC calls (the **RPC** function) later. It then passes one of the two file
···123123### Synchronization
124124125125Synchronization of new client connections is a special challenge on the Android
126126-platform, since new clients arrive via calls into JVM code while the mainloop is
127127-native code. Unlike Linux, we cannot simply use epoll to check if there are new
126126+platform, since new clients arrive using calls into JVM code while the mainloop is
127127+C/C++ code. Unlike Linux, we cannot simply use epoll to check if there are new
128128connections to our locating socket.
129129130130We have the following design goals/constraints:
+7-8
doc/targets.md
···3737cases, the entry point might be provided by one of the modules being combined to
3838form the target. For instance, an OpenXR runtime must expose
3939`xrNegotiateLoaderRuntimeInterface`: this function is provided by the OpenXR
4040-state tracker `st_oxr`, so the OpenXR runtime target just has to link the state
4141-tracker in and ensure that symbol is present and visible in the final build
4242-product.
4040+state tracker `st_oxr`, so the OpenXR runtime target links the state tracker in
4141+and ensures that symbol is present and visible in the final build product.
43424444-Then, the target must provide access to the collection of devices desired.
4545-Target device access is provided by implementing the `xrt_instance` interface in
4646-your target and providing a definition of `xrt_instance_create` that
4747-instantiates your implementation.
4343+Then, the target must provide an interface to the collection of devices desired.
4444+This is done by implementing the `xrt_instance` interface in your target and
4545+providing a definition of `xrt_instance_create` that instantiates your
4646+implementation.
48474948All methods of `xrt_instance` are required, though the `get_prober` method may
5049output a null pointer if the instance is not using a prober, and targets that do
···8584- The runtime has a "stub" or "client proxy" implementation that delegates to
8685 the service over the IPC.
8786- The service has a normal or complete instance implementation that actually
8888- provides access to devices, etc.
8787+ provides hardware device interaction, etc.
89889089
+1-1
doc/tracing.md
···54545555# Start the daemon ftrace probes daemon.
5656# Only needs to be run once and keeps running.
5757-# Not needed with the above config.
5757+# Not needed with the preceding config.
5858./perfetto/out/linux_clang_release/traced_probes &
59596060# When you want to run a capture do and then run Monado.
+1-1
doc/vulkan-extensions.md
···48484949## Notes
50505151-Kept out of the table above to limit its width.
5151+Kept out of the preceding table to limit its width.
52525353* Server type:
5454 * a: Windowed
+7-7
doc/writing-a-new-driver.md
···8888various targets (OpenXR runtime shared library, service executable, utility
8989executables) also found in `src/xrt/targets`. If you're using Monado as a
9090toolkit or component rather than as a standalone runtime and service, you can
9191-replicate whatever portions of the target lists in your own target, or just
9292-directly implement the @ref xrt_instance interface more directly, linking in
9393-only those drivers and components you need. **Note**, however, that Monado is
9494-intended to not expose any external API other than the OpenXR API: the @ref
9595-xrt_iface are subject to change as required so those writing drivers or other
9696-software on those interfaces are encouraged to upstream as much as possible to
9797-minimize maintenance burden.
9191+replicate whatever portions of the target lists in your own target, or directly
9292+implement the @ref xrt_instance interface more directly, linking in only those
9393+drivers and components you need. **Note**, however, that Monado is intended to
9494+not expose any external API other than the OpenXR API: the @ref xrt_iface are
9595+subject to change as required so those writing drivers or other software on
9696+those interfaces are encouraged to upstream as much as possible to minimize
9797+maintenance burden.