···228[SCM_RIGHTS]: https://man7.org/linux/man-pages/man3/cmsg.3.html
229[win32handles]: https://lackingrhoticity.blogspot.com/2015/05/passing-fds-handles-between-processes.html
230[WinSCM_RIGHTS]: https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/#unsupportedunavailable
231+232+## 32 bits client support on 64 bits server
233+234+On 64 bits system, the server process will typically be a 64 bits executable,
235+clients may be 32 or 64 bits. As IPC either through socket or shared memory will
236+share C struct directly, we must pay attention to memory layout.
237+238+All data types must be fixed size and alignments must be based on the 64 bits
239+targets. On Linux this mostly means `alignas(8)` must be used for (u)int64_t.
+8-1
src/xrt/include/xrt/xrt_compositor.h
···409 *
410 * The layer may be displayed after this point, but must never be
411 * displayed before.
00412 */
413 alignas(8) int64_t timestamp;
414···478 */
479struct xrt_layer_frame_data
480{
0481 alignas(8) int64_t frame_id;
482 int64_t display_time_ns;
483 enum xrt_blend_mode env_blend_mode;
···931struct xrt_session_info
932{
933 bool is_overlay;
0934 alignas(8) uint64_t flags;
935 uint32_t z_order;
936};
···945 //! Number of formats, never changes.
946 uint32_t format_count;
947948- //! Supported formats, never changes.
000949 alignas(8) int64_t formats[XRT_MAX_SWAPCHAIN_FORMATS];
950951 //! Max texture size that GPU supports (size of a single dimension), zero means any size.
···409 *
410 * The layer may be displayed after this point, but must never be
411 * displayed before.
412+ *
413+ * alignas for 32 bit client support,
414 */
415 alignas(8) int64_t timestamp;
416···480 */
481struct xrt_layer_frame_data
482{
483+ //! alignas for 32 bit client support, see @ref ipc-design
484 alignas(8) int64_t frame_id;
485 int64_t display_time_ns;
486 enum xrt_blend_mode env_blend_mode;
···934struct xrt_session_info
935{
936 bool is_overlay;
937+ //! alignas for 32 bit client support, see @ref ipc-design
938 alignas(8) uint64_t flags;
939 uint32_t z_order;
940};
···949 //! Number of formats, never changes.
950 uint32_t format_count;
951952+ /*!
953+ * Supported formats, never changes.
954+ * alignas for 32 bit client support, see @ref ipc-design
955+ */
956 alignas(8) int64_t formats[XRT_MAX_SWAPCHAIN_FORMATS];
957958 //! Max texture size that GPU supports (size of a single dimension), zero means any size.
+1
src/xrt/include/xrt/xrt_device.h
···164 //! Is this input active.
165 bool active;
1660167 alignas(8) int64_t timestamp;
168169 enum xrt_input_name name;
···164 //! Is this input active.
165 bool active;
166167+ //! alignas for 32 bit client support, see @ref ipc-design
168 alignas(8) int64_t timestamp;
169170 enum xrt_input_name name;
+2
src/xrt/include/xrt/xrt_system.h
···169 * All valid values are greater then zero; this is to
170 * make init easier where any cache can start at zero and be guaranteed
171 * to be replaced with a new @ref xrt_system_roles.
00172 */
173 alignas(8) uint64_t generation_id;
174
···169 * All valid values are greater then zero; this is to
170 * make init easier where any cache can start at zero and be guaranteed
171 * to be replaced with a new @ref xrt_system_roles.
172+ *
173+ * alignas for 32 bit client support, see @ref ipc-design
174 */
175 alignas(8) uint64_t generation_id;
176