-
-
Notifications
You must be signed in to change notification settings - Fork 444
Add per-container OpenComposite support #1853
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
TheReal-Flo
wants to merge
5
commits into
utkarshdalal:vr-support-perf
Choose a base branch
from
TheReal-Flo:vr-support-perf
base: vr-support-perf
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,899
−136
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d4af1eb
Add per-container OpenComposite support
TheReal-Flo 7fe36a1
Fix OpenComposite background session handling
TheReal-Flo 47d4c7f
Track OpenComposite build toolchain inputs
TheReal-Flo dbe1916
Add native OpenVR and Android XR immersive support
TheReal-Flo e894b26
Fix Quest immersive activity launch
TheReal-Flo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| *.patch whitespace=-space-before-tab |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # Project agent instructions | ||
|
|
||
| ## Remote Quest ADB through Tailminal | ||
|
|
||
| - A Quest 3 is attached by ADB to the tailnet host `lily`. Local `adb devices` | ||
| may be empty; check the remote ADB server before concluding that the headset | ||
| is unavailable. | ||
| - Tailminal is already installed on this workstation and running on `lily`. | ||
| It connects directly over Tailscale. Its operating guide is | ||
| <https://tailminal.justfeli.dev/llms.txt>. | ||
| - From PowerShell on this workstation, invoke the npm CMD launcher explicitly. | ||
| The `.ps1` wrapper has mishandled the `--` command boundary here: | ||
|
|
||
| ```powershell | ||
| & "$env:APPDATA\npm\tailminal.cmd" exec lily --timeout-ms 30000 -- "adb devices -l" | ||
| ``` | ||
|
|
||
| - Pass the entire remote command after `--` as one quoted argument. Prefer | ||
| one-shot `exec` calls with a finite `--timeout-ms` for unattended work: | ||
|
|
||
| ```powershell | ||
| & "$env:APPDATA\npm\tailminal.cmd" exec lily --timeout-ms 30000 -- "adb shell getprop ro.product.model" | ||
| & "$env:APPDATA\npm\tailminal.cmd" exec lily --timeout-ms 30000 -- "adb shell tail -n 300 /sdcard/Android/data/app.gamenative/files/gamenativevr/launch.log" | ||
| & "$env:APPDATA\npm\tailminal.cmd" exec lily --timeout-ms 30000 -- "adb logcat -d -v threadtime -t 1000" | ||
| ``` | ||
|
|
||
| - `tailminal hosts` depends on a local Tailminal server and may return no peers | ||
| when that server is stopped. Directly addressing the MagicDNS host `lily` | ||
| still works. If a direct command fails, check `tailscale status`, then retry | ||
| the Tailminal health/command path before treating the Quest as disconnected. | ||
| - Tailminal grants a full shell on the remote host. Keep commands scoped to the | ||
| requested task, prefer read-only diagnostics first, and do not install, | ||
| delete, reboot, or otherwise mutate the headset unless the user's request | ||
| authorizes it. |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
| xmlns:tools="http://schemas.android.com/tools"> | ||
|
|
||
| <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" tools:node="remove" /> | ||
| <uses-permission android:name="android.permission.READ_LOGS" tools:node="remove" /> | ||
| <uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove" /> | ||
| <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:node="remove" /> | ||
| <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" tools:node="remove" /> | ||
| <uses-permission android:name="android.permission.POST_NOTIFICATIONS" tools:node="remove" /> | ||
| <uses-permission android:name="android.permission.RECORD_AUDIO" tools:node="remove" /> | ||
|
|
||
| <!-- Android XR dedicated-track/runtime capability. The launcher itself remains a | ||
| conventional Home Space activity; only the activity below owns an OpenXR session. --> | ||
| <uses-feature | ||
| android:name="android.software.xr.api.openxr" | ||
| android:required="true" /> | ||
| <uses-feature | ||
| android:name="android.hardware.xr.input.controller" | ||
| android:required="false" /> | ||
|
|
||
| <application> | ||
| <!-- Required for Android XR's brokered OpenXR runtime discovery. The Khronos loader | ||
| remains packaged by the AAR and dynamically connects to this system library. --> | ||
| <uses-native-library | ||
| android:name="libopenxr.google.so" | ||
| android:required="false" /> | ||
|
|
||
| <!-- Moving between a Home Space panel and an unmanaged Full Space display changes | ||
| several display configuration fields. Handle those in place so the launcher does | ||
| not get recreated in the middle of its handoff to ImmersiveXrActivity. --> | ||
| <activity | ||
| android:name="app.gamenative.MainActivity" | ||
| android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|density|keyboard|keyboardHidden|navigation|uiMode|colorMode" | ||
| tools:replace="android:configChanges" /> | ||
|
|
||
| <activity | ||
| android:name="app.gamenative.ui.screen.xr.ImmersiveXrActivity" | ||
| android:exported="false" | ||
| android:launchMode="singleTask" | ||
| android:resizeableActivity="false" | ||
| android:screenOrientation="landscape" | ||
| android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|density|keyboard|keyboardHidden|navigation|uiMode|colorMode" | ||
| android:theme="@style/Theme.Pluvia"> | ||
| <!-- Current Android XR/OpenXR spelling. This is activity-scoped so MainActivity | ||
| retains the platform default (Home Space) launch mode. --> | ||
| <property | ||
| android:name="android.window.PROPERTY_XR_ACTIVITY_START_MODE" | ||
| android:value="XR_ACTIVITY_START_MODE_FULL_SPACE_UNMANAGED" /> | ||
| </activity> | ||
| </application> | ||
|
|
||
| </manifest> |
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
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
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
24 changes: 24 additions & 0 deletions
24
app/src/main/java/app/gamenative/ui/screen/xr/ImmersiveRuntimeViewModel.kt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| package app.gamenative.ui.screen.xr | ||
|
|
||
| import android.content.Context | ||
| import androidx.lifecycle.ViewModel | ||
| import app.gamenative.ui.screen.xr.windows.WindowsVrRuntimeService | ||
|
|
||
| /** Retains the Windows VR control server across Android activity configuration recreation. */ | ||
| internal class ImmersiveRuntimeViewModel : ViewModel() { | ||
| private var windowsVrRuntimeService: WindowsVrRuntimeService? = null | ||
|
|
||
| fun windowsVrRuntimeService(context: Context): WindowsVrRuntimeService = | ||
| windowsVrRuntimeService ?: WindowsVrRuntimeService(context.applicationContext).also { | ||
| windowsVrRuntimeService = it | ||
| } | ||
|
|
||
| fun closeWindowsVrRuntimeService() { | ||
| windowsVrRuntimeService?.close() | ||
| windowsVrRuntimeService = null | ||
| } | ||
|
|
||
| override fun onCleared() { | ||
| closeWindowsVrRuntimeService() | ||
| } | ||
| } |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P1: On non-Windows builds, the
androidXrAPK omitslibxrimmersive.so, so launchingImmersiveXrActivityfails withUnsatisfiedLinkError. Includesrc/modernXr/jniLibsin this source set or otherwise package the prebuilt library.Prompt for AI agents