Repository navigation
A MetalVR route for Steam games, and MULLION_METALVR for what it runs - #804
Merged
Merged
Conversation
…game's hero MetalVR (an OpenXR runtime and SteamVR driver for headsets on a Mac) gets a route of its own in the pipeline menu of Steam games, beside Mullion, on both runtimes. When it is chosen, a "Start VR Server" button sits to the right of the hero's settings button: it starts metalvrd and turns into "Exit VR Server", so the server never outlives what the user asked for. - The backend's /metalvr/status, /metalvr/start and /metalvr/stop run ~/.metalsharp/metalvr-runtime/bin/metalvrd (the driver named in ~/.metalsharp/metalvr/driver, a Rift by default), detached, logging to logs/metalvrd.log. Starting it asks once for Screen Recording, which the headset uses to show a starting game's window, and makes MetalVR the Steam prefix's OpenXR runtime and SteamVR's headset driver. - A game on the route launches as on Mullion, after checking the server is up, and through the game's VR launch entry (steam://launch/<id>/VR), as SteamVR's own library starts it. - The x86_64 runtime's Steam client runs on Mullion too, as FEX's already does, so SteamVR's compositor shares textures with the driver. Switching a running client to that lane restarts it when no Wine program is running. - ~/.metalsharp/debug/wine-env, when present, puts its MTL_* and MULLION_* lines in the environment of the Wine programs the backend starts, Steam included: for a Metal capture of a process the user can't start themself.
Mullion shares Direct3D 11 buffers and Direct3D 12 textures between processes only for a VR runtime, which says so with MULLION_METALVR. SteamVR's compositor and the games it shows pass each other their frames' bookkeeping that way: without it a SteamVR game runs but is black in the headset. The variable is set for every Wine program started here while ~/.metalsharp/metalvr-runtime has metalvrd, the Steam client included, since SteamVR and the games Steam starts take their environment from it. Without MetalVR it is unset, and Mullion behaves as it does for everything else.
# Conflicts: # app-gpui/backend-route-inventory.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
Two commits:
metalvrdand turns into "Exit VR Server". The x86_64 runtime's Steam client runs on Mullion too, as FEX's already does, so SteamVR's compositor shares textures with MetalVR's driver.MULLION_METALVRfor Wine programs while MetalVR is installed. Mullion shares Direct3D 11 buffers and Direct3D 12 textures between processes only for a VR runtime, which says so with this variable. SteamVR and the games Steam starts inherit the Steam client's environment, so it is set for every Wine program started here while~/.metalsharp/metalvr-runtimehasmetalvrd, and unset otherwise.Depends on
What was run
-Werror(makeinapp/src-c).~/.metalsharp/debug/wine-env, and the Mullion build from the PR above, ABE VR shows through SteamVR on a Rift CV1 (FEX runtime).Not run
make test).