File: swapchain_allocation_ipc_d3d.mmd

package info (click to toggle)
monado 25.0.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 22,708 kB
  • sloc: cpp: 175,132; ansic: 141,570; python: 2,913; java: 753; xml: 735; sh: 403; javascript: 255; makefile: 58
file content (27 lines) | stat: -rw-r--r-- 1,314 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
%% Copyright 2024, Collabora, Ltd. and the Monado contributors
%% SPDX-License-Identifier: BSL-1.0

%% Out of process, D3D client API
sequenceDiagram
    box Client Process
        participant app
        participant cc as D3D client compositor
        participant client_native as client process<br/>native compositor<br/>(IPC Stub)
    end
    box Server Process
        participant server_ipc_handler as Server IPC handler
        participant server_comp as Server xrt_compositor_native
    end

    app->>+cc: xrCreateSwapchain
    Note over cc: create images<br/>(because d3d cannot reliably import from Vulkan)
    Note over cc: export images to handles
    Note over cc: import handles to images for app
    cc->>+client_native: xrt_comp_import_swapchain(xrt_image_native[])<br/>(import handles into xrt_swapchain_native)
    client_native->>+server_ipc_handler: swapchain_import<br/>(IPC call, copies handles)
    server_ipc_handler->>+server_comp: xrt_comp_import_swapchain(xrt_image_native[])
    server_comp->>-server_ipc_handler: xrt_swapchain impl
    server_ipc_handler->>-client_native: swapchain ID (over IPC)
    client_native->>-cc: return ipc_swapchain<br/>as inner xrt_swapchain
    Note over cc: Keep reference to inner xrt_swapchain in<br>the object we create
    cc->>-app: return swapchain