mirror of
https://github.com/spoopyghosty0/frameport.git
synced 2026-10-11 00:01:00 +02:00
Compare commits
86
Commits
ui-refresh
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a4f73a88b7 | ||
|
|
e5658ed441 | ||
|
|
6bfaaf788f | ||
|
|
07da1c27a3 | ||
|
|
35462324bb | ||
|
|
2c1149815d | ||
|
|
c9b600d186 | ||
|
|
ca14fad3ce | ||
|
|
c4fa6557e1 | ||
|
|
1bb08bab36 | ||
|
|
cccafe86bc | ||
|
|
6fb4a52051 | ||
|
|
5f42c4bb01 | ||
|
|
37b8ac78a7 | ||
|
|
26b86f3f9d | ||
|
|
8d50d5a065 | ||
|
|
ce257b429a | ||
|
|
7e95c50f39 | ||
|
|
61ecc4d2ee | ||
|
|
391f43df95 | ||
|
|
60d8ab021b | ||
|
|
dfab8d68fd | ||
|
|
8167cb86c6 | ||
|
|
44bc689348 | ||
|
|
007db344d7 | ||
|
|
3fb2621030 | ||
|
|
39ca9a5f0d | ||
|
|
e64e8a95e0 | ||
|
|
69e888c7fe | ||
|
|
ce809c432d | ||
|
|
cdf900c6b7 | ||
|
|
d5b5b7751e | ||
|
|
351712172c | ||
|
|
f99aded40e | ||
|
|
f631e5fc1b | ||
|
|
26cee1551e | ||
|
|
82e2a40791 | ||
|
|
1c158930cd | ||
|
|
f812ea8716 | ||
|
|
3dc0a95379 | ||
|
|
f8244f582d | ||
|
|
69fbdfdc4a | ||
|
|
ef3272a31b | ||
|
|
b0f3ef2698 | ||
|
|
1711e7f7d9 | ||
|
|
ff6cdf3b6a | ||
|
|
28517a1999 | ||
|
|
af9c207ddf | ||
|
|
88045bcf4e | ||
|
|
5147710fad | ||
|
|
9c45cff09a | ||
|
|
b4848c0424 | ||
|
|
3a46b78361 | ||
|
|
75bbc6eb5f | ||
|
|
da638aea99 | ||
|
|
7c37b479db | ||
|
|
fa473c5ada | ||
|
|
1e6ce04e4f | ||
|
|
5cd5b119e7 | ||
|
|
186138cc3c | ||
|
|
98c7ca980a | ||
|
|
b2470b962a | ||
|
|
2a705bc6d1 | ||
|
|
5d44831757 | ||
|
|
456880501b | ||
|
|
63f7ae12e1 | ||
|
|
fa69ffefd2 | ||
|
|
f78bc82cc4 | ||
|
|
dfacf6a206 | ||
|
|
b2f14c1e2e | ||
|
|
03d7a311bf | ||
|
|
cd5119278b | ||
|
|
6ab3608a44 | ||
|
|
c0539af368 | ||
|
|
c6363140f4 | ||
|
|
187105b729 | ||
|
|
b983c0f11f | ||
|
|
c7cee33889 | ||
|
|
d9d73b8aec | ||
|
|
48455b9b72 | ||
|
|
af798c0bf3 | ||
|
|
ed714c9d65 | ||
|
|
832b401630 | ||
|
|
8814b1ce56 | ||
|
|
e9eedb2241 | ||
|
|
d3a35c307a |
No files matched your search
@@ -1,31 +1,30 @@
|
||||
name: Problem report
|
||||
description: A game or FramePort doesn't work (FramePort → "Report a problem…" fills this in and saves a diagnostics zip).
|
||||
description: A game or FramePort doesn't work (FramePort fills this in: "Report a problem…").
|
||||
title: "[Problem] "
|
||||
labels: ["bug"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Please attach the **diagnostics zip** FramePort saved (drag it into the "Diagnostics" box below). It contains
|
||||
logs, the recipe and device details with personal data removed — no game files. Without the app, it can be
|
||||
read with `frameport diag inspect <zip>`.
|
||||
Please attach the **diagnostics zip** FramePort saved: drag it into the "Diagnostics" box below. It holds logs
|
||||
and device details with personal data removed, and no game files.
|
||||
- type: input
|
||||
id: game
|
||||
attributes:
|
||||
label: Game
|
||||
description: Title — package id (version, engine / XR API); empty for app problems
|
||||
description: Title and package name; leave empty for problems with FramePort itself
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: What happens?
|
||||
description: What you did, what you expected, what you saw (in the headset, if it started)
|
||||
description: What you did, what you expected and what happened
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: findings
|
||||
attributes:
|
||||
label: Launch test / triage
|
||||
description: Filled in by FramePort from the last launch test
|
||||
label: Launch test
|
||||
description: Filled in by FramePort
|
||||
- type: textarea
|
||||
id: recipe
|
||||
attributes:
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
name: Working configuration
|
||||
description: Submit a recipe that works on the Steam Frame (FramePort → game menu → "Share working config…" fills this in).
|
||||
title: "[Working config] "
|
||||
name: Working recipe
|
||||
description: Share a recipe that works on the Steam Frame (FramePort fills this in: game menu → "Share working recipe…").
|
||||
title: "[Working recipe] "
|
||||
labels: ["working-config"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks! A maintainer reviews the recipe; once it's labelled `catalog-accepted`, a pull request adding it to
|
||||
`catalog/games/` is opened automatically. Please don't paste game files or links to them.
|
||||
Thanks! Once a maintainer accepts the recipe, it becomes built-in for everyone. Please don't share game files
|
||||
or links to them.
|
||||
- type: input
|
||||
id: game
|
||||
attributes:
|
||||
label: Game
|
||||
description: Title — package id (platform, version, engine / XR API)
|
||||
description: Title and package name (e.g. Lucky's Tale — com.playful.LuckysTale)
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: result
|
||||
attributes:
|
||||
label: Result
|
||||
description: works or issues (+ the last headless launch test)
|
||||
description: works or issues
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: recipe
|
||||
attributes:
|
||||
label: Recipe
|
||||
description: The catalog entry (catalog/games/<package>.yaml). Don't edit the package line.
|
||||
description: Filled in by FramePort. Don't edit the package line.
|
||||
render: yaml
|
||||
validations:
|
||||
required: true
|
||||
@@ -34,16 +34,16 @@ body:
|
||||
id: environment
|
||||
attributes:
|
||||
label: Environment
|
||||
description: FramePort, tool and SteamOS versions
|
||||
description: FramePort and SteamOS versions
|
||||
- type: textarea
|
||||
id: notes
|
||||
attributes:
|
||||
label: Notes
|
||||
description: What you checked in the headset, known issues, anything unusual
|
||||
description: What you checked in the headset and any known issues
|
||||
- type: checkboxes
|
||||
id: confirm
|
||||
attributes:
|
||||
label: Confirmation
|
||||
options:
|
||||
- label: I played the game in the headset with this recipe (headless launch tests can't check the picture).
|
||||
- label: I played the game in the headset with this recipe.
|
||||
required: true
|
||||
@@ -150,6 +150,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
actions: write # starts the pages workflow
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
- uses: astral-sh/setup-uv@v10.2.0
|
||||
@@ -185,6 +186,11 @@ jobs:
|
||||
echo; cat packaging/release-footer.md; } > "$notes" # short: the update dialog shows these notes
|
||||
gh release delete "$tag" --yes 2>/dev/null || true
|
||||
gh release create "$tag" out/* packaging/FramePort-selfsigned.cer --title "FramePort ${tag}" --notes-file "$notes"
|
||||
- name: Refresh the website's changelog (a release made with github.token starts no other workflow)
|
||||
continue-on-error: true
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: gh workflow run pages.yml --ref main
|
||||
|
||||
dev-release:
|
||||
# "Run workflow" with dev ticked: replaces the rolling `dev` pre-release (never shown by the automatic update check;
|
||||
@@ -194,6 +200,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
actions: write # starts the pages workflow
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
@@ -225,3 +232,8 @@ jobs:
|
||||
gh release delete dev --yes --cleanup-tag 2>/dev/null || true
|
||||
gh release create dev out/* packaging/FramePort-selfsigned.cer --prerelease --target "$GITHUB_SHA" \
|
||||
--title "FramePort dev build ${VERSION}" --notes-file "$notes"
|
||||
- name: Refresh the website's changelog (a release made with github.token starts no other workflow)
|
||||
continue-on-error: true
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: gh workflow run pages.yml --ref main
|
||||
@@ -1,5 +1,5 @@
|
||||
name: catalog-from-issue
|
||||
# A maintainer adds the label `catalog-accepted` to a "Working configuration" issue → this opens a PR adding the
|
||||
# A maintainer adds the label `catalog-accepted` to a "Working recipe" issue → this opens a PR adding the
|
||||
# recipe to catalog/games/. Never runs for unlabelled issues; the issue text is only read by the validating script
|
||||
# (never interpolated into shell commands). Needs Settings → Actions → "Allow GitHub Actions to create pull requests".
|
||||
on:
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
# The project page (site/, Astro) on GitHub Pages: https://frameport.app/
|
||||
# Rebuilt when the site, the docs it renders, the catalog or the showcase renders change on main, when a release is
|
||||
# published, and once a day (contributors, releases and the games board stay fresh). The games board also refreshes
|
||||
# itself from the catalog on main in the visitor's browser, so a catalog change shows before the next build.
|
||||
# One-time setup: Settings → Pages → Source: GitHub Actions; custom domain frameport.app (kept in the settings, not a
|
||||
# CNAME file: GitHub ignores that file for Actions deployments).
|
||||
name: pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'site/**'
|
||||
- 'docs/*.md'
|
||||
- 'catalog/games/**'
|
||||
- 'bootstrap/setup.sh'
|
||||
- 'docs/images/**'
|
||||
- 'docs/media/**'
|
||||
- 'docs/badges/**'
|
||||
- 'src/frameport/ui/icons/**'
|
||||
- '.github/workflows/pages.yml'
|
||||
release: # the changelog page shows every release (CI's own releases start this through workflow_dispatch)
|
||||
types: [published]
|
||||
schedule:
|
||||
- cron: '17 5 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: pages
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: site
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: 22
|
||||
cache: npm
|
||||
cache-dependency-path: site/package-lock.json
|
||||
- uses: actions/configure-pages@v6
|
||||
- run: sudo apt-get update -qq && sudo apt-get install -y --no-install-recommends ffmpeg # the video tiles' short previews
|
||||
- run: npm ci
|
||||
- run: npm test
|
||||
- run: npm run build
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # the contributors list (higher API limit)
|
||||
- uses: actions/upload-pages-artifact@v5
|
||||
with:
|
||||
path: site/dist
|
||||
|
||||
deploy:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
steps:
|
||||
- id: deployment
|
||||
uses: actions/deploy-pages@v5
|
||||
+10
@@ -20,3 +20,13 @@ CLAUDE.local.md
|
||||
REPORT.md
|
||||
.ruff_cache/
|
||||
.claude/worktrees/
|
||||
|
||||
# project page (site/)
|
||||
site/node_modules/
|
||||
site/dist/
|
||||
site/.astro/
|
||||
site/public/media/
|
||||
site/src/assets/media/
|
||||
site/media-hq/
|
||||
site/public/s
|
||||
site/public/setup.sh
|
||||
@@ -154,7 +154,11 @@ Read `docs/PLAYBOOK.md` (symptom → fix) before debugging a game, and `docs/FRA
|
||||
doesn't do). `VD.bat` is Virtual Desktop's launcher: ignore it except as an exe-location hint. Library migration
|
||||
`rift_run_direct` resets existing recipes.
|
||||
Auto launch-test is skipped on PC installs (it would start the game on the user's desktop). Launch tests collect the Unreal
|
||||
game log + crash summaries from the Proton prefix; triage `unreal-crash`. Lies Beneath via Proton without Revive
|
||||
game log + crash summaries from the Proton prefix; triage `unreal-crash`. Agent v67 adds Unity's logs (LocalLow/<Company>/<Product>/Player(-prev).log via `<Name>_Data/app.info`,
|
||||
`output_log.txt`, Temp/…/Crashes/*/error.log; `unity_logs`) to launch tests and diagnostics; triage `unity-vr-init` /
|
||||
`unity-crash`. A catalog recipe verified with another build (catalog `xr` ≠ the build's) keeps the build's own
|
||||
`pcvr.launch_args` (`engine._other_build`; GitHub #105: SUPERHOT VR's Oculus+OpenVR build needs `-vrmode OpenVR`,
|
||||
the catalog's is the OpenXR build); Electron launchers next to a game rank −30 (`rift.is_electron`). Lies Beneath via Proton without Revive
|
||||
crashed (UE 4.23 "Unhandled exception").
|
||||
- Rift scanning: `sources/rift_dump.scan` = the scanned folder's subfolders are games (one per folder; a folder is a
|
||||
game if all candidate exes sit under one child), recursing into collections; `analysis/rift.py` walks once,
|
||||
@@ -277,7 +281,17 @@ Rick and Morty runs on the Frame via its catalog recipe (OpenVR, no Revive),
|
||||
by hand: the "Update now" button path (same apply(), called from the running app). macOS: CI smoke only.
|
||||
- `agent/frameport_agent.py` — runs **on the Frame** (python3 stdlib only), JSON over SSH. Owns the install layout,
|
||||
launch.sh template, Steam shortcuts (binary VDF), launch tests. Bump `AGENT_VERSION` when changing it.
|
||||
- `bootstrap/bootstrap.sh` — one-time Frame setup served by the pairing server (sshd, app key, avahi service, Lepton).
|
||||
- `bootstrap/bootstrap.sh` — one-time Frame setup served by the pairing server (app key, podman fix, Developer Mode, Lepton).
|
||||
`bootstrap/setup.sh` — the setup URL (`curl -sL frameport.app/s | bash`, copied to the site by
|
||||
`site/scripts/sync-media.mjs`): finds the PC (stdlib mDNS on 5353 for `_frameport-pair._tcp`, which the pairing
|
||||
server announces while open; else the USB address and a /24 scan of `/ping`), `/hello` → the user clicks Allow (4
|
||||
digits on both sides, `ask_digits`) → `/wait` hands over the code → runs bootstrap.sh exactly like the typed line.
|
||||
Checked on the dev Frame 2026-10-10 (mDNS and scan paths) with a stub bootstrap; tests/test_setup_url.py.
|
||||
Auto-pairing (`frame/autopair.py`, `app._start_auto_pair`, setting `frame.auto_pair`, default on; off with
|
||||
FRAMEPORT_HOME/FRAMEPORT_NO_AUTO_PAIR): while no Frame is connected, Frames in Developer Mode (devkit mDNS, else a
|
||||
30 s scan of the /24s for :32000/login-name, deduped by host key) are connected if FramePort's key works, else
|
||||
offered the key via devkit.register every 4 s (refused at once until Pair new host is open; 45 s back-off after an
|
||||
unanswered request). This WSL dev PC never hears the Frame's mDNS (Hyper-V firewall): the scan finds it.
|
||||
- `catalog/games/<package>.yaml` (installed apps also fetch these from GitHub `main`, see "Catalog updates") — 38 recipes (34 verified 2026-09-28; Deadpool VR, 4XVR, NEX Player and AC Nexus's
|
||||
90 Hz default confirmed later by the owner); `catalog/triage.yaml` — log signatures → fixes.
|
||||
- `native/` — sources of the prebuilt binaries in `artifacts/` (adapter, VrApi bridge patches, GL shim, stubs).
|
||||
@@ -694,6 +708,7 @@ FrameBridge `snapshot=N` (`snapshot_gl.c`, GLES): every N s the left-eye image t
|
||||
own context and saved as `files/fb_snap_0-7.ppm` (quarter size) — headless launches show a black headset view, this
|
||||
shows what the game draws. Vader: Lucasfilm logo (an OBB mp4: video works), then its loading card (portrait + segmented
|
||||
bar) that never advances; the async loader thread sleeps and OBB reads stop (~168 MB of a 2.7 GB pak).
|
||||
**Lepton's logcat mirror dies (agent v67, 2026-10-09):** occasionally launch.log ends with `logcat: Unexpected EOF!` right after the game starts (about 1 launch in 50, Lepton 2.8.14 and 3.0.5): no dashboard auto-hide, no launch-test result. launch.sh's `_logcat_keeper` then reads `podman exec lepton-steamlaunch-<appid> logcat` itself into launch.log (up to 5 restarts while the game runs).
|
||||
**Double launch (agent v57, 2026-10-06):** a second Play while Lepton still boots (~10 s with nothing to see) made
|
||||
the second Lepton stop the first one's container ("Waiting for steamlaunch-<appid> (PID …) to exit", exit 137
|
||||
"(starting)", "Clearing baked app data due to early exit") and both died (Vader, BattleSisters). launch.sh now takes
|
||||
@@ -721,6 +736,69 @@ head-pose deadline ends VR mode without a worn headset (not a game bug).
|
||||
|
||||
**Language packs (merged from PR #20, 2026-10-04):** overport's `libovrplatformloader.so` is a dispatcher that `dlopen`s Meta's own loader (`libovrplatformloader_meta.so` / `_meta_q1.so`, also `libpxrplatformloader.so`) and keeps its own message queue; `ovr_LanguagePack_GetCurrent/SetCurrent` are 8-byte `return 0` stubs in it, `ovr_AssetFile_GetList` forwards to Meta's loader. `frame.langpacks` (opt-in, `native/langpack`) serves `<tag>.lang` files from the game's data; `elf.hide_exports` marks the loader's exports STB_LOCAL (bionic and glibc only match GLOBAL/WEAK; verified for glibc, bionic's `is_symbol_global_and_defined` is from memory). `libfp_langpack.so` is built here (`python native/build.py --only langpack`) and committed. Owner-verified 2026-10-04: Deadpool VR with only `en.lang` and the patch on plays English dialogue and runs normally (headless launch tests show 2-6 fps while it loads: not a regression sign). A dispatcher answer that arrives after we answered the timed-out GetList is dropped (one answer per request); games already in a library get `lang_packs` filled after an app update (`library._refresh_data_fields`). The library logs to logcat under the tag `fp_langpack` (dirs looked in, packs found, every language-pack call), so it shows up in the game's `launch.log`; an `ovr_AssetFile_GetList` the dispatcher leaves unanswered for 1.5 s is answered with our packs alone. Deadpool VR (Unreal) accepts a pack only when its `Metadata` equals the game's own version string (`ULanguagePacksSubsystem` compares it with `%s.%s.%s.%s.%s` built from the build info, e.g. `1.0.40.356975.Quest` = versionName; found by disassembling `libUE4.so`): the patch writes the APK's versionName into the library (`@FPMETA@` slot, `with_metadata`), `FRAMEPORT_LANGPACK_META` overrides it. Deadpool VR (2026-10-04, headset): German became selectable with that Metadata, but dialogue stayed silent (even English once reported as a pack) while the path was spelled `/sdcard/Android/obb/<pkg>/x.lang`; with the `/storage/emulated/0/Android/obb/<pkg>/x.lang` spelling (Unreal's own, now listed first in `scan_dirs`) German dialogue plays. `FRAMEPORT_LANGPACK_SKIP=<tags>` or a file `fp_langpack_skip` in the obb folder leaves packs out of the list (experiments).
|
||||
|
||||
**Cube swapchains (GitHub #107, 2026-10-09):** the Frame's runtime refuses `faceCount=6` swapchains (-2,
|
||||
XR_ERROR_RUNTIME_FAILURE); OVRPlugin ignores that ("CreateSwapchain for eye 0: 0x0, 0 stages") and crashes in
|
||||
ovrp_EndFrame4 (memset). FrameBridge `cube_standin` (default on, `native/adapter/cube_standin.c`) serves a refused cube
|
||||
swapchain as one GL cube-map texture in the app's context (GLES only) and drops its layers. Verified headless with
|
||||
Budget Cuts Ultimate (2048² sRGB, 12 mips; runs on at ~70 fps); what the cube layer showed is simply missing.
|
||||
**Hardware video decoding (PR #96, PR #128 by Lucas-Mathieu, adapted 2026-10-10, agent v71):** `native/hevc` = one
|
||||
OMX plugin `OMX.frameport.{avc,hevc,vp9}.decoder` (FFmpeg v4l2m2m on Iris /dev/video-dec0, FFmpeg software decoders as
|
||||
fallback inside the component, Vulkan copy for big native surfaces). The connection installs it once per Frame
|
||||
(`ensure_video_codec` → agent `video_codec_status`/`install_video_codec`: `~/.local/share/frameport/video-codec/versions/
|
||||
<manifest sha>` + `current` symlink). A Frame keeps the same or a newer `revision` (no flip-flop between PCs) → **bump
|
||||
`revision` in native/hevc/build.py with every artifact change**; a failed install isn't retried during the connection.
|
||||
Per game: only launchers of games whose recipe has `frame.hw_video_decode` (install stage, no APK change; suggested
|
||||
from analysis `media_codec`, ANALYSIS_VERSION 8; deployment.json `hw_video_decode`) get the codec line → the Podman
|
||||
wrapper (native/hevc/podman.py) mounts the plugin into that container (merged media_codecs.xml in
|
||||
$XDG_RUNTIME_DIR/frameport-video). Off for every game: Settings → Installing (library `video.hw_decode` → agent
|
||||
`video_codec_switch` = video-codec/disabled); one game: `FRAMEPORT_NO_HW_VIDEO=1 %command%`. `upgrade_launchers`
|
||||
converts agent ≤70 launchers (Batman's `<base>/frameport-codec` → keeps the line, folder then removed). Batman: catalog
|
||||
+ migration `batman_video_patches` (`frame.hw_video_decode` + hidden adapter setting `surface_native`). Iris: 8K
|
||||
refused (ENOMEM) while any other decoder session is open; SteamVR's vrlinkrunthread holds one ~12 s at game start →
|
||||
refused opens retry until 20 s after the plugin loaded (else 2 s), then software; VP9 7680x3840 never returned a
|
||||
picture → VP9 ≤4096x2304; hidden VP9 frames come back as empty capture buffers (bytesused 0, no LAST):
|
||||
FFmpeg's wrapper ended the EOS drain at the first one (two-pass VP9 lost its last ~25 frames) → build.py requeues
|
||||
them (codec revision 8; drain ends at LAST, or 1 s after a skipped empty buffer; dev Frame 2026-10-10: 600/600 =
|
||||
OMX.google.vp9 Y hashes). Rebuilds are deterministic (ext4 + NTFS path
|
||||
with spaces, two NDK copies → same; rev 8 141de01f…; PR #128's own sources → its 27a2d749…). Not yet run on the device.
|
||||
**Vulkan shader dump (GitHub #140, 2026-10-10):** adapter `vk_shader_dump=1` (Vulkan shim, `native/vkshim/shader_dump.h`;
|
||||
applies where vk_sanitize can: Unreal/Other arm64) writes each distinct SPIR-V module once to
|
||||
`files/fp_vk_shaders/<size>_<sha256>.spv` (tmp + rename) and one `index.txt` line per vkCreateShaderModule (`<seq> <ms>
|
||||
<unix ms> <name> new|known|again|failed`, O_APPEND) to find the module behind a GPU hang. Agent v72 `collect_diag`
|
||||
returns `shaders` (newest modules of fp_vk_shaders + fp_spirv, ≤4 MB each, base64) → bundle
|
||||
`games/<pkg>/target/shaders/`. Triage `gpu-hang` suggests both dumps; `triage.graphics_api` (FrameBridge's
|
||||
xrCreateSwapchain formats: <0x1000 Vulkan, else GL) keeps only the session's API's (`API_ONLY`). Host-tested only.
|
||||
**Vivox API 31 (GitHub #101, 2026-10-09):** newer Vivox builds (Green Hell VR) call Android 12 AudioManager
|
||||
communication-device methods from `com.vivox.sdk.AudioChangeListener` with no SDK check → NoSuchMethodError on Lepton's
|
||||
Android 11. `frame.vivox_audio_route` (analysis `vivox_api31`, ANALYSIS_VERSION 4) makes every such method return at
|
||||
once (`Dex.return_early`: return-void / `const/4 v0,0; return v0`; nopping the invoke would leave a move-result the
|
||||
verifier rejects). Older Vivox (Eleven Table Tennis, BattleSisters) lacks that code and isn't matched. Verified
|
||||
headless: Vivox initialises, 150 s at ~65-70 fps.
|
||||
**Steam Input gamepad for 2D apps (GitHub #162, agent v72, 2026-10-10):** Lepton's Android only has the Wayland seat's `wayland_touch/keyboard/pointer`. Steam makes its virtual pad (uinput, `/devices/virtual/input`, 28de:11ff, "Microsoft X-Box 360 pad N", ACL for steamos) only while the Frame's controllers are on (controller.txt "Steam Controller reserving XInput slot 0"; gone when they sleep), also with no game running; steamos-manager's 28de:0000 keys device isn't a pad (no BTN_SOUTH). Lepton's container root (system_server too) = steamos (`keep-id:uid=0`), so a bind-mounted `/dev/input/eventN` opens. Opt-in `device.steam_gamepad` (vr_kind none; suggested for `android.hardware.gamepad`/`LEANBACK_LAUNCHER`, analysis `gamepad`, ANALYSIS_VERSION 9): deployment.json `steam_gamepad` → launcher `GAMEPAD_LINE` (after the codec line: exports FRAMEPORT_GAMEPAD + LEPTON_ENV_SDL_GAMECONTROLLER_ALLOW_STEAM_VIRTUAL_GAMEPAD, puts `agent/bin` first on PATH) → `PODMAN_WRAPPER` (written by ensure_host_fixes; non-`run` calls go straight on; `run` imports the agent's `podman_run_args`; hands on to the next Podman after its own PATH entry with itself removed from PATH, so it chains to the codec wrapper either way round) adds the pads + `Vendor_28de_Product_<pid>.kl` (Xbox 360 layout). Verified headless with a uinput stand-in pad (Stremio's container: EventHub `classes=0x80000141`, our key layout, KeyEvent BUTTON_A dispatched); with Steam's real pad and a game: not yet. Pads made after the start aren't seen until the next one.
|
||||
**Multiview programs on flat framebuffers (GitHub #77, Doom3Quest, 2026-10-09, prototype):** Mesa enforces OVR_multiview's
|
||||
"program num_views == draw framebuffer views" rule (`draw_validate.c`, the draw is dropped silently); Qualcomm doesn't.
|
||||
Doom3Quest compiles every VS with `layout(num_views=2) in;` and draws its HUD/PDA into 2D-texture FBOs → black. Opt-in
|
||||
`frame.gl_multiview_fbo` (analysis `gl_multiview_libs`, ANALYSIS_VERSION 6; own-engine GLES only): `native/glmv` =
|
||||
`libfpglmv.so` (12 chars = "libGLESv3.so": libdoom3.so's one `.rodata` dlopen string is rewritten in place, its qgl*
|
||||
table comes from dlsym on that handle; also first DT_NEEDED for its direct gl*/egl* imports). Such draws use a lazily
|
||||
built single-view twin (view 0, uniforms copied per draw); eglMakeCurrent resets the per-thread cache. Host-tested only
|
||||
(rewriter on all 19 Doom3Quest shaders + glmv.c against a stand-in GL, `tests/test_gl_multiview_fbo.py`); the host's
|
||||
Mesa 23.2 llvmpipe has no OVR_multiview. Headset-verified by Xandrix1987 (2026-10-09: HUD/PDA shown, no fps drop) -> in the Doom3Quest catalog recipe.
|
||||
**Session triage (agent v70, 2026-10-09):** launch tests never reach FOCUSED, so real play sessions are triaged
|
||||
too. list_installed gives each game `last_play` {start, end, test} from `<anchor>/plays.log` (launch tests write a
|
||||
`test <unix>` line first → test sessions are only marked); `session_log` returns the newest session's launch.log
|
||||
(`<base>/session.log`, ≤4 MB: head + tail + FrameBridge/crash lines between) + that session's logcat-crash.log +
|
||||
`journalctl -k` GPU lines ("kernel: …"). The GUI's connection refresh (`app._check_sessions` → `pipeline.sessions_due`,
|
||||
background thread; sessions >7 days old are skipped) runs `pipeline.triage_session` = `validate/session.analyze`
|
||||
(triage.yaml signatures incl. `space-warp-used` (info, `question:`, never auto-applied), `gpu-hang` (`report: true`)
|
||||
+ computed `slow-frames` (pacing windows vs the nearest refresh rate) and `focus-dips` (FrameBridge always logs
|
||||
`focus: lost` / `focus: back after N ms`, session_fixes.c)) → library `last_session` / `last_session_checked` → game
|
||||
page "Last session" callout (Try this fix / Rebuild with this fix / Yes-No question / Report / Dismiss). Suggestions may
|
||||
be values (`adapter.scale=0.85`, `triage.split_suggestion`); adapter-only fixes are pushed live (`apply_suggestions_live`
|
||||
→ agent set_settings, like the Game settings dialog). CLI `frameport session <pkg> [--apply]`. PC VR (Proton) launchers
|
||||
log no session end, so they aren't triaged yet. pac_hints stays triage-only: a survey of all 68 dump APKs found unpaired
|
||||
PAC hints in 21 libraries of 18 games (OpenSSL's 38/40 in most UE4 libUE4.so and libEOSSDK.so, UE5 libUnreal.so ~400
|
||||
vs +2-3, libass, libopencv, …), most of them games that work, so default-on would rewrite many working builds.
|
||||
**Unresolved (as of 2026-09-28):** Arcsmith (right-eye distortion) and Time Stall (both eyes) — swap, tracking, Valve
|
||||
layers, depth, pacing ruled out. Sniper Elite VR (DEVICE LOST), Espire 1 (Mesa GL upload crash), HITMAN 3 (freedreno
|
||||
crash): use PC versions.
|
||||
|
||||
@@ -7,137 +7,125 @@
|
||||

|
||||

|
||||
|
||||
Install games that target the Meta Quest, Android, or general PCVR onto your **Valve Steam Frame**. FramePort handles everything from uploading game files, setting up your Frame, injecting compatibility patches, and adding shortcuts to your Steam library. FramePort aims to be as simple as possible by taking advantage of the fact that the Steam Frame runs on Linux.
|
||||
Install Quest games, Android apps, Linux apps and PC VR games on the **Valve Steam Frame**. FramePort sets up the
|
||||
Frame, patches each game so it runs there, uploads it and adds it to your Steam library with artwork.
|
||||
|
||||
[](docs/media/frameport-tour.mp4)
|
||||
|
||||
▶ [Watch the full tour](docs/media/frameport-tour.mp4) · New to FramePort? [Watch the install tutorial](docs/media/frameport-install.mp4)
|
||||
(about 90 seconds each, MP4; also attached to every release)
|
||||
(about 90 seconds each)
|
||||
|
||||
> **Notice:** FramePort explicitly does NOT download, share, or unlock games. You must provide legally obtained game
|
||||
> executables. Core features of FramePort simply download and wrap other published tools (see [Built on](#built-on))
|
||||
> with patches provided by FramePort adding a hardware compatibility layer. This enables users to use games/apps legally
|
||||
> purchased on sites like [SideQuest](https://sidequestvr.com/).
|
||||
> **Notice:** FramePort doesn't download, share or unlock games. Use games you got legally, for example from
|
||||
> [SideQuest](https://sidequestvr.com/). FramePort downloads published open-source tools (see [Built on](#built-on))
|
||||
> and adds its own patches so games run on the Frame.
|
||||
>
|
||||
> FramePort is a proof of concept.
|
||||
|
||||
## Features
|
||||
|
||||

|
||||
|
||||
- **Painless setup:** one short command on the Frame. No root, no `sudo`, no password.
|
||||
[What it changes](docs/FRAME_SETUP.md).
|
||||
- **Type on Frame:** use your computer's keyboard on the Frame: in VR apps, Android apps, Steam and the desktop.
|
||||
[More](#type-on-frame).
|
||||
- **One click per game:** convert, patch, sign, upload, add to Steam with artwork, launch test. Artwork that can't be found automatically can be picked from the stores or replaced with your own images.
|
||||
- **Per-game recipes:** a tested catalog plus detection rules; every patch explained in plain words.
|
||||
- **FrameBridge:** FramePort's OpenXR adapter emulates what the Frame natively lacks (passthrough, room, controller models,
|
||||
curved and 360° layers); game settings as simple switches.
|
||||
- **Beyond Quest:** Android apps as windows, PC VR via Proton or Revive, Windows (non-VR) games via Proton, a Files
|
||||
tab with drag and drop.
|
||||
- **Linux apps:** install Linux apps (AppImage, a folder, or a zip/tar archive) on the Frame with a Steam
|
||||
shortcut; arm64 builds run natively on SteamOS, x86_64 builds through Valve's FEX translator.
|
||||
- **Install links:** "Install with FrameDrop" buttons on web pages (the one-click protocol of the FrameDrop
|
||||
sideloader) and pasted links open in FramePort, which asks, downloads, adds and installs the build.
|
||||
- **Screenshots tab:** the screenshots you took in the headset, sorted by game (matched by play time) and day;
|
||||
view them and download them to your computer.
|
||||
- **Live view tab:** watch what the headset shows, with sound, in a browser window on your computer.
|
||||
- **Monitor tab:** the running game's frame rate, the Frame's load, temperatures, power and battery live, and its
|
||||
processes, which you can end. [More](#monitor).
|
||||
- **Self-updating** releases, redacted diagnostics, one-click problem reports and working-config sharing.
|
||||
- **Easy setup:** one line in the Frame's terminal. No root, no password. [What it changes](docs/FRAME_SETUP.md).
|
||||
- **One click per game:** patch, upload, add to Steam with artwork and test that it starts.
|
||||
- **Recipes:** tested patches and settings for 90+ games; other games get suggested patches, each explained in
|
||||
plain words.
|
||||
- **Game settings:** sharpness, refresh rate, controllers, 360° video and mixed reality as simple switches.
|
||||
- **More than Quest games:** Android apps in a window, Linux apps, PC VR games and Windows programs.
|
||||
- **Install links:** "Install with FrameDrop" buttons on websites open in FramePort.
|
||||
- **Your Frame from your PC:** Type on Frame (your keyboard on the Frame), Files, Screenshots, Live view (what the
|
||||
headset shows, in your browser) and Monitor (frame rate, temperatures, battery, processes).
|
||||
- **Updates itself**, and reports problems without personal data.
|
||||
|
||||
## Quick start
|
||||
|
||||
1. [Download](https://github.com/spoopyghosty0/frameport/releases/latest) and unzip the build for Windows, macOS
|
||||
(Apple Silicon) or Linux, then start FramePort.
|
||||
2. **Connect the Frame** (once):
|
||||
1. In FramePort click **Steam Frame → Show setup command**. Keep FramePort open; the Frame and your computer must
|
||||
be on the same Wi-Fi.
|
||||
2. On the Frame open the **SteamVR dashboard → Launch a program → Desktop**: the Linux desktop opens on a virtual
|
||||
screen.
|
||||
3. Open the app menu (bottom-left corner of that desktop) → **System → Konsole** (or search for Konsole).
|
||||
4. Type the command FramePort shows exactly as shown (on-screen keyboard or any USB/Bluetooth keyboard) and press
|
||||
**Enter**. This will run the following [bash setup script](bootstrap/bootstrap.sh).
|
||||
5. After a few seconds the desktop closes by itself (Steam restarts once); that's expected. If
|
||||
Steam asks to install **Lepton**, confirm it. FramePort shows the Frame as connected within a minute. No
|
||||
password needed.
|
||||
3. **Add games → Scan a folder** with your game backups (APK + OBB, or PC VR game folders).
|
||||
4. Open a game → **Install on Frame**, then play it from the Frame's Steam library.
|
||||
|
||||
Full guide, firewalls and troubleshooting: [docs/INSTALL.md](docs/INSTALL.md). Questions (e.g. how to lay out games
|
||||
with OBB files): [docs/FAQ.md](docs/FAQ.md).
|
||||
|
||||
## Type on Frame
|
||||
|
||||
Typing in VR is painful, so FramePort turns your computer's keyboard into a keyboard for the Frame. Open **Type on
|
||||
Frame** (its own tab in the sidebar), select a text field in the headset and type: searches, logins, chat, in any
|
||||
app, in Steam or on the desktop. Paste longer text to type it in one go. Nothing to install: FramePort adds a virtual
|
||||
keyboard on the Frame while the tab is open, without root.
|
||||
|
||||

|
||||
|
||||
Unity apps whose text fields close the moment you select them on the Frame (no system keyboard there) get a per-game
|
||||
fix, so Steam's on-screen keyboard and Type on Frame work in them too.
|
||||
[Details](docs/INSTALL.md#typing-on-the-frame).
|
||||
|
||||
## Screenshots
|
||||
|
||||
Screenshots you take in the headset show up in FramePort's **Screenshots** tab, grouped by day and matched to the game
|
||||
you were playing. Open one full size, step through them, and download single shots, a selection or all of them to
|
||||
your computer.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## Live view
|
||||
|
||||
The **Live view** tab streams what the headset shows, with its sound, to your computer: click **Start live view** and
|
||||
it opens in your default web browser (full screen with a double-click; click **Sound on** to hear it, as browsers start
|
||||
videos muted). Pick 360p to 1080p, or the headset view's full size. The picture comes from SteamVR's built-in headset
|
||||
view on the Frame and is encoded there while you watch (about one CPU core), so stop it when you're done. It's black
|
||||
while the headset sleeps.
|
||||
|
||||
## Monitor
|
||||
|
||||
The **Monitor** tab shows what the Frame is doing while it's open: the running game with its frame rate against the
|
||||
display's refresh rate, CPU, graphics chip, memory, the hottest temperature with the fan speed, power draw and battery
|
||||
time left, each with a 2-minute chart. **Show details** adds every CPU core, all temperature sensors, where the power
|
||||
goes and the network. Below, the game's processes (or Steam's, or all of them) with their CPU, GPU and memory use:
|
||||
right-click one to end it, or end the whole game. Programs that Steam, SteamVR or the desktop need are marked and ask
|
||||
again. The Frame sends the numbers itself (about 1 % of one CPU core) and stops when you leave the tab.
|
||||
Details for each: [Install and first steps](docs/INSTALL.md).
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## Quick start
|
||||
|
||||
1. [Download](https://github.com/spoopyghosty0/frameport/releases/latest) the build for Windows, macOS (Apple
|
||||
Silicon) or Linux, unpack it and start FramePort.
|
||||
2. In FramePort click **Steam Frame → Start setup**. The Frame and your PC must be on the same Wi-Fi (or use a USB
|
||||
cable).
|
||||
3. On the Frame open the **SteamVR dashboard → Launch a program → Desktop**, then the app menu → **System →
|
||||
Konsole**, and run:
|
||||
|
||||
```
|
||||
curl -sL frameport.app/s | bash
|
||||
```
|
||||
|
||||
4. Click **Allow** in FramePort when it shows the same 4-digit code as the Frame. Steam restarts once; if it asks to
|
||||
install **Lepton** (Valve's Android runtime), confirm it.
|
||||
5. **Add games → Scan a folder…** with your games, open one and click **Install on Frame**. Play it from the Frame's
|
||||
Steam library.
|
||||
|
||||
Full guide, firewalls and troubleshooting: [Install and first steps](docs/INSTALL.md). How to lay out game folders:
|
||||
[FAQ](docs/FAQ.md).
|
||||
|
||||
## Compatibility
|
||||
|
||||
If a game has already been tested with FramePort, it will automatically use the optimal game config. Otherwise, FramePort
|
||||
will attempt to guess key patches. If you find a new config that works for an app you are testing, please consider submitting it to the community!
|
||||
Tested games use their recipe (the patches and settings that work for them) automatically; for other games FramePort
|
||||
suggests patches. See the [list of tested games](docs/GAMES.md). Got a game working? Share its recipe from the game's
|
||||
**…** menu: [how](docs/INSTALL.md#share-a-recipe-or-report-a-problem).
|
||||
|
||||
**[List of tested games](docs/GAMES.md)**
|
||||
## Compared with other tools
|
||||
|
||||
**Tested something? Share it.** In FramePort open the game → **…** → **Share working recipe…** (it fills in the
|
||||
recipe for you) or **Report a problem…** (attaches a diagnostics zip with personal data removed). Without the app:
|
||||
[share a working config](https://github.com/spoopyghosty0/frameport/issues/new?template=working-config.yml) · [report a problem](https://github.com/spoopyghosty0/frameport/issues/new?template=bug-report.yml). Shared configs become built-in recipes for everyone.
|
||||
FrameDrop and Valve's own tools install an app as it is. FramePort differs in four ways:
|
||||
|
||||
- **Free and open source** (GPL-3.0). FrameDrop is free (donationware) without published source.
|
||||
- **Quest games that don't run on the Frame as they are** get converted and patched, with a tested recipe for 90+
|
||||
games. The others install the game unchanged.
|
||||
- **Windows, macOS and Linux.** FrameDrop is for Windows.
|
||||
- **Wi-Fi or a USB cable**, and no **Pair new host** step.
|
||||
|
||||
<details>
|
||||
<summary>All differences</summary>
|
||||
|
||||
| | **FramePort** | **FrameDrop** | **By hand with Valve's tools** |
|
||||
|---|---|---|---|
|
||||
| Cost and source code | Free, open source (GPL-3.0) | Free (donationware), source not published | Free, from Valve |
|
||||
| Runs on | Windows, macOS, Linux | Windows | Depends on the tool |
|
||||
| First connection | One line in the Frame's terminal; it turns on Developer Mode itself. No password | Turn on Developer Mode, then **Pair new host** | Turn on Developer Mode and pair, or use Android's debug tool (adb) |
|
||||
| Wireless or cable | Wi-Fi, the Frame's hotspot or a USB cable | Same Wi-Fi network | Wi-Fi, or adb |
|
||||
| Quest games that don't run as they are | Converted and patched for the Frame | Installed as they are | Installed as they are |
|
||||
| Knows which patches a game needs | Tested recipes for 90+ games, updated without an app update | Not stated | No |
|
||||
| In the Steam library | Yes, with artwork and tags | As a "Devkit Game" shortcut | As "Devkit Game: <title>"; not with adb |
|
||||
| Android apps, Linux apps, Windows programs | All three; Proton (runs Windows programs) is installed for you | All three; install Proton first | Yes; 2D Android apps need an extra file |
|
||||
| PC VR games | On your PC; some also on the Frame | Not supported | Not supported |
|
||||
| "Install with …" buttons on websites | Its own and FrameDrop's | FrameDrop's (it defined them) | No |
|
||||
| A game doesn't start | A launch test reads the logs and suggests a patch | A log viewer | No help |
|
||||
| Use the Frame from your PC | Live view, Monitor, Files, Screenshots, Type on Frame | Not stated | No |
|
||||
|
||||
</details>
|
||||
|
||||
Other tools as described on their own pages, checked 2026-10-09:
|
||||
[FrameDrop about](https://framedropvr.com/about) · [how-to](https://framedropvr.com/how-to) ·
|
||||
[install buttons](https://framedropvr.com/docs) · [Valve: loading games on Steam Frame](https://partner.steamgames.com/doc/steamhardware/steamframe/loadgames).
|
||||
Out of date? [Report a problem](https://github.com/spoopyghosty0/frameport/issues/new).
|
||||
|
||||
## Built on
|
||||
|
||||
Most of the work is done by these projects:
|
||||
[OVRPort](https://github.com/Android-XR-Bridge/OVRPort) (Quest → OpenXR, originally
|
||||
[ovrport/app](https://github.com/ovrport/app)) · Valve Lepton, Proton and SteamVR ·
|
||||
[Revive](https://github.com/LibreVR/Revive) · Mesa (Zink) · [Khronos OpenXR SDK](https://github.com/KhronosGroup/OpenXR-SDK)
|
||||
· Eclipse Temurin, Android apksigner and NDK · [Flet](https://flet.dev) · OculusDB and Steam store data.
|
||||
What FramePort adds itself: [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md).
|
||||
What FramePort adds: [Architecture](docs/ARCHITECTURE.md).
|
||||
|
||||
## Documentation
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| [INSTALL.md](docs/INSTALL.md) | Install, connect, update, PC VR, files, problem reports |
|
||||
| [FRAME_SETUP.md](docs/FRAME_SETUP.md) | What setup changes on the Frame, networks and firewalls, undoing it |
|
||||
| [COMPATIBILITY.md](docs/COMPATIBILITY.md) | What runs and how well |
|
||||
| [GAMES.md](docs/GAMES.md) | Tested games and how well they run |
|
||||
| [PLAYBOOK.md](docs/PLAYBOOK.md) | Symptoms and fixes per game |
|
||||
| [FRAME_RUNTIME.md](docs/FRAME_RUNTIME.md) | Steam Frame runtime facts |
|
||||
| [ARCHITECTURE.md](docs/ARCHITECTURE.md) | How the code is organised |
|
||||
| [CONTRIBUTING.md](CONTRIBUTING.md) | Code, recipes, translations |
|
||||
| [Install and first steps](docs/INSTALL.md) | Install, connect, update, PC VR games, files, problem reports |
|
||||
| [What the setup changes](docs/FRAME_SETUP.md) | What setup changes on the Frame, networks and firewalls, undoing it |
|
||||
| [Compatibility](docs/COMPATIBILITY.md) | What runs and how well |
|
||||
| [Tested games](docs/GAMES.md) | Tested games and how well they run |
|
||||
| [FAQ](docs/FAQ.md) | Game folders and common questions |
|
||||
| [Porting playbook](docs/PLAYBOOK.md) | Symptoms and fixes per game |
|
||||
| [Steam Frame runtime reference](docs/FRAME_RUNTIME.md) | Facts about the Frame's runtime |
|
||||
| [Architecture](docs/ARCHITECTURE.md) | How the code is organized |
|
||||
| [Contributing](CONTRIBUTING.md) | Code, recipes, translations |
|
||||
|
||||
## Development
|
||||
|
||||
@@ -148,8 +136,9 @@ uv run frameport --help # command line
|
||||
uv run pytest # tests
|
||||
```
|
||||
|
||||
## AI Usage Notice
|
||||
While I would like to program everything manually, I no longer have much free time for personal projects. As a result I make use of AI tools to make it significantly quicker to debug compatibility issues.
|
||||
## AI usage
|
||||
|
||||
I don't have much free time for this project, so I use AI tools to debug compatibility problems faster.
|
||||
|
||||
## License
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@ FramePort is GPL-3.0-only (see `LICENSE`). It includes or downloads the followin
|
||||
| Android NDK runtime (statically linked libc++) | native Android libraries | Apache-2.0 with LLVM exception, plus legacy notices (`native/vrapi-bridge/licenses/ANDROID-NDK.txt`) |
|
||||
| Flet and Flutter (desktop app runtime) | release bundles | Apache-2.0 / BSD-3-Clause |
|
||||
| flet-dropzone / desktop_drop (drag-and-drop) | release bundles | Apache-2.0 / MIT |
|
||||
| FFmpeg 7.1.1 hardware HEVC wrapper (LGPL configuration, without GPL/nonfree components) | `artifacts/hevc/libstagefrighthw.so`; source/rebuild instructions in `native/hevc/build.py` and `native/hevc/README.md` | LGPL-2.1-or-later (`artifacts/hevc/COPYING.FFmpeg`); unmodified source: https://ffmpeg.org/releases/ffmpeg-7.1.1.tar.xz |
|
||||
| AOSP Android 11 native media/utility headers | `native/hevc/platform/` | Apache-2.0; copyright/license notices retained in the headers |
|
||||
| Python packages (paramiko, zeroconf, psutil, pyelftools, capstone, UnityPy, PyYAML, requests, typer, pyaxmlparser, Pillow, cryptography, …) | release bundles | their own licenses (see each package's metadata) |
|
||||
|
||||
FramePort's own native code (the FrameBridge adapter, GL/Vulkan/OpenXR shims, the Windows helpers) is GPL-3.0-only.
|
||||
|
||||
+782
-12
@@ -23,7 +23,6 @@ PC VR (Oculus Rift) games packed for the Frame (id "rift.<slug>"), run by Proton
|
||||
<dest>/<id>/compatdata/ Proton prefix = saves (kept across reinstalls), launch.log
|
||||
"""
|
||||
import base64
|
||||
import fcntl
|
||||
import glob
|
||||
import hashlib
|
||||
import json
|
||||
@@ -34,16 +33,51 @@ import shutil
|
||||
import struct
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import time
|
||||
import zipfile
|
||||
import zlib
|
||||
from types import SimpleNamespace
|
||||
|
||||
AGENT_VERSION = 66
|
||||
try:
|
||||
import fcntl
|
||||
except ImportError: # Windows: pc_revive loads this file for its VDF code only (GitHub #131)
|
||||
fcntl = None
|
||||
|
||||
AGENT_VERSION = 73
|
||||
HOME = os.path.expanduser("~")
|
||||
STEAM = os.path.join(HOME, ".local/share/Steam")
|
||||
ANCHORS = os.path.join(HOME, "Applications/quest-frame")
|
||||
LEPTON_APPID = "3029110" # fallback when no appmanifest names Lepton
|
||||
PKG_RE = re.compile(r"^[A-Za-z][A-Za-z0-9_]*(\.[A-Za-z0-9_]+)+$")
|
||||
VIDEO_CODEC_DIR = os.path.join(HOME, ".local/share/frameport/video-codec")
|
||||
VIDEO_CODEC_FILES = ("libstagefrighthw.so", "media_codecs_frameport.xml", "podman.py", "COPYING.FFmpeg")
|
||||
# Hardware video decoding (patch frame.hw_video_decode, per game): only launchers of games whose recipe has it put the
|
||||
# shared codec's Podman wrapper first on Lepton's PATH (it adds the codec plugin to that game's container). Off for
|
||||
# every game: FramePort's setting (VIDEO_CODEC_DIR/disabled); one game: FRAMEPORT_NO_HW_VIDEO=1 in its launch options.
|
||||
VIDEO_CODEC_LINE = ('codec_dir="$HOME/.local/share/frameport/video-codec"\n'
|
||||
'[[ "${FRAMEPORT_NO_HW_VIDEO:-0}" != 0 || -e "$codec_dir/disabled" || '
|
||||
'! -x "$codec_dir/current/bin/podman" ]] || export PATH="$codec_dir/current/bin:$PATH"')
|
||||
HW_VIDEO_PATCH = "frame.hw_video_decode"
|
||||
# earlier codec lines: agent <= 70 (per-game codec extracted from the APK, line in every launcher) and PR #128's
|
||||
# shared line (in every Lepton launcher)
|
||||
OLD_CODEC_LINES = ('[[ ! -x "$app_dir/frameport-codec/bin/podman" ]] || '
|
||||
'export PATH="$app_dir/frameport-codec/bin:$PATH"',
|
||||
'codec_bin="$HOME/.local/share/frameport/video-codec/current/bin"\n'
|
||||
'[[ ! -x "$codec_bin/podman" ]] || export PATH="$codec_bin:$PATH"')
|
||||
# Steam Input's virtual gamepad for 2D Android apps (patch device.steam_gamepad, per game, GitHub #162): Lepton's
|
||||
# Android only gets keyboard/pointer/touch from the Wayland seat, so a game never sees a controller. The launcher of a
|
||||
# game that has it puts FramePort's own Podman wrapper (PODMAN_WRAPPER, written next to the agent, independent of the
|
||||
# video codec) first on Lepton's PATH; for that game's `podman run` it bind-mounts Steam's virtual pads
|
||||
# (/dev/input/eventN) and a key layout, then hands on to the next Podman on PATH (the codec wrapper, if that game has
|
||||
# it, else Podman itself). LEPTON_ENV_SDL_... = SDL's hint that stops it ignoring Steam's virtual pad (Lepton passes
|
||||
# LEPTON_ENV_<NAME> to the app as <NAME>). Off for one game: FRAMEPORT_NO_GAMEPAD=1 in its launch options.
|
||||
GAMEPAD_PATCH = "device.steam_gamepad"
|
||||
PODMAN_BIN = os.path.join(HOME, ".local/share/frameport/agent/bin")
|
||||
GAMEPAD_LINE = ('[[ "${FRAMEPORT_NO_GAMEPAD:-0}" != 0 ]] || { export FRAMEPORT_GAMEPAD=1 '
|
||||
'LEPTON_ENV_SDL_GAMECONTROLLER_ALLOW_STEAM_VIRTUAL_GAMEPAD=1; '
|
||||
'[[ ! -x "$HOME/.local/share/frameport/agent/bin/podman" ]] || '
|
||||
'export PATH="$HOME/.local/share/frameport/agent/bin:$PATH"; }')
|
||||
|
||||
|
||||
class AgentError(Exception):
|
||||
@@ -675,12 +709,22 @@ def ensure_host_fixes():
|
||||
with open(CONTAINERS_CONF, "w") as f:
|
||||
f.write(text)
|
||||
changed.append("podman keyring=false")
|
||||
try:
|
||||
ensure_podman_wrapper() # used only by launchers with the gamepad line (device.steam_gamepad)
|
||||
except OSError:
|
||||
pass
|
||||
try:
|
||||
upgraded = upgrade_launchers()
|
||||
except Exception: # noqa: BLE001
|
||||
upgraded = []
|
||||
if upgraded:
|
||||
changed.append(f"launchers: exit watchdog, dashboard, play log ({len(upgraded)})")
|
||||
try:
|
||||
old = remove_old_codec_dirs()
|
||||
except Exception: # noqa: BLE001
|
||||
old = []
|
||||
if old:
|
||||
changed.append(f"per-game video codec folders removed ({len(old)})")
|
||||
try:
|
||||
entries = refresh_desktop_entries()
|
||||
except Exception: # noqa: BLE001
|
||||
@@ -1450,6 +1494,7 @@ def cmd_list_installed(args):
|
||||
apk = os.path.join(dep["base"], "lepton-app/game.apk")
|
||||
dep["apk_present"] = os.path.exists(apk)
|
||||
dep["apk_size"] = os.path.getsize(apk) if dep["apk_present"] else 0
|
||||
dep["last_play"] = last_play(dep["anchor"]) # agent v70: the PC triages a finished play session's log
|
||||
games.append(dep)
|
||||
return {"games": games}
|
||||
|
||||
@@ -1927,6 +1972,42 @@ def play_sessions():
|
||||
return [tuple(s) for s in sessions]
|
||||
|
||||
|
||||
TEST_MARK_WINDOW = 60 # s: a "test <unix>" line in plays.log marks a session starting this soon after as a launch test
|
||||
|
||||
|
||||
def last_play(anchor):
|
||||
"""The newest play session in <anchor>/plays.log: {start, end (None while it runs, and for Proton launchers, which
|
||||
exec the game), test (started by a launch test, not by the player)}, or None."""
|
||||
text = _tail(os.path.join(anchor, PLAYS_LOG), 8192)
|
||||
if not text:
|
||||
return None
|
||||
start = end = None
|
||||
tests = []
|
||||
for line in text.splitlines():
|
||||
parts = line.split()
|
||||
if len(parts) < 2 or not parts[1].isdigit():
|
||||
continue
|
||||
t = int(parts[1])
|
||||
if parts[0] == "start":
|
||||
start, end = t, None
|
||||
elif parts[0] == "end" and start is not None and t >= start:
|
||||
end = t
|
||||
elif parts[0] == "test":
|
||||
tests.append(t)
|
||||
if start is None:
|
||||
return None
|
||||
return {"start": start, "end": end, "test": any(0 <= start - t <= TEST_MARK_WINDOW for t in tests)}
|
||||
|
||||
|
||||
def mark_launch_test(anchor):
|
||||
"""A launch test runs the game's launcher, which logs a play session: mark it so the PC doesn't triage it as one."""
|
||||
try:
|
||||
with open(os.path.join(anchor, PLAYS_LOG), "a") as f:
|
||||
f.write(f"test {int(time.time())}\n")
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
|
||||
def session_game(t, sessions):
|
||||
"""Package whose play session contains time t (the latest start wins), else None."""
|
||||
hit = None
|
||||
@@ -2262,6 +2343,7 @@ export XDG_RUNTIME_DIR="/run/user/$(id -u)"
|
||||
export DBUS_SESSION_BUS_ADDRESS="unix:path=$XDG_RUNTIME_DIR/bus"
|
||||
export IS_PARENT=true
|
||||
{extra_env}
|
||||
{video_codec}
|
||||
child=''
|
||||
stop() {{
|
||||
trap - EXIT INT TERM
|
||||
@@ -2277,6 +2359,7 @@ trap 'exit 143' TERM
|
||||
setsid {lepton_q} start >"$app_dir/launch.log" 2>&1 &
|
||||
child=$!
|
||||
{dashboard}
|
||||
{logcat}
|
||||
wait "$child"
|
||||
""")
|
||||
|
||||
@@ -2304,10 +2387,22 @@ SINGLE_LINE = ('exec 9>"$app_dir/.launch.lock"; flock -n 9 || '
|
||||
'exit 0; }')
|
||||
|
||||
|
||||
# Lepton mirrors the game's logcat into launch.log, and that reader sometimes dies right after the game starts
|
||||
# ("logcat: Unexpected EOF!", seen with Vader Immortal on Lepton 3.0.5 and Under Cover on 2.8.14). The game runs on,
|
||||
# but launch.log stays empty: no dashboard auto-hide, no launch-test result. _logcat_keeper then reads the
|
||||
# container's logcat itself and appends it to launch.log.
|
||||
LOGCAT_LINE = ('python3 {agent_q} _logcat_keeper "$app_dir/launch.log" "$SteamAppId" $$ '
|
||||
'>"$app_dir/logcat-keeper.log" 2>&1 9>&- &')
|
||||
|
||||
|
||||
def dashboard_line():
|
||||
return DASHBOARD_LINE.format(agent_q=shlex.quote(os.path.abspath(__file__)))
|
||||
|
||||
|
||||
def logcat_line():
|
||||
return LOGCAT_LINE.format(agent_q=shlex.quote(os.path.abspath(__file__)))
|
||||
|
||||
|
||||
def plays_lines(anchor):
|
||||
"""launch.sh lines that log play sessions to <anchor>/plays.log (screenshots are matched to games by time: the
|
||||
Frame files every headset screenshot under SteamVR). Never fail the launcher."""
|
||||
@@ -2326,12 +2421,19 @@ def upgrade_launchers():
|
||||
except OSError:
|
||||
continue
|
||||
new = text
|
||||
# the codec line follows the game's deployment (only Lepton launchers have this variable; Proton/Linux
|
||||
# launchers are never touched). Running launchers keep reading their old file.
|
||||
if "export LEPTON_ENV_FRAMEBRIDGE_CONFIG=" in new:
|
||||
new = set_codec_line(new, wants_hw_video(os.path.dirname(path)))
|
||||
new = set_gamepad_line(new, wants_gamepad(os.path.dirname(path)))
|
||||
if "a Linux app. Generated by FramePort" in new and "FRAMEPORT_DESKTOP" not in new:
|
||||
new = upgrade_linux_launcher(new)
|
||||
if OLD_WATCHDOG in new and "parent=$PPID" not in new:
|
||||
new = new.replace(OLD_WATCHDOG, WATCHDOG, 1)
|
||||
if "_dashboard_worker" not in new and 'child=$!\nwait "$child"' in new:
|
||||
new = new.replace('child=$!\nwait "$child"', 'child=$!\n' + dashboard_line() + '\nwait "$child"', 1)
|
||||
if "_logcat_keeper" not in new and "_dashboard_worker" in new and '\nwait "$child"' in new:
|
||||
new = new.replace('\nwait "$child"', '\n' + logcat_line() + '\nwait "$child"', 1)
|
||||
guard = '[[ -d "$app_dir/lepton-app" ]] ||'
|
||||
if ".launch.lock" not in new and guard in new:
|
||||
i = new.index("\n", new.index(guard)) + 1
|
||||
@@ -2357,6 +2459,315 @@ def upgrade_launchers():
|
||||
return changed
|
||||
|
||||
|
||||
def wants_hw_video(anchor):
|
||||
"""Whether this game's launcher gets the shared codec (frame.hw_video_decode): deployment.json's choice (written
|
||||
at finalize), else its recipe's patches. A game that had agent <= 70's per-game codec (extracted from its APK:
|
||||
Batman) keeps it; that choice is saved, since ensure_host_fixes then removes the old codec folder."""
|
||||
path = os.path.join(anchor, "deployment.json")
|
||||
try:
|
||||
with open(path) as f:
|
||||
dep = json.load(f)
|
||||
except (OSError, ValueError):
|
||||
return False
|
||||
if not isinstance(dep, dict):
|
||||
return False
|
||||
if "hw_video_decode" in dep:
|
||||
return bool(dep["hw_video_decode"])
|
||||
recipe = dep.get("recipe") if isinstance(dep.get("recipe"), dict) else {}
|
||||
if HW_VIDEO_PATCH in (recipe.get("patches") or []):
|
||||
return True
|
||||
base = dep.get("base")
|
||||
if isinstance(base, str) and os.path.exists(os.path.join(base, "frameport-codec/bin/podman")):
|
||||
dep["hw_video_decode"] = True
|
||||
with open(path + ".tmp", "w") as f:
|
||||
json.dump(dep, f, indent=2)
|
||||
os.replace(path + ".tmp", path)
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def set_codec_line(text, want):
|
||||
"""A Lepton launcher with the current codec line where it belongs (want) or none; earlier lines are dropped."""
|
||||
at = -1
|
||||
for line in (VIDEO_CODEC_LINE, *OLD_CODEC_LINES):
|
||||
i = text.find(line + "\n")
|
||||
while i >= 0:
|
||||
text = text[:i] + text[i + len(line) + 1:]
|
||||
at = i if at < 0 else min(at, i) # the earliest one's place (text before it is unchanged)
|
||||
i = text.find(line + "\n")
|
||||
if want:
|
||||
if at < 0:
|
||||
for anchor in ("\nchild=''\n", "\nsetsid "):
|
||||
if anchor in text:
|
||||
at = text.index(anchor) + 1
|
||||
break
|
||||
if at >= 0:
|
||||
text = text[:at] + VIDEO_CODEC_LINE + "\n" + text[at:]
|
||||
return text
|
||||
|
||||
|
||||
def wants_gamepad(anchor):
|
||||
"""Whether this game's launcher passes Steam Input's virtual gamepad into its container (device.steam_gamepad):
|
||||
deployment.json's choice (written at finalize), else its recipe's patches."""
|
||||
try:
|
||||
with open(os.path.join(anchor, "deployment.json")) as f:
|
||||
dep = json.load(f)
|
||||
except (OSError, ValueError):
|
||||
return False
|
||||
if not isinstance(dep, dict):
|
||||
return False
|
||||
if "steam_gamepad" in dep:
|
||||
return bool(dep["steam_gamepad"])
|
||||
recipe = dep.get("recipe") if isinstance(dep.get("recipe"), dict) else {}
|
||||
return GAMEPAD_PATCH in (recipe.get("patches") or [])
|
||||
|
||||
|
||||
def wrapper_lines(hw_video, gamepad):
|
||||
"""The launcher's Podman wrapper lines (empty, one or both). The gamepad line comes last, so FramePort's wrapper is
|
||||
first on PATH and hands on to the codec wrapper."""
|
||||
return "\n".join(line for line, want in ((VIDEO_CODEC_LINE, hw_video), (GAMEPAD_LINE, gamepad)) if want)
|
||||
|
||||
|
||||
def set_gamepad_line(text, want):
|
||||
"""A Lepton launcher with the gamepad line (want) or without it. It always follows the codec line (when there is
|
||||
one), else stands where the codec line would."""
|
||||
text = text.replace(GAMEPAD_LINE + "\n", "")
|
||||
if not want:
|
||||
return text
|
||||
i = text.find(VIDEO_CODEC_LINE + "\n")
|
||||
if i >= 0:
|
||||
at = i + len(VIDEO_CODEC_LINE) + 1
|
||||
else:
|
||||
at = next((text.index(a) + 1 for a in ("\nchild=''\n", "\nsetsid ") if a in text), -1)
|
||||
return text if at < 0 else text[:at] + GAMEPAD_LINE + "\n" + text[at:]
|
||||
|
||||
|
||||
# Android's layout for an Xbox 360 pad (AOSP's Vendor_045e_Product_028e.kl, with Select as BUTTON_SELECT instead of
|
||||
# BACK, which would close many apps): Steam's virtual pad reports Valve's ids, so Android would fall back to Generic.kl
|
||||
# (triggers on Z/RZ, right stick on RX/RY: games then mix up the right stick and the triggers).
|
||||
GAMEPAD_KL = """# Steam Input virtual gamepad (Xbox 360 layout). Written by FramePort (device.steam_gamepad).
|
||||
key 304 BUTTON_A
|
||||
key 305 BUTTON_B
|
||||
key 307 BUTTON_X
|
||||
key 308 BUTTON_Y
|
||||
key 310 BUTTON_L1
|
||||
key 311 BUTTON_R1
|
||||
key 314 BUTTON_SELECT
|
||||
key 315 BUTTON_START
|
||||
key 316 BUTTON_MODE
|
||||
key 317 BUTTON_THUMBL
|
||||
key 318 BUTTON_THUMBR
|
||||
axis 0x00 X flat 4096
|
||||
axis 0x01 Y flat 4096
|
||||
axis 0x03 Z flat 4096
|
||||
axis 0x04 RZ flat 4096
|
||||
axis 0x02 LTRIGGER
|
||||
axis 0x05 RTRIGGER
|
||||
axis 0x10 HAT_X
|
||||
axis 0x11 HAT_Y
|
||||
"""
|
||||
BTN_SOUTH = 0x130 # BTN_A / BTN_GAMEPAD: Linux's gamepad button range starts here
|
||||
|
||||
|
||||
def has_key_bit(caps, code):
|
||||
"""Whether a sysfs capabilities/key bitmap (hex words, most significant first, one per long) has `code`."""
|
||||
words = caps.split()
|
||||
bits = 8 * struct.calcsize("l") # the kernel's long (64 on the Frame); words aren't zero-padded
|
||||
index = len(words) - 1 - code // bits
|
||||
try:
|
||||
return index >= 0 and bool(int(words[index], 16) >> (code % bits) & 1)
|
||||
except ValueError:
|
||||
return False
|
||||
|
||||
|
||||
def steam_gamepads(sys_root="/sys", dev_root="/dev"):
|
||||
"""Steam Input's virtual gamepads ([{event, product, name}]): input devices Steam creates through uinput
|
||||
(/sys/devices/virtual/input) with Valve's vendor id (28de) and gamepad buttons. Steam names them "Microsoft X-Box
|
||||
360 pad N" (seen on the Frame; older clients "Steam Virtual Gamepad"); Valve's other virtual devices (e.g.
|
||||
steamos-manager's keys, 28de:0000) have no gamepad buttons."""
|
||||
pads = []
|
||||
for sys_event in sorted(glob.glob(os.path.join(sys_root, "class/input/event*")),
|
||||
key=lambda p: int(re.sub(r"\D", "", os.path.basename(p)) or 0)):
|
||||
event = os.path.basename(sys_event)
|
||||
device = os.path.join(sys_event, "device")
|
||||
|
||||
def read(rel, device=device):
|
||||
try:
|
||||
with open(os.path.join(device, rel)) as f:
|
||||
return f.read().strip()
|
||||
except OSError:
|
||||
return ""
|
||||
if read("id/vendor").lower() != "28de" or not has_key_bit(read("capabilities/key"), BTN_SOUTH):
|
||||
continue
|
||||
if "/devices/virtual/" not in os.path.realpath(device) + "/":
|
||||
continue # Valve hardware itself (a Steam Deck's controls): Steam Input reads it and makes a virtual pad
|
||||
node = os.path.join(dev_root, "input", event)
|
||||
if not os.path.exists(node) or not os.access(node, os.R_OK | os.W_OK):
|
||||
continue
|
||||
pads.append({"event": event, "product": read("id/product").lower() or "0000", "name": read("name")})
|
||||
return pads
|
||||
|
||||
|
||||
def podman_run_args(args, env, sys_root="/sys", dev_root="/dev"):
|
||||
"""FramePort's Podman wrapper (PODMAN_WRAPPER) for `podman run`: the game's own container
|
||||
(lepton-steamlaunch-<SteamAppId>, launcher env) gets Steam's virtual gamepads and their key layout when its
|
||||
launcher asked for them (FRAMEPORT_GAMEPAD=1, the gamepad line). Anything else: the arguments unchanged. Lepton
|
||||
mounts a tmpfs over /dev, so a `--device` node would vanish under it: bind mounts, like Lepton's own GPU nodes."""
|
||||
if args[:1] != ["run"] or env.get("FRAMEPORT_GAMEPAD") != "1" or \
|
||||
env.get("FRAMEPORT_NO_GAMEPAD", "0") not in ("", "0"):
|
||||
return args
|
||||
appid = env.get("SteamAppId", "")
|
||||
name = None
|
||||
for i, arg in enumerate(args):
|
||||
if arg == "--name" and i + 1 < len(args):
|
||||
name = args[i + 1]
|
||||
elif arg.startswith("--name="):
|
||||
name = arg.partition("=")[2]
|
||||
if not re.fullmatch(r"[0-9]+", appid) or name != f"lepton-steamlaunch-{appid}":
|
||||
return args
|
||||
taken = set()
|
||||
for i, arg in enumerate(args): # destinations Lepton mounts itself (a future Lepton passing pads through)
|
||||
spec = args[i + 1] if arg == "--mount" and i + 1 < len(args) else arg.partition("=")[2] \
|
||||
if arg.startswith("--mount=") else ""
|
||||
for item in spec.split(","):
|
||||
key, _, value = item.partition("=")
|
||||
if key in ("destination", "target", "dst"):
|
||||
taken.add(value)
|
||||
pads = steam_gamepads(sys_root, dev_root)
|
||||
extra = []
|
||||
for pad in pads:
|
||||
node = f"/dev/input/{pad['event']}"
|
||||
if node not in taken:
|
||||
extra += ["--mount", f"type=bind,source={os.path.join(dev_root, 'input', pad['event'])},"
|
||||
f"destination={node},rw"]
|
||||
layout = gamepad_layout_file() if extra else ""
|
||||
for product in sorted({p["product"] for p in pads}):
|
||||
target = f"/system/usr/keylayout/Vendor_28de_Product_{product}.kl"
|
||||
if layout and target not in taken and re.fullmatch(r"[0-9a-f]{4}", product):
|
||||
extra += ["--mount", f"type=bind,source={layout},destination={target},ro"]
|
||||
names = ", ".join(f"{p['event']} ({p['name']}, 28de:{p['product']})" for p in pads) or "none"
|
||||
print(f"FramePort gamepad: Steam Input virtual gamepads for this container: {names}", file=sys.stderr)
|
||||
return [args[0], *extra, *args[1:]] if extra else args
|
||||
|
||||
|
||||
def gamepad_layout_file():
|
||||
path = os.path.join(os.path.dirname(PODMAN_BIN), "steam-gamepad.kl")
|
||||
try:
|
||||
with open(path) as f:
|
||||
if f.read() == GAMEPAD_KL:
|
||||
return path
|
||||
except OSError:
|
||||
pass
|
||||
os.makedirs(os.path.dirname(path), exist_ok=True)
|
||||
tmp = f"{path}.{os.getpid()}.tmp"
|
||||
with open(tmp, "w") as f:
|
||||
f.write(GAMEPAD_KL)
|
||||
os.replace(tmp, path)
|
||||
return path
|
||||
|
||||
|
||||
# FramePort's Podman wrapper (agent/bin/podman). Small on purpose: every Podman call Lepton makes goes through it while
|
||||
# a launcher has it on PATH, so only `run` loads the agent (podman_run_args); everything else, and any failure, goes
|
||||
# straight to the next Podman on PATH: the one after this folder (the codec wrapper of a game with hardware video
|
||||
# decoding, else Podman itself), with this folder taken off PATH so the next wrapper can't come back here.
|
||||
PODMAN_WRAPPER = r'''#!/usr/bin/python3
|
||||
"""FramePort's Podman wrapper (written by frameport_agent.py: ensure_podman_wrapper; see podman_run_args)."""
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
|
||||
HERE = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
|
||||
def chain():
|
||||
"""The next Podman (after this folder on PATH, else the first other one) and PATH without this folder."""
|
||||
own = os.path.realpath(__file__)
|
||||
entries = os.environ.get("PATH", os.defpath).split(os.pathsep)
|
||||
mine = [i for i, e in enumerate(entries) if os.path.realpath(e or os.curdir) == HERE]
|
||||
order = entries[mine[0] + 1:] if mine else entries
|
||||
for entry in order + ["/usr/local/bin", "/usr/bin", "/bin"]:
|
||||
folder = os.path.realpath(entry or os.curdir)
|
||||
found = shutil.which("podman", path=folder) if folder != HERE else None
|
||||
if found and os.path.realpath(found) != own:
|
||||
return found, os.pathsep.join(e for i, e in enumerate(entries) if i not in mine)
|
||||
sys.exit("FramePort: no Podman found after its wrapper")
|
||||
|
||||
|
||||
podman, path = chain()
|
||||
args = sys.argv[1:]
|
||||
env = dict(os.environ, PATH=path)
|
||||
if args[:1] == ["run"]:
|
||||
try:
|
||||
sys.path.insert(0, os.path.dirname(HERE))
|
||||
import frameport_agent
|
||||
args = frameport_agent.podman_run_args(args, env)
|
||||
except Exception as exc: # a gamepad problem must never stop the game's container from starting
|
||||
print(f"FramePort: Podman wrapper left the arguments unchanged: {exc}", file=sys.stderr)
|
||||
args = sys.argv[1:]
|
||||
os.execve(podman, [podman, *args], env)
|
||||
'''
|
||||
|
||||
|
||||
def ensure_podman_wrapper():
|
||||
"""Write FramePort's Podman wrapper (PODMAN_BIN/podman) when it is missing or differs; returns whether it was
|
||||
written. Launchers only use it while their gamepad line is there."""
|
||||
path = os.path.join(PODMAN_BIN, "podman")
|
||||
try:
|
||||
with open(path) as f:
|
||||
if f.read() == PODMAN_WRAPPER and os.access(path, os.X_OK):
|
||||
return False
|
||||
except OSError:
|
||||
pass
|
||||
os.makedirs(PODMAN_BIN, exist_ok=True)
|
||||
tmp = f"{path}.{os.getpid()}.tmp"
|
||||
with open(tmp, "w") as f:
|
||||
f.write(PODMAN_WRAPPER)
|
||||
os.chmod(tmp, 0o755)
|
||||
os.replace(tmp, path)
|
||||
return True
|
||||
|
||||
|
||||
def remove_old_codec_dirs():
|
||||
"""Agent <= 70 extracted a per-game codec into <base>/frameport-codec; the shared codec replaced it. Removed
|
||||
once the game's launcher no longer uses it (upgrade_launchers converted it; the choice is in deployment.json or
|
||||
the recipe's patches)."""
|
||||
removed = []
|
||||
for dep_path in glob.glob(os.path.join(ANCHORS, "*/deployment.json")):
|
||||
try:
|
||||
with open(dep_path) as f:
|
||||
dep = json.load(f)
|
||||
base = dep.get("base")
|
||||
except (OSError, ValueError, AttributeError):
|
||||
continue
|
||||
old = os.path.join(base, "frameport-codec") if isinstance(base, str) else ""
|
||||
if not old or not os.path.isdir(old) or os.path.islink(old):
|
||||
continue
|
||||
try:
|
||||
with open(os.path.join(os.path.dirname(dep_path), "launch.sh")) as f:
|
||||
launcher = f.read()
|
||||
except OSError:
|
||||
launcher = ""
|
||||
if "frameport-codec" in launcher:
|
||||
continue # its launcher hasn't been converted yet
|
||||
shutil.rmtree(old, ignore_errors=True)
|
||||
removed.append(dep.get("package") or os.path.basename(os.path.dirname(dep_path)))
|
||||
return removed
|
||||
|
||||
|
||||
def cmd_video_codec_switch(args):
|
||||
"""FramePort's setting "Hardware video decoding" for every game on this Frame: off writes VIDEO_CODEC_DIR/disabled,
|
||||
which launchers and the wrapper check at every start (no launcher rewrite, running games keep what they have)."""
|
||||
flag = os.path.join(VIDEO_CODEC_DIR, "disabled")
|
||||
if args.get("enabled", True):
|
||||
if os.path.exists(flag):
|
||||
os.remove(flag)
|
||||
else:
|
||||
os.makedirs(VIDEO_CODEC_DIR, exist_ok=True)
|
||||
with open(flag, "w") as f:
|
||||
f.write("switched off in FramePort\n")
|
||||
return cmd_video_codec_status({})
|
||||
|
||||
|
||||
def upgrade_linux_launcher(text):
|
||||
"""A Linux app's launcher from before agent v63, made fit for Desktop Mode's menu entry (GitHub #84): no Steam
|
||||
parent watchdog and no display taken from Steam when FRAMEPORT_DESKTOP is set."""
|
||||
@@ -2369,12 +2780,14 @@ def upgrade_linux_launcher(text):
|
||||
return text
|
||||
|
||||
|
||||
def write_launcher(anchor, base, pkg, title, appid, lepton, env):
|
||||
def write_launcher(anchor, base, pkg, title, appid, lepton, env, hw_video=False, gamepad=False):
|
||||
extra = "".join(f"export {k}={shlex.quote(str(v))}\n" for k, v in (env or {}).items()
|
||||
if re.fullmatch(r"[A-Z_][A-Z0-9_]*", k))
|
||||
text = LAUNCH_SH.format(title=title.replace("\n", " "), pkg=pkg, base_q=shlex.quote(base), appid=appid,
|
||||
lepton_q=shlex.quote(lepton), extra_env=extra, watchdog=WATCHDOG,
|
||||
dashboard=dashboard_line(), single=SINGLE_LINE, plays_start=plays_lines(anchor)[0],
|
||||
dashboard=dashboard_line(), logcat=logcat_line(), single=SINGLE_LINE,
|
||||
video_codec=wrapper_lines(hw_video, gamepad),
|
||||
plays_start=plays_lines(anchor)[0],
|
||||
plays_end=plays_lines(anchor)[1])
|
||||
path = os.path.join(anchor, "launch.sh")
|
||||
with open(path + ".tmp", "w") as f:
|
||||
@@ -2387,6 +2800,114 @@ def data_files_dir(base, pkg):
|
||||
return os.path.join(base, "lepton-data/external/Android/data", pkg, "files")
|
||||
|
||||
|
||||
def cmd_video_codec_status(args):
|
||||
"""The shared codec installed on this Frame ({digest, revision}, {} if none or damaged) and whether FramePort's
|
||||
setting switched it off for every game ("disabled")."""
|
||||
status = video_codec_installed()
|
||||
status["disabled"] = os.path.exists(os.path.join(VIDEO_CODEC_DIR, "disabled"))
|
||||
return status
|
||||
|
||||
|
||||
def video_codec_installed():
|
||||
path = os.path.join(VIDEO_CODEC_DIR, "current", "manifest.json")
|
||||
try:
|
||||
with open(path, "rb") as f:
|
||||
raw = f.read()
|
||||
manifest = json.loads(raw)
|
||||
with open(os.path.join(os.path.dirname(path), "deployment.json")) as f:
|
||||
config = json.load(f)
|
||||
if not isinstance(config, dict) or config.get("scope") != "shared" or \
|
||||
config.get("runtime_sha256") != manifest["runtime_sha256"]:
|
||||
return {}
|
||||
for name in VIDEO_CODEC_FILES:
|
||||
local = "bin/podman" if name == "podman.py" else name
|
||||
if sha256_file(os.path.join(os.path.dirname(path), local)) != manifest["files"][name]:
|
||||
return {}
|
||||
return {"digest": hashlib.sha256(raw).hexdigest(), "revision": manifest.get("revision", 1)}
|
||||
except (OSError, ValueError, KeyError, TypeError):
|
||||
return {}
|
||||
|
||||
|
||||
def prune_video_codec_versions(versions, keep):
|
||||
"""Each revision is ~15 MB. Keep the active one and the one it replaced (a launch that resolved the old
|
||||
'current' just before the switch still mounts its files); running containers hold their mounts anyway."""
|
||||
for name in os.listdir(versions):
|
||||
if name in keep or not re.fullmatch(r"[0-9a-f]{64}(\.previous-[0-9]+)?|\.install-.*", name):
|
||||
continue
|
||||
path = os.path.join(versions, name)
|
||||
if os.path.isdir(path) and not os.path.islink(path):
|
||||
shutil.rmtree(path, ignore_errors=True)
|
||||
|
||||
|
||||
def cmd_install_video_codec(args):
|
||||
"""Verify a shared payload, then publish its complete version in one step."""
|
||||
encoded = args["bundle"]
|
||||
if not isinstance(encoded, str) or len(encoded) > 32 * 1024 * 1024:
|
||||
raise AgentError("oversized video codec bundle")
|
||||
import io
|
||||
|
||||
raw = base64.b64decode(encoded, validate=True)
|
||||
data = {}
|
||||
with zipfile.ZipFile(io.BytesIO(raw)) as archive:
|
||||
if set(archive.namelist()) != {"manifest.json", *VIDEO_CODEC_FILES} or len(archive.infolist()) != 5:
|
||||
raise AgentError("unexpected video codec bundle files")
|
||||
for name in ("manifest.json", *VIDEO_CODEC_FILES):
|
||||
if archive.getinfo(name).file_size > 16 * 1024 * 1024:
|
||||
raise AgentError(f"oversized video codec asset: {name}")
|
||||
data[name] = archive.read(name)
|
||||
manifest = json.loads(data["manifest.json"])
|
||||
if not isinstance(manifest, dict) or not isinstance(manifest.get("files"), dict) or \
|
||||
not isinstance(manifest.get("revision", 1), int) or manifest.get("revision", 1) < 1:
|
||||
raise AgentError("invalid video codec manifest")
|
||||
digest = hashlib.sha256(data["manifest.json"]).hexdigest()
|
||||
if digest != args["digest"]:
|
||||
raise AgentError("video codec manifest checksum mismatch")
|
||||
for name in VIDEO_CODEC_FILES:
|
||||
if hashlib.sha256(data[name]).hexdigest() != manifest["files"][name]:
|
||||
raise AgentError(f"video codec asset checksum mismatch: {name}")
|
||||
# A second PC with older FramePort must not downgrade the shared codec.
|
||||
os.makedirs(VIDEO_CODEC_DIR, exist_ok=True)
|
||||
with open(os.path.join(VIDEO_CODEC_DIR, "install.lock"), "a") as lock:
|
||||
fcntl.flock(lock, fcntl.LOCK_EX)
|
||||
current = video_codec_installed()
|
||||
if current.get("digest") not in (None, digest) and current.get("revision", 0) >= manifest.get("revision", 1):
|
||||
# another PC's FramePort installed this revision (or a newer one) built differently: keep it, two
|
||||
# PCs mustn't replace each other's codec at every connection
|
||||
return dict(current, kept=True)
|
||||
versions = os.path.join(VIDEO_CODEC_DIR, "versions")
|
||||
os.makedirs(versions, exist_ok=True)
|
||||
version = os.path.join(versions, digest)
|
||||
previous = os.path.basename(os.path.realpath(os.path.join(VIDEO_CODEC_DIR, "current")))
|
||||
if current.get("digest") != digest:
|
||||
stage = tempfile.mkdtemp(prefix=".install-", dir=versions)
|
||||
try:
|
||||
os.mkdir(os.path.join(stage, "bin"))
|
||||
# Config first, executable last, then expose the entire version.
|
||||
config = {"scope": "shared", "runtime_sha256": manifest["runtime_sha256"]}
|
||||
with open(os.path.join(stage, "deployment.json"), "w") as f:
|
||||
json.dump(config, f)
|
||||
for name in ("manifest.json", *[n for n in VIDEO_CODEC_FILES if n != "podman.py"], "podman.py"):
|
||||
target = os.path.join(stage, "bin/podman" if name == "podman.py" else name)
|
||||
with open(target, "wb") as f:
|
||||
f.write(data[name])
|
||||
os.chmod(target, 0o755 if name == "podman.py" else 0o644)
|
||||
if os.path.lexists(version):
|
||||
# Preserve an interrupted/corrupt prior version for diagnosis.
|
||||
os.rename(version, version + f".previous-{time.time_ns()}")
|
||||
os.rename(stage, version)
|
||||
link = os.path.join(VIDEO_CODEC_DIR, f".current-{os.getpid()}")
|
||||
if os.path.lexists(link):
|
||||
os.unlink(link)
|
||||
os.symlink(os.path.join("versions", digest), link)
|
||||
os.replace(link, os.path.join(VIDEO_CODEC_DIR, "current"))
|
||||
finally:
|
||||
if os.path.isdir(stage):
|
||||
shutil.rmtree(stage)
|
||||
prune_video_codec_versions(versions, {digest, previous})
|
||||
upgraded = upgrade_launchers()
|
||||
return {"digest": digest, "revision": manifest.get("revision", 1), "launchers": upgraded}
|
||||
|
||||
|
||||
def set_flatscreen(app_dir, on):
|
||||
"""Lepton shows an app as a flat (2D) window only when its app folder holds this marker
|
||||
(liblepton/app_metadata.sh); otherwise the app runs headless and only OpenXR output reaches the headset."""
|
||||
@@ -2467,7 +2988,12 @@ def cmd_finalize(args):
|
||||
with open(target, "w") as f:
|
||||
f.write(content)
|
||||
models = install_controller_models(files_dir, str(settings.get("controller_models", 0)) not in ("0", "0.0"))
|
||||
write_launcher(anchor, base, pkg, title, appid, lepton, args.get("env"))
|
||||
recipe = args.get("recipe") if isinstance(args.get("recipe"), dict) else {}
|
||||
hw_video = HW_VIDEO_PATCH in (recipe.get("patches") or []) # the shared codec (install_video_codec)
|
||||
gamepad = GAMEPAD_PATCH in (recipe.get("patches") or []) # Steam Input's virtual gamepad (PODMAN_WRAPPER)
|
||||
if gamepad:
|
||||
ensure_podman_wrapper()
|
||||
write_launcher(anchor, base, pkg, title, appid, lepton, args.get("env"), hw_video, gamepad)
|
||||
art_in = os.path.join(base, "incoming-artwork")
|
||||
if os.path.isdir(art_in):
|
||||
shutil.rmtree(os.path.join(anchor, "artwork"), ignore_errors=True)
|
||||
@@ -2475,7 +3001,8 @@ def cmd_finalize(args):
|
||||
dep = {"package": pkg, "appid": int(appid), "base": base, "title": title, "tags": args.get("tags") or [],
|
||||
"apk": args.get("apk_name", "game.apk"),
|
||||
"sha256": args.get("apk_sha256"), "recipe": args.get("recipe"), "installed_by": "frameport",
|
||||
"agent_version": AGENT_VERSION, "time": time.time()}
|
||||
"hw_video_decode": hw_video, "steam_gamepad": gamepad, "agent_version": AGENT_VERSION,
|
||||
"time": time.time()}
|
||||
with open(os.path.join(anchor, "deployment.json"), "w") as f:
|
||||
json.dump(dep, f, indent=2)
|
||||
return {"ok": True, "base": base, "appid": appid, "moved_data_files": moved, "controller_models": models}
|
||||
@@ -3734,7 +4261,7 @@ def cmd_uninstall(args):
|
||||
raise AgentError("the game is running")
|
||||
keep_data = args.get("keep_data", True)
|
||||
names = ("game", "revive", "xrlayer", "shadercache", "incoming", "incoming-artwork") if pcvr else \
|
||||
("app", "incoming", "incoming-artwork", "launch.log") if linux else \
|
||||
("app", "incoming", "incoming-artwork", "launch.log", "session.log") if linux else \
|
||||
("lepton-app", "lepton-shaders", "incoming", "previous-game.apk")
|
||||
for name in names:
|
||||
p = os.path.join(base, name)
|
||||
@@ -3760,7 +4287,7 @@ def cmd_uninstall(args):
|
||||
if not keep_data or base != anchor:
|
||||
remove_tree(anchor)
|
||||
else: # saves live next to the launcher (Quest games): keep them, drop what marks the game as installed
|
||||
for name in ("deployment.json", "launch.sh", "artwork", "launch.log", "launch-test.log"):
|
||||
for name in ("deployment.json", "launch.sh", "artwork", "launch.log", "launch-test.log", "session.log"):
|
||||
p = os.path.join(anchor, name)
|
||||
remove_tree(p)
|
||||
return {"removed": True, "kept_saves": keep_data, "shortcut_removed": removed_sc}
|
||||
@@ -4098,10 +4625,56 @@ PCVR_LOGS = ("compatdata/pfx/drive_c/users/steamuser/AppData/Local/Revive/Revive
|
||||
LOCAL_APPDATA = "compatdata/pfx/drive_c/users/steamuser/AppData/Local"
|
||||
|
||||
|
||||
LOCAL_LOW = "compatdata/pfx/drive_c/users/steamuser/AppData/LocalLow"
|
||||
|
||||
|
||||
def _head_tail(path, head=300, tail=1500):
|
||||
lines = open(path, errors="replace").read().splitlines()
|
||||
if len(lines) > head + tail:
|
||||
lines = lines[:head] + [f"[... {len(lines) - head - tail} lines left out ...]"] + lines[-tail:]
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def unity_logs(base, since=0.0):
|
||||
"""Unity's own logs of a PC VR game: LocalLow/<Company>/<Product>/Player.log + Player-prev.log (Unity 2018.3+;
|
||||
company and product from <game>/<Name>_Data/app.info, else every Player log in LocalLow), the older
|
||||
<Name>_Data/output_log.txt and the crash handler's Temp/<Company>/<Product>/Crashes/*/error.log. Unity logs VR
|
||||
start-up (which SDK, init errors) at the top, so the head is kept as well as the tail."""
|
||||
game = os.path.join(base, "game")
|
||||
low = os.path.join(base, LOCAL_LOW)
|
||||
temp = os.path.join(base, LOCAL_APPDATA, "Temp")
|
||||
names = []
|
||||
for info in glob.glob(os.path.join(glob.escape(game), "*_Data", "app.info")):
|
||||
try:
|
||||
lines = [ln.strip() for ln in open(info, errors="replace").read().splitlines()]
|
||||
except OSError:
|
||||
continue
|
||||
if len(lines) >= 2 and lines[0] and lines[1] and "/" not in lines[0] + lines[1] and \
|
||||
".." not in (lines[0], lines[1]):
|
||||
names.append((lines[0], lines[1]))
|
||||
dirs = [os.path.join(low, c, p) for c, p in names if os.path.isdir(os.path.join(low, c, p))]
|
||||
logs = []
|
||||
for d in dirs or glob.glob(os.path.join(glob.escape(low), "*", "*")):
|
||||
logs += [os.path.join(d, n) for n in ("Player.log", "Player-prev.log")]
|
||||
logs += glob.glob(os.path.join(glob.escape(game), "*_Data", "output_log.txt"))
|
||||
crash_dirs = [os.path.join(temp, c, p) for c, p in names] or glob.glob(os.path.join(glob.escape(temp), "*", "*"))
|
||||
crashes = [x for d in crash_dirs for x in glob.glob(os.path.join(glob.escape(d), "Crashes", "*", "error.log"))]
|
||||
out = []
|
||||
for log in [x for x in logs if os.path.isfile(x)]:
|
||||
if os.path.getmtime(log) < since: # left over from an earlier run
|
||||
continue
|
||||
out.append(f"===== unity log {os.path.relpath(log, base)}\n" + _head_tail(log))
|
||||
for err in sorted(crashes, key=os.path.getmtime, reverse=True)[:2]:
|
||||
if os.path.getmtime(err) >= since:
|
||||
out.append(f"===== unity crash {os.path.relpath(err, base)}\n" + _head_tail(err, 100, 400))
|
||||
return out
|
||||
|
||||
|
||||
def game_logs(base, since=0.0):
|
||||
"""The game's own logs from the Proton prefix, newest first: Unreal Saved/Logs/*.log (tail) and crash summaries
|
||||
(Saved/Crashes/*/CrashContext.runtime-xml → error message + call stack), Revive's logs."""
|
||||
out = []
|
||||
(Saved/Crashes/*/CrashContext.runtime-xml → error message + call stack), Unity's Player.log / crash error.log
|
||||
(agent v67), Revive's logs."""
|
||||
out = unity_logs(base, since)
|
||||
local = os.path.join(base, LOCAL_APPDATA)
|
||||
for log in sorted(glob.glob(os.path.join(local, "*", "Saved", "Logs", "*.log")), key=os.path.getmtime,
|
||||
reverse=True)[:1]:
|
||||
@@ -4126,6 +4699,9 @@ def game_logs(base, since=0.0):
|
||||
return out
|
||||
|
||||
|
||||
LAUNCH_INSTALL_GRACE = 240 # s a launch test waits at most for Lepton's boot + app install before its own window
|
||||
|
||||
|
||||
def cmd_launch_test(args):
|
||||
"""Start the game headless (as Steam would), wait, classify, stop. Without the headset worn the OpenXR session
|
||||
never reaches FOCUSED, so this proves startup, not visuals."""
|
||||
@@ -4147,20 +4723,31 @@ def cmd_launch_test(args):
|
||||
keys = key_usage()
|
||||
unit = f"frameport-test-{appid}"
|
||||
run(["systemctl", "--user", "reset-failed", unit])
|
||||
mark_launch_test(anchor)
|
||||
p = run(["systemd-run", "--user", "--collect", "--quiet", f"--unit={unit}", os.path.join(anchor, "launch.sh")])
|
||||
if p.returncode:
|
||||
raise AgentError("could not start the launcher: " + p.stderr[-300:])
|
||||
start = time.time()
|
||||
state = "RUNNING"
|
||||
while time.time() - start < seconds:
|
||||
app_start = None # when Lepton started the app ("Waiting for app"): the test window counts from there
|
||||
while True:
|
||||
time.sleep(3)
|
||||
now = time.time()
|
||||
text = open(log, errors="replace").read() if os.path.exists(log) else ""
|
||||
if "Exited!" in text:
|
||||
state = "EXITED"
|
||||
break
|
||||
if "Early-exit" in text or not_started(text, time.time() - start):
|
||||
if "Early-exit" in text or not_started(text, now - start):
|
||||
state = "NEVER_STARTED"
|
||||
break
|
||||
if app_start is None and "Waiting for app" in text:
|
||||
app_start = now
|
||||
# the first start after an APK change boots Lepton and installs the app first (a minute or more): stopping the
|
||||
# container then left a half-installed APK ("base.apk is not zip") that never started again (VR HOT)
|
||||
if app_start is not None and now - app_start >= seconds:
|
||||
break
|
||||
if now - start >= seconds + LAUNCH_INSTALL_GRACE:
|
||||
break
|
||||
elapsed = round(time.time() - start)
|
||||
if state == "EXITED": # Lepton dumps the container's logcat buffers (crash backtraces) after "Exited!"
|
||||
until = time.time() + 15
|
||||
@@ -4186,6 +4773,7 @@ def launch_test_linux(dep, anchor, log, seconds):
|
||||
raise AgentError("the app is already running")
|
||||
unit = f"frameport-test-{appid}"
|
||||
run(["systemctl", "--user", "reset-failed", unit])
|
||||
mark_launch_test(anchor)
|
||||
start = time.time()
|
||||
p = run(["systemd-run", "--user", "--quiet", f"--unit={unit}", "--property=RemainAfterExit=no",
|
||||
os.path.join(anchor, "launch.sh")])
|
||||
@@ -4219,6 +4807,7 @@ def launch_test_pcvr(dep, anchor, log, seconds):
|
||||
raise AgentError("the game is already running")
|
||||
unit = f"frameport-test-{appid}"
|
||||
run(["systemctl", "--user", "reset-failed", unit])
|
||||
mark_launch_test(anchor)
|
||||
p = run(["systemd-run", "--user", "--quiet", f"--unit={unit}", "--property=RemainAfterExit=no",
|
||||
os.path.join(anchor, "launch.sh")])
|
||||
if p.returncode:
|
||||
@@ -4257,6 +4846,92 @@ def launch_test_pcvr(dep, anchor, log, seconds):
|
||||
"kind": "pcvr", "game_process": bool(game_seen)}
|
||||
|
||||
|
||||
SESSION_LOG_MAX = 4 << 20 # bytes of a play session's log the PC triages
|
||||
SESSION_READ_MAX = 64 << 20 # a longer launch.log is read from its end
|
||||
SESSION_KEEP = re.compile(r"FrameBridge|focus|pacing|Fatal signal|FATAL|CRASH|#\d\d pc |Abort message|DEVICE.LOST|"
|
||||
r"AndroidRuntime|vrclient|Start proc|lepton", re.I)
|
||||
KERNEL_GPU = re.compile(r"hangcheck|gpu fault|adreno|kgsl|msm_drm.*(hang|recover)", re.I)
|
||||
|
||||
|
||||
def slice_session_log(text, max_bytes=SESSION_LOG_MAX):
|
||||
"""A long play session's log cut to max_bytes: its start (a quarter) and its end (half) whole, from the middle
|
||||
only FrameBridge's, focus, pacing and crash lines (oldest first, while they fit). Returns (text, cut)."""
|
||||
if len(text) <= max_bytes:
|
||||
return text, False
|
||||
head = text[:max_bytes // 4]
|
||||
head = head[:head.rfind("\n") + 1]
|
||||
tail = text[-(max_bytes // 2):]
|
||||
tail = tail[tail.find("\n") + 1:]
|
||||
middle = text[len(head):len(text) - len(tail)]
|
||||
budget, kept = max_bytes - len(head) - len(tail) - 200, []
|
||||
for line in middle.splitlines():
|
||||
if SESSION_KEEP.search(line):
|
||||
budget -= len(line) + 1
|
||||
if budget < 0:
|
||||
break
|
||||
kept.append(line)
|
||||
note = f"[FramePort: {len(middle)} bytes in the middle of this session cut, {len(kept)} lines kept]\n"
|
||||
return head + note + "".join(ln + "\n" for ln in kept) + tail, True
|
||||
|
||||
|
||||
def session_kernel_lines(start, end):
|
||||
"""Kernel GPU lines (hangs, faults, recoveries) logged during a play session."""
|
||||
until = (end or time.time()) + 120
|
||||
try:
|
||||
text = run(["journalctl", "-k", "--since", f"@{int(start)}", "--until", f"@{int(until)}", "-q", "--no-pager",
|
||||
"-o", "short-unix"]).stdout
|
||||
except OSError:
|
||||
return ""
|
||||
lines = [ln for ln in text.splitlines() if KERNEL_GPU.search(ln)]
|
||||
return "".join(f"kernel: {ln}\n" for ln in lines[-200:])
|
||||
|
||||
|
||||
def cmd_session_log(args):
|
||||
"""The log of the game's newest play session (agent v70), for triage on the PC: {session: {start, end, test},
|
||||
log: path of the session's log (launch.log sliced to 4 MB; PC VR: + Revive's and the game's own logs), log_size,
|
||||
cut, crash: that session's crash logcat (tombstones), kernel: GPU hang/fault lines from the kernel log}.
|
||||
session is None when the game was never played."""
|
||||
pkg = check_pkg(args["package"])
|
||||
dep = deployment(pkg)
|
||||
if not dep:
|
||||
raise AgentError(f"{pkg} is not installed")
|
||||
anchor, base = os.path.join(ANCHORS, pkg), dep["base"]
|
||||
session = last_play(anchor)
|
||||
out = {"session": session, "log": None, "log_size": 0, "cut": False, "crash": "", "kernel": "",
|
||||
"kind": dep.get("kind", "quest")}
|
||||
if not session:
|
||||
return out
|
||||
start, end = session["start"], session["end"]
|
||||
parts = []
|
||||
log = os.path.join(base, "launch.log")
|
||||
if os.path.exists(log) and os.path.getmtime(log) >= start - 5: # else no log of this session is left
|
||||
size = os.path.getsize(log)
|
||||
with open(log, "rb") as f:
|
||||
if size > SESSION_READ_MAX:
|
||||
f.seek(size - SESSION_READ_MAX)
|
||||
parts.append(f.read().decode("utf-8", "replace"))
|
||||
if dep.get("kind") == "pcvr":
|
||||
for rel in PCVR_LOGS:
|
||||
path = os.path.join(base, rel)
|
||||
if os.path.exists(path) and os.path.getmtime(path) >= start - 5:
|
||||
parts.append(f"===== {rel}\n" + (_tail(path, 400000) or ""))
|
||||
parts += game_logs(base, since=start - 5)
|
||||
text, cut = slice_session_log("\n".join(parts), int(args.get("max_bytes", SESSION_LOG_MAX)))
|
||||
path = os.path.join(base, "session.log")
|
||||
with open(path, "w") as f:
|
||||
f.write(text)
|
||||
out.update(log=path, log_size=os.path.getsize(path), cut=cut)
|
||||
crash = os.path.join(STEAM, "logs", "lepton-logcats", f"steamlaunch-{dep['appid']}", "logcat-crash.log")
|
||||
try:
|
||||
mtime = os.path.getmtime(crash)
|
||||
if start - 1 <= mtime <= (end or time.time()) + 120:
|
||||
out["crash"] = _tail(crash, 256 * 1024) or ""
|
||||
except OSError:
|
||||
pass
|
||||
out["kernel"] = session_kernel_lines(start, end)
|
||||
return out
|
||||
|
||||
|
||||
def steam_library_report():
|
||||
"""Why a game installed by FramePort may be missing from Steam or fail with "Game configuration unavailable"
|
||||
(GitHub #21/#30): where Steam really lives, Steam's client version/beta, each account's shortcuts.vdf (when it
|
||||
@@ -4340,6 +5015,50 @@ def _tail(path, max_bytes):
|
||||
return None
|
||||
|
||||
|
||||
# shader dumps in a game's files dir: the Vulkan shim's vk_shader_dump and the shader-fix layer's zink_shader_dump
|
||||
SHADER_DUMP_DIRS = ("fp_vk_shaders", "fp_spirv")
|
||||
SHADER_DUMP_BYTES = 4 << 20 # newest modules per diagnostics run, base64 on the wire
|
||||
SHADER_DUMP_FILES = 200
|
||||
|
||||
|
||||
def shader_dumps(files_dir, max_bytes=SHADER_DUMP_BYTES):
|
||||
"""{dir: {"index": tail of index.txt, "modules": {name: base64}, "total": n, "skipped": n}} for the dump folders
|
||||
in a game's files dir: the newest modules (by time written) up to max_bytes, so the shader created right before a
|
||||
GPU hang comes along. Unreadable files are skipped (the app writes them inside its container)."""
|
||||
out = {}
|
||||
for d in SHADER_DUMP_DIRS:
|
||||
path = os.path.join(files_dir, d)
|
||||
try:
|
||||
names = [n for n in os.listdir(path) if n.endswith(".spv")]
|
||||
except OSError:
|
||||
continue
|
||||
mods = []
|
||||
for n in names:
|
||||
try:
|
||||
mods.append((os.path.getmtime(os.path.join(path, n)), n))
|
||||
except OSError:
|
||||
pass
|
||||
mods.sort(reverse=True)
|
||||
res = {"total": len(names), "modules": {}, "skipped": 0}
|
||||
index = _tail(os.path.join(path, "index.txt"), 1 << 20)
|
||||
if index is not None:
|
||||
res["index"] = index
|
||||
used = 0
|
||||
for _, n in mods[:SHADER_DUMP_FILES]:
|
||||
try:
|
||||
with open(os.path.join(path, n), "rb") as f:
|
||||
data = f.read(max_bytes - used + 1)
|
||||
except OSError:
|
||||
res["skipped"] += 1
|
||||
continue
|
||||
if used + len(data) > max_bytes:
|
||||
break
|
||||
used += len(data)
|
||||
res["modules"][n] = base64.b64encode(data).decode("ascii")
|
||||
out[d] = res
|
||||
return out
|
||||
|
||||
|
||||
def cmd_collect_diag(args):
|
||||
"""Everything useful for debugging without the game or the PC app: host runtime facts and, with a package, the
|
||||
game's launcher, settings, deployment, logs (launch, Lepton logcat, Proton/Revive/Unreal) and its file listing.
|
||||
@@ -4420,6 +5139,9 @@ def cmd_collect_diag(args):
|
||||
for p in sorted(cands, key=lambda p: next((i for i, k in enumerate(order) if k in os.path.basename(p)), 9)):
|
||||
name = os.path.basename(p)
|
||||
files[name if name.startswith("logcat") else "logcat-" + name] = _tail(p, max_bytes)
|
||||
shaders = shader_dumps(data_files_dir(base, pkg), int(args.get("shader_bytes", SHADER_DUMP_BYTES)))
|
||||
if shaders:
|
||||
out["shaders"] = shaders
|
||||
try:
|
||||
listing = cmd_list_files({"package": pkg, "limit": 20000})
|
||||
out["listing"] = {"missing": listing["missing"], "truncated": listing["truncated"],
|
||||
@@ -4758,6 +5480,51 @@ def user_opened_dashboard(log, pos):
|
||||
return False, pos
|
||||
|
||||
|
||||
LOGCAT_EOF = "logcat: Unexpected EOF"
|
||||
|
||||
|
||||
def logcat_keeper(log, appid, parent, poll=2.0, restarts=5, popen=None):
|
||||
"""Keep launch.log filling when Lepton's logcat mirror dies while the game runs (LOGCAT_LINE): once the log shows
|
||||
LOGCAT_EOF after "Waiting for app", read the container's logcat ourselves (from its last 2000 lines, so the start
|
||||
of the game isn't lost) and append it; restart it if it ends while the game still runs (at most `restarts` times).
|
||||
Ends with the launcher."""
|
||||
popen = popen or subprocess.Popen
|
||||
container = f"lepton-steamlaunch-{appid}"
|
||||
|
||||
def alive():
|
||||
try:
|
||||
os.kill(int(parent), 0)
|
||||
return True
|
||||
except (OSError, ValueError):
|
||||
return False
|
||||
|
||||
proc, started = None, 0
|
||||
while alive():
|
||||
if proc is None or proc.poll() is not None:
|
||||
try:
|
||||
with open(log, errors="replace") as f:
|
||||
text = f.read()
|
||||
except OSError:
|
||||
text = ""
|
||||
i = text.find("Waiting for app")
|
||||
if i >= 0 and LOGCAT_EOF in text[i:] and started < restarts:
|
||||
started += 1
|
||||
with open(log, "a") as f:
|
||||
f.write(f"FramePort: Lepton's logcat ended; reading {container}'s logcat again ({started})\n")
|
||||
out = open(log, "ab")
|
||||
try:
|
||||
proc = popen(["podman", "exec", container, "logcat", "-v", "threadtime", "-T", "2000"],
|
||||
stdout=out, stderr=subprocess.STDOUT, stdin=subprocess.DEVNULL)
|
||||
except OSError as exc:
|
||||
print(f"logcat_keeper: {exc}", flush=True)
|
||||
proc = None
|
||||
finally:
|
||||
out.close()
|
||||
time.sleep(poll)
|
||||
if proc is not None and proc.poll() is None:
|
||||
proc.terminate()
|
||||
|
||||
|
||||
def dashboard_worker(log, parent, wait_start=240, window=120, poll=0.5, ui_log=None, max_hides=10):
|
||||
"""Close SteamVR's dashboard (Steam's "Resume game" frame menu) that opens when the game submits its first VR
|
||||
frame: watch from FrameBridge's first "new layer:" line (the first submitted frame; Steam showed the menu ~0.3 s
|
||||
@@ -5662,6 +6429,9 @@ def main():
|
||||
if len(sys.argv) >= 3 and sys.argv[1] == "_xr_probe":
|
||||
xr_probe(sys.argv[2])
|
||||
return 0
|
||||
if len(sys.argv) >= 5 and sys.argv[1] == "_logcat_keeper":
|
||||
logcat_keeper(sys.argv[2], sys.argv[3], sys.argv[4])
|
||||
return 0
|
||||
if len(sys.argv) >= 4 and sys.argv[1] == "_dashboard_worker":
|
||||
dashboard_worker(sys.argv[2], sys.argv[3])
|
||||
return 0
|
||||
|
||||
+10
-3
@@ -1,15 +1,22 @@
|
||||
5becb96ee86fbda0ce98c0e0fd064f8ba092314aceaa400e3dcc785705dc3c23 ./arm64-v8a/libVkLayer_fp_shaderfix.so
|
||||
e7554c6343ee2989b0a273ee6230e65c25bfe6499eefd00de19f5f0fee58754f ./arm64-v8a/libfp_langpack.so
|
||||
321da502e0f8f46f0880aad39fe6b84bdef88f925164568814cf704a1b31a577 ./arm64-v8a/libfp_ovrp.so
|
||||
40defdaddcda53bd2649eb48076fae1622bfc2bfc88e9e03c94fc8b45af2a4f2 ./arm64-v8a/libfp_ovrtrace.so
|
||||
7522a7cfb236e48d3442d418c4820cd37760a9627c6bdef80fb0df82df5fd826 ./arm64-v8a/libfp_vk.so
|
||||
e8c0965c188665a4e565e4a3af983ef1866d1cf9225665cc90d8df286bc96ef3 ./arm64-v8a/libfp_vk.so
|
||||
383054f8b3b41dde76d062c71856cd3163655e50009c08454bc1793f393ead65 ./arm64-v8a/libfpg.so
|
||||
5432674a59d02f411cd853a5dc57e3fa547d1ac518f25bf433fc54c43677177a ./arm64-v8a/libfpglmv.so
|
||||
8a8f6b1da8952cb3933a5b53558424a5fc56043b2527a16bb6dd62a00d2de01a ./arm64-v8a/libframe_xrshim.so
|
||||
fc559dbe0b87eecc3641256837293260cefb7c2ce7b21d808d10edd2a2dba9fc ./arm64-v8a/libglshim.so
|
||||
cc5b493cadefe76ad13fd096d3f8494a140ba593e0e1692db12d284bc548c1cf ./arm64-v8a/libopenxr_loader_generic.so
|
||||
1655921f4c91f2f336edf0aac66d8df1b2b649a272aafe365c1f2fa7867129de ./arm64-v8a/libopenxr_loader_generic.so
|
||||
1feaeafad467c4cafdf2b018a4d84b0bee200c3f711697b4ce97e66a3ba256ca ./arm64-v8a/libovrplatformcompat.so
|
||||
aa4dc0020c77e12d41ef6ce80b23ad90c9cb7e882338eddf2261efe8645cf38d ./arm64-v8a/libvrapi.so
|
||||
c10412dd76a65a1d587b7ed226367d1a6f2bec238c733c97ee67eb8870c868e8 ./armeabi-v7a/libopenxr_loader_generic.so
|
||||
7943c6825e1c2841e54627f96acbd0754a3c06bb608c47f7aa15007aec2191a5 ./armeabi-v7a/libopenxr_loader_generic.so
|
||||
1871eae093432d277da4bc751bf5f3269dfcf11f9168260b0c3caadb0dedb19d ./dex/oculusos-stubs.dex
|
||||
b634ab5640e258563c536e658cad87080553df6f34f62269a21d554844e58bfe ./hevc/COPYING.FFmpeg
|
||||
141de01f0d40b97d4f9a720db5ab8ea442f6aa35db5272048899292884994a1c ./hevc/libstagefrighthw.so
|
||||
4516971bbb2b635e19b14d2d37b9353962876f7de02043e7457327052c1fcbc0 ./hevc/manifest.json
|
||||
46c3dcad2c43cc30bea3b3680b362ed84a99c15d60714bbbbb422c80ecf90405 ./hevc/media_codecs_frameport.xml
|
||||
529ea35d5d82474afe9e09ad1216d269317f56dd24a05fb100fced52b7b4dbca ./hevc/podman.py.txt
|
||||
1aa733117cf57ccff7cf23f0425dbfd73b0332a3ef1c905ceeca0ccd0449c4e0 ./linux-arm64/XR_APILAYER_FRAMEPORT_timefix.json
|
||||
28c2430a02bbd8902c5bfb9562c6fd0e318654f9e05c095bfeb94b0450ab1b07 ./linux-arm64/libxr_frameport_timefix.so
|
||||
b10b3a5c10c3339fc63fd9f6cb4d01ea29be11a863d0ebad1389ea69fd471940 ./linux-arm64-bin/fp_venc
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,502 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
Binary file not shown.
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"revision": 8,
|
||||
"runtime_sha256": "456e912c75cd389abcf6a63bc80e2a53bdc334371d00b200c93680388ae955e2",
|
||||
"files": {
|
||||
"libstagefrighthw.so": "141de01f0d40b97d4f9a720db5ab8ea442f6aa35db5272048899292884994a1c",
|
||||
"podman.py": "529ea35d5d82474afe9e09ad1216d269317f56dd24a05fb100fced52b7b4dbca",
|
||||
"media_codecs_frameport.xml": "46c3dcad2c43cc30bea3b3680b362ed84a99c15d60714bbbbb422c80ecf90405",
|
||||
"COPYING.FFmpeg": "b634ab5640e258563c536e658cad87080553df6f34f62269a21d554844e58bfe"
|
||||
},
|
||||
"codecs": [
|
||||
"video/hevc",
|
||||
"video/avc",
|
||||
"video/x-vnd.on2.vp9"
|
||||
],
|
||||
"build": {
|
||||
"ndk_revision": "27.2.12479018",
|
||||
"ffmpeg_source_sha256": "733984395e0dbbe5c046abda2dc49a5544e7e0e1e2366bba849222ae9e3a03b1"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MediaCodecs>
|
||||
<Decoders>
|
||||
<MediaCodec name="OMX.frameport.hevc.decoder" type="video/hevc" rank="64">
|
||||
<Limit name="size" min="128x128" max="8192x8192" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="block-count" range="1-138240" />
|
||||
<Limit name="blocks-per-second" range="1-7864320" />
|
||||
<Limit name="bitrate" range="1-245000000" />
|
||||
<Limit name="concurrent-instances" max="1" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.frameport.avc.decoder" type="video/avc" rank="64">
|
||||
<Limit name="size" min="128x128" max="8192x8192" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="block-count" range="1-138240" />
|
||||
<Limit name="blocks-per-second" range="1-7864320" />
|
||||
<Limit name="bitrate" range="1-245000000" />
|
||||
<Limit name="concurrent-instances" max="1" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.frameport.vp9.decoder" type="video/x-vnd.on2.vp9" rank="64">
|
||||
<Limit name="size" min="128x128" max="4096x2304" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="block-count" range="1-36864" />
|
||||
<Limit name="blocks-per-second" range="1-2211840" />
|
||||
<Limit name="bitrate" range="1-245000000" />
|
||||
<Limit name="concurrent-instances" max="1" />
|
||||
</MediaCodec>
|
||||
</Decoders>
|
||||
</MediaCodecs>
|
||||
@@ -0,0 +1,146 @@
|
||||
#!/usr/bin/python3
|
||||
"""Add shared codecs to Lepton containers without editing their shared rootfs."""
|
||||
import hashlib
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from xml.etree import ElementTree as ET
|
||||
|
||||
|
||||
def mounts(directory, config, args):
|
||||
if not args or args[0] != "run":
|
||||
return []
|
||||
name = None
|
||||
for i, arg in enumerate(args):
|
||||
if arg == "--name" and i + 1 < len(args):
|
||||
name = args[i + 1]
|
||||
elif arg.startswith("--name="):
|
||||
name = arg.partition("=")[2]
|
||||
if config.get("scope") == "shared":
|
||||
# The common launcher supplies these values. Do not intercept arbitrary
|
||||
# Podman containers or depend on a game's package/modified APK.
|
||||
appid = os.environ.get("SteamAppId", "")
|
||||
if not re.fullmatch(r"[0-9]+", appid) or name != f"lepton-steamlaunch-{appid}":
|
||||
return []
|
||||
app = Path(os.environ.get("STEAM_COMPAT_INSTALL_PATH", ""))
|
||||
if app.name != "lepton-app" or not app.is_dir():
|
||||
return []
|
||||
root_arg = None
|
||||
for i, arg in enumerate(args):
|
||||
if arg == "--rootfs" and i + 1 < len(args):
|
||||
root_arg = args[i + 1]
|
||||
elif arg.startswith("--rootfs="):
|
||||
root_arg = arg.partition("=")[2]
|
||||
if not root_arg or not root_arg.endswith(":O"):
|
||||
return []
|
||||
root = Path(root_arg[:-2]).resolve()
|
||||
else: # old per-game deployments remain compatible during migration
|
||||
if name != f"lepton-steamlaunch-{config['appid']}":
|
||||
return []
|
||||
root = Path(config["lepton"]).resolve().parent / "images" / "rootfs"
|
||||
expected_root = str(root) + ":O"
|
||||
if not any(arg in (expected_root, "--rootfs=" + expected_root) for arg in args):
|
||||
return []
|
||||
device = Path("/dev/video-dec0")
|
||||
runtime = root / "vendor/lib64/libstagefright_softomx.so"
|
||||
upstream_plugin = (root / "vendor/lib64/libstagefrighthw.so").exists()
|
||||
for i, arg in enumerate(args):
|
||||
if arg == "--mount" and i + 1 < len(args):
|
||||
fields = dict(item.split("=", 1) for item in args[i + 1].split(",") if "=" in item)
|
||||
target = fields.get("destination", fields.get("target"))
|
||||
if target == "/vendor/lib64/libstagefrighthw.so":
|
||||
upstream_plugin = True
|
||||
if target == "/vendor/lib64/libstagefright_softomx.so" and fields.get("source"):
|
||||
runtime = Path(fields["source"])
|
||||
if upstream_plugin:
|
||||
print("FramePort video: using the runtime's hardware codec plugin", file=sys.stderr)
|
||||
return []
|
||||
if not device.exists() or hashlib.sha256(runtime.read_bytes()).hexdigest() != config["runtime_sha256"]:
|
||||
print("FramePort video: device or runtime ABI differs; retaining the stock codecs", file=sys.stderr)
|
||||
return []
|
||||
xml = ET.parse(root / "vendor/etc/media_codecs.xml")
|
||||
if not any(node.get("href") == "media_codecs_frameport.xml" for node in xml.getroot().findall("Include")):
|
||||
ET.SubElement(xml.getroot(), "Include", href="media_codecs_frameport.xml")
|
||||
# Immutable plugin versions can serve simultaneous app launches and
|
||||
# different Lepton installations. Never share a temporary XML filename.
|
||||
# The version directory stays as the agent verified it: the merged list goes to the user's runtime dir.
|
||||
root_key = hashlib.sha256(str(root).encode()).hexdigest()[:16]
|
||||
merged = merged_dir() / f"media_codecs.{root_key}.xml"
|
||||
temporary = merged.with_suffix(f".{os.getpid()}.tmp")
|
||||
xml.write(temporary, encoding="utf-8", xml_declaration=True)
|
||||
temporary.replace(merged)
|
||||
# Lepton supplies its own /dev tmpfs. A Podman --device node disappears
|
||||
# beneath it; a bind mount matches Lepton's existing GPU/sound device setup.
|
||||
result = ["--mount", f"type=bind,source={device},destination=/dev/video-dec0,rw"]
|
||||
for path, target in (
|
||||
(directory / "libstagefrighthw.so", "/vendor/lib64/libstagefrighthw.so"),
|
||||
(merged, "/vendor/etc/media_codecs.xml"),
|
||||
(directory / "media_codecs_frameport.xml", "/vendor/etc/media_codecs_frameport.xml"),
|
||||
):
|
||||
if not path.is_file():
|
||||
raise FileNotFoundError(f"missing video codec mount: {path}")
|
||||
result += ["--mount", f"type=bind,source={path},destination={target},ro"]
|
||||
print("FramePort video: loading the Iris hardware codec plugin for this container", file=sys.stderr)
|
||||
return result
|
||||
|
||||
|
||||
def merged_dir():
|
||||
runtime = os.environ.get("XDG_RUNTIME_DIR", "")
|
||||
base = Path(runtime) if runtime and Path(runtime).is_dir() else Path.home() / ".cache"
|
||||
path = base / "frameport-video"
|
||||
path.mkdir(mode=0o700, parents=True, exist_ok=True)
|
||||
return path
|
||||
|
||||
|
||||
def switched_off(directory):
|
||||
"""FRAMEPORT_NO_HW_VIDEO=1 (e.g. in a game's Steam launch options) or the Frame-wide switch (FramePort's
|
||||
setting; the agent writes video-codec/disabled) leave every container with Android's stock codecs."""
|
||||
if os.environ.get("FRAMEPORT_NO_HW_VIDEO", "") not in ("", "0"):
|
||||
return True
|
||||
return directory.parent.name == "versions" and (directory.parent.parent / "disabled").exists()
|
||||
|
||||
|
||||
def real_podman(directory):
|
||||
"""Find Podman independently of deployment.json, without recursing into this wrapper."""
|
||||
own_bin = (directory / "bin").resolve()
|
||||
own_script = Path(__file__).resolve()
|
||||
# Lepton runs its `podman exec` calls (boot wait, app pid, logcat mirror) with the Android guest's PATH
|
||||
# (/product/bin:/system/bin:...), which has no host Podman: the system folders come after PATH. Failing there
|
||||
# broke Lepton's logcat mirror and app-pid checks, and the container was stopped early.
|
||||
entries = os.environ.get("PATH", os.defpath).split(os.pathsep) + ["/usr/local/bin", "/usr/bin", "/bin"]
|
||||
for entry in entries:
|
||||
folder = Path(entry or os.curdir).resolve()
|
||||
if folder == own_bin:
|
||||
continue
|
||||
found = shutil.which("podman", path=str(folder))
|
||||
if found:
|
||||
executable = Path(found).resolve()
|
||||
if executable.parent != own_bin and executable != own_script:
|
||||
return str(executable)
|
||||
raise RuntimeError("no real Podman executable found outside the codec wrapper directory")
|
||||
|
||||
|
||||
def main():
|
||||
directory = Path(__file__).resolve().parent.parent
|
||||
args = sys.argv[1:]
|
||||
fallback = real_podman(directory)
|
||||
if switched_off(directory):
|
||||
os.execv(fallback, [fallback, *args])
|
||||
try:
|
||||
config = json.loads((directory / "deployment.json").read_text())
|
||||
podman = Path(config.get("podman", fallback)).resolve()
|
||||
if podman.parent == (directory / "bin").resolve() or podman == Path(__file__).resolve():
|
||||
raise ValueError("configured Podman points to the codec wrapper")
|
||||
extra = mounts(directory, config, args)
|
||||
launch_args = [args[0], *extra, *args[1:]] if extra else args
|
||||
os.execv(str(podman), [str(podman), *launch_args])
|
||||
except Exception as exc: # a codec/configuration failure must never prevent the stock container from starting
|
||||
print(f"FramePort video: retaining stock codecs: {exc}", file=sys.stderr)
|
||||
os.execv(fallback, [fallback, *args])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -30,13 +30,13 @@ user_systemd() {
|
||||
|
||||
say "FramePort setup for $(hostname) ($(. /etc/os-release; echo "$NAME $VERSION_ID"))"
|
||||
|
||||
say "Authorizing the FramePort app's key"
|
||||
say "Letting FramePort log in"
|
||||
key=$(curl -fsS "$PC_URL/key?code=$PAIR_CODE")
|
||||
[[ "$key" == ssh-ed25519\ * ]] || { echo "Could not fetch the app's key from $PC_URL (is the app still open?)"; exit 1; }
|
||||
[[ "$key" == ssh-ed25519\ * ]] || { echo "Couldn't reach FramePort at $PC_URL. Is it still open?"; exit 1; }
|
||||
mkdir -p ~/.ssh && chmod 700 ~/.ssh && touch ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys
|
||||
grep -qxF "$key" ~/.ssh/authorized_keys || echo "$key" >> ~/.ssh/authorized_keys
|
||||
|
||||
say "Configuring podman for Lepton"
|
||||
say "Setting up Lepton's containers"
|
||||
# rootless podman leaks one kernel keyring per container start; ~200 game launches would exhaust the quota
|
||||
mkdir -p ~/.config/containers
|
||||
grep -qs '^ *keyring *=' ~/.config/containers/containers.conf || printf '[containers]\nkeyring = false\n' >> ~/.config/containers/containers.conf
|
||||
@@ -117,7 +117,7 @@ JOB
|
||||
if [[ -f /etc/steamos-devkit-enabled ]]; then
|
||||
say "Developer Mode is on"
|
||||
bash "$JOB" finish "$PC_URL" "$PAIR_CODE" "$STEAM_CONFIG" "$DEVKIT_HELPER" 2>&1 | tee "$LOG"
|
||||
say "Done. Return to FramePort on your PC: this Frame should now appear as connected."
|
||||
say "Done. FramePort on your PC shows this Frame as connected."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -126,9 +126,8 @@ if [[ ! -x "$DEVKIT_HELPER" || ! -f "$STEAM_CONFIG" ]] || \
|
||||
! user_systemd systemd-run --user --collect --quiet --unit="frameport-setup-$$" \
|
||||
bash -c 'bash "$0" "$@" >"$HOME/.cache/frameport-setup.log" 2>&1' \
|
||||
"$JOB" devmode "$PC_URL" "$PAIR_CODE" "$STEAM_CONFIG" "$DEVKIT_HELPER"; then
|
||||
echo "Couldn't turn it on automatically. Turn it on in Settings > System > Developer, then run this command again."
|
||||
echo "Couldn't turn it on. Turn it on in Settings → System → Enable Developer Mode, then run this again."
|
||||
exit 1
|
||||
fi
|
||||
echo "Steam restarts to turn it on. That closes the desktop in a few seconds and the Frame returns to its"
|
||||
echo "normal view; setup finishes on its own. If Steam asks to install Lepton, confirm it."
|
||||
echo "Then return to FramePort on your PC: the Frame appears as connected within a minute."
|
||||
echo "Steam restarts and the desktop closes. Confirm Lepton if asked."
|
||||
echo "Then check FramePort on your PC."
|
||||
@@ -0,0 +1,226 @@
|
||||
#!/usr/bin/env bash
|
||||
# FramePort setup from the project page: the same for every Frame and every PC, nothing to copy from the PC. Run in
|
||||
# the Frame's desktop terminal (SteamVR dashboard -> Launch a program -> Desktop, then System -> Konsole):
|
||||
# curl -sL frameport.app/s | bash
|
||||
# with FramePort open on your PC at Steam Frame -> Connect. Options: --pc <address[:port]> (skip the search).
|
||||
#
|
||||
# What it does:
|
||||
# 1. finds FramePort on your network (it announces itself over mDNS while that page is open; else the USB cable's
|
||||
# address and a quick scan of this network)
|
||||
# 2. asks it to set up this Frame: FramePort shows the same 4 digits as this terminal, you click Allow there
|
||||
# 3. runs FramePort's setup script from your PC, the one the typed line `curl -fsS <pc>/<code> | bash` runs (it
|
||||
# authorizes the app's key, configures podman, turns on Developer Mode, asks for Lepton)
|
||||
# Nothing changes on the Frame before you allow it on the PC.
|
||||
set -euo pipefail
|
||||
say() { printf '\n\033[1;36m==> %s\033[0m\n' "$*"; }
|
||||
PORTS="8765 8766 8767"
|
||||
USB_PC=10.86.200.234 # the PC's fixed address on the Frame's USB cable network (Developer Mode only)
|
||||
|
||||
PC=""
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
--pc) PC=${2:-}; shift 2 ;;
|
||||
--pc=*) PC=${1#--pc=}; shift ;;
|
||||
-h|--help) sed -n '2,13p' "$0" 2>/dev/null || true; exit 0 ;;
|
||||
*) shift ;;
|
||||
esac
|
||||
done
|
||||
for tool in curl python3; do
|
||||
command -v "$tool" >/dev/null || { echo "This needs $tool, which SteamOS normally has. Run the setup command FramePort shows instead."; exit 1; }
|
||||
done
|
||||
|
||||
# FramePort PCs, one per line: name<TAB>address:port<TAB>words. Stdlib Python: avahi isn't always answering on the
|
||||
# Frame, and its firewall only lets mDNS in on port 5353, so this listens there in the group, like avahi does.
|
||||
find_pcs() {
|
||||
python3 - "$PORTS" "$USB_PC" <<'PY'
|
||||
import json, socket, struct, sys, time, urllib.request
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
PORTS = [int(p) for p in sys.argv[1].split()]
|
||||
USB_PC = sys.argv[2]
|
||||
SERVICE = "_frameport-pair._tcp.local"
|
||||
|
||||
def qname(name):
|
||||
return b"".join(bytes([len(p)]) + p.encode() for p in name.split(".")) + b"\0"
|
||||
|
||||
def read_name(d, off):
|
||||
labels, jumped, end = [], False, off
|
||||
while True:
|
||||
n = d[off]
|
||||
if n == 0:
|
||||
off += 1
|
||||
break
|
||||
if n & 0xC0 == 0xC0:
|
||||
ptr = struct.unpack("!H", d[off:off + 2])[0] & 0x3FFF
|
||||
if not jumped:
|
||||
end = off + 2
|
||||
jumped, off = True, ptr
|
||||
continue
|
||||
labels.append(d[off + 1:off + 1 + n].decode(errors="replace"))
|
||||
off += 1 + n
|
||||
return ".".join(labels), (end if jumped else off)
|
||||
|
||||
def mdns(seconds=3.0):
|
||||
found, srv, txt, addr = {}, {}, {}, {}
|
||||
try:
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
|
||||
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
if hasattr(socket, "SO_REUSEPORT"):
|
||||
try:
|
||||
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1)
|
||||
except OSError:
|
||||
pass
|
||||
s.bind(("", 5353))
|
||||
s.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, socket.inet_aton("224.0.0.251") + socket.inet_aton("0.0.0.0"))
|
||||
query = struct.pack("!6H", 0, 0, 1, 0, 0, 0) + qname(SERVICE) + struct.pack("!HH", 12, 1)
|
||||
s.sendto(query, ("224.0.0.251", 5353))
|
||||
except OSError:
|
||||
return []
|
||||
end, again = time.time() + seconds, True
|
||||
while time.time() < end:
|
||||
if again and time.time() > end - seconds / 2:
|
||||
s.sendto(query, ("224.0.0.251", 5353))
|
||||
again = False
|
||||
s.settimeout(max(0.05, min(0.5, end - time.time())))
|
||||
try:
|
||||
d, src = s.recvfrom(9000)
|
||||
except socket.timeout:
|
||||
continue
|
||||
try:
|
||||
_, _, qd, an, ns, ar = struct.unpack("!6H", d[:12])
|
||||
off = 12
|
||||
for _ in range(qd):
|
||||
_, off = read_name(d, off)
|
||||
off += 4
|
||||
for _ in range(an + ns + ar):
|
||||
name, off = read_name(d, off)
|
||||
rtype, _, _, rdlen = struct.unpack("!HHIH", d[off:off + 10])
|
||||
off += 10
|
||||
if rtype == 12 and name.lower() == SERVICE:
|
||||
found.setdefault(read_name(d, off)[0], src[0])
|
||||
elif rtype == 33:
|
||||
srv[name] = (read_name(d, off + 6)[0], struct.unpack("!H", d[off + 4:off + 6])[0])
|
||||
elif rtype == 16:
|
||||
items, p = {}, off
|
||||
while p < off + rdlen:
|
||||
n = d[p]
|
||||
k, _, v = d[p + 1:p + 1 + n].decode(errors="replace").partition("=")
|
||||
items[k] = v
|
||||
p += 1 + n
|
||||
txt[name] = items
|
||||
elif rtype == 1 and rdlen == 4:
|
||||
addr[name] = socket.inet_ntoa(d[off:off + 4])
|
||||
off += rdlen
|
||||
except (IndexError, struct.error, UnicodeError):
|
||||
continue
|
||||
out = []
|
||||
for inst, src in found.items():
|
||||
target, port = srv.get(inst, ("", PORTS[0]))
|
||||
props = txt.get(inst, {})
|
||||
out.append((props.get("pc") or inst.split(".")[0], f"{addr.get(target) or src}:{port}", props.get("words", "")))
|
||||
return out
|
||||
|
||||
def ping(host_port):
|
||||
try:
|
||||
with urllib.request.urlopen(f"http://{host_port}/ping", timeout=1.5) as r:
|
||||
info = json.load(r)
|
||||
return (info.get("pc", host_port), host_port, info.get("words", ""))
|
||||
except Exception:
|
||||
return None
|
||||
|
||||
def scan():
|
||||
"""This network's /24 (and the USB cable's PC address) for a FramePort setup port."""
|
||||
hosts = [f"{USB_PC}:{p}" for p in PORTS]
|
||||
try:
|
||||
out = __import__("subprocess").run(["ip", "-4", "-o", "addr"], capture_output=True, text=True).stdout
|
||||
except OSError:
|
||||
out = ""
|
||||
for line in out.splitlines():
|
||||
parts = line.split()
|
||||
if len(parts) > 3 and parts[1] not in ("lo",) and "/" in parts[3]:
|
||||
mine = parts[3].split("/")[0]
|
||||
base = mine.rsplit(".", 1)[0]
|
||||
hosts += [f"{base}.{i}:{p}" for i in range(1, 255) if f"{base}.{i}" != mine for p in PORTS[:1]]
|
||||
def open_port(hp):
|
||||
h, p = hp.rsplit(":", 1)
|
||||
try:
|
||||
with socket.create_connection((h, int(p)), timeout=0.4):
|
||||
return hp
|
||||
except OSError:
|
||||
return None
|
||||
with ThreadPoolExecutor(64) as ex:
|
||||
live = [hp for hp in ex.map(open_port, hosts) if hp]
|
||||
return [r for r in map(ping, live) if r]
|
||||
|
||||
pcs = mdns()
|
||||
if not pcs:
|
||||
pcs = scan()
|
||||
seen = set()
|
||||
for name, hp, words in pcs:
|
||||
key = (name, words) if words else hp # one PC on several links (home Wi-Fi and the Frame's hotspot): once
|
||||
if key not in seen:
|
||||
seen.add(key)
|
||||
print(f"{name}\t{hp}\t{words}")
|
||||
PY
|
||||
}
|
||||
|
||||
say "FramePort setup for $(hostname)"
|
||||
if [[ -n "$PC" ]]; then
|
||||
[[ "$PC" == *:* ]] || PC="$PC:${PORTS%% *}"
|
||||
WORDS=""
|
||||
else
|
||||
echo "Looking for FramePort on your network (in FramePort on your PC: Steam Frame → Start setup)..."
|
||||
mapfile -t pcs < <(find_pcs)
|
||||
if [[ ${#pcs[@]} -eq 0 ]]; then
|
||||
echo
|
||||
echo "FramePort wasn't found. Check that:"
|
||||
echo " - FramePort is open on your PC, at Steam Frame → Start setup"
|
||||
echo " - the Frame and the PC are on the same Wi-Fi (or connected with a USB cable)"
|
||||
echo "Or run the setup command FramePort shows there (Use the setup command)."
|
||||
exit 1
|
||||
fi
|
||||
pick=0
|
||||
if [[ ${#pcs[@]} -gt 1 ]]; then
|
||||
echo "More than one FramePort is open on this network:"
|
||||
for i in "${!pcs[@]}"; do
|
||||
IFS=$'\t' read -r name hp words <<<"${pcs[$i]}"
|
||||
echo " $((i + 1))) $name ($hp) $words"
|
||||
done
|
||||
# stdin is this script itself (curl | bash): ask on the terminal; without one, take the first
|
||||
if { exec 3</dev/tty; } 2>/dev/null; then
|
||||
read -r -u 3 -p "Which one? [1-${#pcs[@]}] " n
|
||||
exec 3<&-
|
||||
[[ "$n" =~ ^[0-9]+$ && $n -ge 1 && $n -le ${#pcs[@]} ]] || { echo "No such number."; exit 1; }
|
||||
pick=$((n - 1))
|
||||
else
|
||||
echo "No terminal to ask in: using the first. (Choose with --pc <address:port>.)"
|
||||
fi
|
||||
fi
|
||||
IFS=$'\t' read -r name PC WORDS <<<"${pcs[$pick]}"
|
||||
echo "Found FramePort on $name ($PC)${WORDS:+, PC words: $WORDS}"
|
||||
fi
|
||||
|
||||
nonce=$(python3 -c 'import secrets; print(secrets.token_hex(12))')
|
||||
digits=$(python3 -c 'import hashlib, sys; print(f"{int(hashlib.sha256(sys.argv[1].encode()).hexdigest()[:8], 16) % 10000:04d}")' "$nonce")
|
||||
reply=$(curl -fsS -G --data-urlencode "host=$(hostname)" --data-urlencode "nonce=$nonce" "http://$PC/hello") || {
|
||||
echo "FramePort at $PC didn't answer. Is it still open at Steam Frame → Start setup?"; exit 1; }
|
||||
id=$(python3 -c 'import json, sys; print(json.loads(sys.argv[1])["id"])' "$reply")
|
||||
WORDS=$(python3 -c 'import json, sys; print(json.loads(sys.argv[1]).get("words", ""))' "$reply")
|
||||
|
||||
say "FramePort on your PC asks to set up this Frame"
|
||||
printf ' Click Allow there if it shows \033[1;33m%s\033[0m (PC: %s)\n' "$digits" "${WORDS:-?}"
|
||||
tmp=$(mktemp)
|
||||
trap 'rm -f "$tmp"' EXIT
|
||||
code=""
|
||||
for _ in $(seq 12); do # up to about 20 minutes
|
||||
status=$(curl -sS -o "$tmp" -w '%{http_code}' -m 115 "http://$PC/wait?id=$id" || echo 000)
|
||||
case $status in
|
||||
200) code=$(python3 -c 'import json, sys; print(json.load(open(sys.argv[1]))["code"])' "$tmp"); break ;;
|
||||
202) continue ;;
|
||||
403) echo "Not allowed on the PC. Nothing was changed on this Frame."; exit 1 ;;
|
||||
*) echo "Lost FramePort at $PC (HTTP $status). Run this again, or run the setup command FramePort shows."; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
[[ -n "$code" ]] || { echo "Not allowed in time. Run this again when you're at your PC."; exit 1; }
|
||||
|
||||
say "Allowed. Running the setup from $PC"
|
||||
curl -fsS "http://$PC/$code" | bash
|
||||
@@ -6,10 +6,14 @@ notes: 'Native OpenXR GLES video player. 360 theatres/videos (equirect2 layers,
|
||||
at 72 fps (the runtime asks for 4536 px per eye). Confirmed in the headset by the owner (2026-10-01). Its "Internal
|
||||
Storage" list is /sdcard/4XPlayer: send videos with the game page''s "Add videos".'
|
||||
details: 'Settings: equirect_emul (GLES worker draws 360 layers into a projection layer), stable_local, focus_hold,
|
||||
scale 0.75; frame.swapchain_limit for its 7680x3840 theatre swapchains.'
|
||||
scale 0.75; frame.swapchain_limit for its 7680x3840 theatre swapchains. Its hardware decoding mode (Java MediaCodec,
|
||||
Vr4pMediaPlayer; its own FFmpeg is the software path) gets the Frame''s video hardware with frame.hw_video_decode
|
||||
(added 2026-10-09, not yet checked in the headset).'
|
||||
tested_version: 2.0.22
|
||||
engine: Other
|
||||
xr: OpenXR
|
||||
frame:
|
||||
- frame.hw_video_decode
|
||||
adapter:
|
||||
equirect_emul: 1
|
||||
stable_local: 1
|
||||
@@ -17,4 +21,6 @@ adapter:
|
||||
scale: 0.75
|
||||
verified:
|
||||
date: '2026-10-01'
|
||||
updated: '2026-10-10'
|
||||
min_app: 0.12.1
|
||||
source_hint: 4XVR Video Player
|
||||
@@ -0,0 +1,23 @@
|
||||
package: com.CortopiaStudios.DTRH
|
||||
title: Down the Rabbit Hole
|
||||
status: works
|
||||
tested_version: 01.04.434
|
||||
engine: Unity
|
||||
xr: OpenXR
|
||||
frame:
|
||||
- frame.unity_text_input
|
||||
- frame.unity_runtime_msaa_off
|
||||
- frame.unity_gl_shim
|
||||
device:
|
||||
- device.text_input_window
|
||||
adapter:
|
||||
haptic_fix: 1
|
||||
verified:
|
||||
date: '2026-10-10'
|
||||
known_good_sha256: ce9e02e9b8fc64dc37bec2bd869d2ed1c4a99f28adffd6b5ec38c87b3cb639f7
|
||||
app: 0.12.0
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261007.6125817'
|
||||
agent: 59
|
||||
issue: 145
|
||||
source_hint: '8430807483680247'
|
||||
@@ -0,0 +1,24 @@
|
||||
package: com.CyberneticWalrus.DoesitStackMeta
|
||||
title: Does it Stack?
|
||||
status: issues
|
||||
notes: Mixed reality mode does not work (works on Demeo), everything else seems to be OK
|
||||
tested_version: 1.02 (3683)
|
||||
engine: Unity
|
||||
xr: OpenXR
|
||||
frame:
|
||||
- frame.unity_text_input
|
||||
- frame.oculusos
|
||||
device:
|
||||
- device.text_input_window
|
||||
adapter:
|
||||
haptic_fix: 1
|
||||
refresh_rate: 90.0
|
||||
verified:
|
||||
date: '2026-10-09'
|
||||
known_good_sha256: e9fce6ac812f1bb317a7a6959be89c5ff54e87f56af9ad4c42dff5fecad4efe8
|
||||
app: 0.12.0
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261006.6173745'
|
||||
agent: 59
|
||||
issue: 112
|
||||
source_hint: Does It Stack
|
||||
@@ -0,0 +1,20 @@
|
||||
package: com.ForwardXP.nuke
|
||||
title: Please Don't Touch Anything
|
||||
status: works
|
||||
notes: Seems functional
|
||||
tested_version: '2.2'
|
||||
engine: Unity
|
||||
xr: OpenXR
|
||||
frame:
|
||||
- frame.unity_text_input
|
||||
device:
|
||||
- device.text_input_window
|
||||
verified:
|
||||
date: '2026-10-08'
|
||||
known_good_sha256: 17460c8691b9ff82f6c7ca5597afd0aacf1a94aa30ebb6a6108802991b60f51b
|
||||
app: 0.12.0
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261006.6173745'
|
||||
agent: 59
|
||||
issue: 106
|
||||
source_hint: apks
|
||||
@@ -0,0 +1,21 @@
|
||||
package: com.FunktronicLabs.TheLightBrigade
|
||||
title: The Light Brigade
|
||||
status: issues
|
||||
notes: Judder in weapons
|
||||
tested_version: '746'
|
||||
engine: Unity
|
||||
xr: OpenXR
|
||||
frame:
|
||||
- frame.unity_text_input
|
||||
device:
|
||||
- device.text_input_window
|
||||
adapter:
|
||||
haptic_fix: 1
|
||||
verified:
|
||||
date: '2026-10-09'
|
||||
app: 0.12.0
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261007.6125817'
|
||||
agent: 59
|
||||
issue: 114
|
||||
source_hint: The Light Brigade
|
||||
@@ -1,20 +1,36 @@
|
||||
package: com.ILMxLAB.VaderImmortal.ep1
|
||||
title: 'Vader Immortal: Episode I'
|
||||
status: issues
|
||||
notes: Starts in VR and plays the intro, then stays on the loading card (Vader's portrait with a progress bar).
|
||||
details: Unreal Engine 4 (GLES). After the Lucasfilm intro the game shows its loading card and never loads the next
|
||||
scene; it keeps rendering at 72 fps and ignores input. Ruled out so far - Meta platform requests (all answered),
|
||||
video playback (the intro is a video and plays), the no-ForceQuit build, frame and swapchain handling. The Frame's
|
||||
SteamVR runtime also leaks about 20 MB of memory a second while the game runs, which slows it down after a few
|
||||
minutes. Next steps - find what the loading code waits for in the game's engine library (no symbols) and report
|
||||
the runtime leak to Valve. GitHub issue 49.
|
||||
status: works
|
||||
notes: 'Plays (owner''s headset test): loading card, grip/trigger, hands and the lightspeed sequence fixed. Thumbs
|
||||
follow the touches with frame.unreal_thumb_touch (Klownicle''s engine fix).'
|
||||
details: Unreal Engine 4 (GLES). Found and verified in gameplay on a Frame by Klownicle (GitHub issue 49); FramePort
|
||||
reimplements them as patches that match the game's code exactly and change nothing when it differs. The engine's
|
||||
Quest checks (IsRunningOnSantaCruz) answer "not a Quest" on the Frame - the menu waited for a Quest-only shader
|
||||
precompile that never starts (frame.unreal_quest_precompile makes the non-Quest branch report 100 %), and the
|
||||
game's key map picked the empty Gear VR controls (frame.unreal_quest_keymap keeps the Quest set). Two lightspeed
|
||||
shaders, as the Frame's GL driver (Zink) compiles them, read loop counters and accumulators before setting them
|
||||
and hang the GPU; a Vulkan layer under Zink inserts the stores that zero them (frame.zink_shader_fix, zink_shader_fix;
|
||||
the captured modules are from Lepton 2.8.14 and stop matching if a Frame update changes the driver's output -
|
||||
the layer logs that). OVRPlugin asks for poses at its own clock (pose_time_fix). Unreal's Oculus input animates the
|
||||
thumbs from near-touch, which the Frame never reports (frame.unreal_thumb_touch reads the touches instead; binding
|
||||
the proximity to the touch inputs in FrameBridge didn't reach the game). The Frame's SteamVR runtime
|
||||
leaks about 20 MB a second while the game runs (reported to Valve).
|
||||
tested_version: 1.1.1+667256.cl.387770
|
||||
engine: Unreal
|
||||
xr: VrApi
|
||||
alt_overport:
|
||||
- patch_remove_unreal_force_quit
|
||||
frame:
|
||||
- frame.unreal_quest_precompile
|
||||
- frame.unreal_quest_keymap
|
||||
- frame.unreal_thumb_touch
|
||||
- frame.zink_shader_fix
|
||||
adapter:
|
||||
pose_time_fix: 1
|
||||
zink_shader_fix: 12016:b2919629761ad268e0b21c72ac8520f81b76e72c3adc26897f97eae9a3e70a66:3092:0x0003003e,166,82,0x0003003e,177,82,0x0003003e,183,82,0x0003003e,189,82,0x0003003e,256,82,0x0003003e,266,82,0x0003003e,272,82,0x0003003e,278,82,0x0003003e,318,82,0x0003003e,328,82,0x0003003e,334,82,0x0003003e,340,82;11436:6f18be49f2aaa2452f962eb16f7af744c5c22a7b25f37ce681e0d6399e35a869:2932:0x0003003e,164,80,0x0003003e,175,80,0x0003003e,181,80,0x0003003e,187,80,0x0003003e,254,80,0x0003003e,264,80,0x0003003e,270,80,0x0003003e,276,80,0x0003003e,316,80,0x0003003e,326,80,0x0003003e,332,80,0x0003003e,338,80
|
||||
verified:
|
||||
date: '2026-10-06'
|
||||
date: '2026-10-09'
|
||||
issue: 49
|
||||
updated: '2026-10-06'
|
||||
updated: '2026-10-09'
|
||||
min_app: 0.12.1
|
||||
source_hint: Vader Immortal- Episode I
|
||||
@@ -0,0 +1,24 @@
|
||||
package: com.ILMxLAB.VaderImmortal.ep2
|
||||
title: 'Vader Immortal: Episode II'
|
||||
status: works
|
||||
notes: Plays (owner's headset test, 2026-10-09) with Episode I's fixes, which FramePort finds in this episode's
|
||||
code too.
|
||||
details: 'Unreal Engine 4 (GLES), the same engine build as Episode I: the Quest-only shader precompile and key map
|
||||
(frame.unreal_quest_precompile, frame.unreal_quest_keymap), thumbs from the capacitive touches (frame.unreal_thumb_touch)
|
||||
and poses at OVRPlugin''s clock (pose_time_fix). Episode I''s lightspeed shader fix doesn''t apply. The campaign
|
||||
intro once stayed black with its dialogue playing; it rendered on the next run.'
|
||||
tested_version: 2.0.3+667261.cl.387778
|
||||
engine: Unreal
|
||||
xr: VrApi
|
||||
alt_overport:
|
||||
- patch_remove_unreal_force_quit
|
||||
frame:
|
||||
- frame.unreal_quest_precompile
|
||||
- frame.unreal_quest_keymap
|
||||
- frame.unreal_thumb_touch
|
||||
adapter:
|
||||
pose_time_fix: 1
|
||||
verified:
|
||||
date: '2026-10-09'
|
||||
min_app: 0.12.1
|
||||
source_hint: Vader Immortal- Episode II
|
||||
@@ -0,0 +1,24 @@
|
||||
package: com.ILMxLAB.VaderImmortal.ep3
|
||||
title: 'Vader Immortal: Episode III'
|
||||
status: works
|
||||
notes: Plays (owner's headset test, 2026-10-09) with Episode I's fixes, which FramePort finds in this episode's
|
||||
code too.
|
||||
details: 'Unreal Engine 4 (GLES), the same engine build as Episode I: the Quest-only shader precompile and key map
|
||||
(frame.unreal_quest_precompile, frame.unreal_quest_keymap), thumbs from the capacitive touches (frame.unreal_thumb_touch)
|
||||
and poses at OVRPlugin''s clock (pose_time_fix). Episode I''s lightspeed shader fix doesn''t apply. The campaign
|
||||
intro starts on a black screen with only dialogue: that is the game, not a bug.'
|
||||
tested_version: 3.0.3+667263.cl.387932
|
||||
engine: Unreal
|
||||
xr: VrApi
|
||||
alt_overport:
|
||||
- patch_remove_unreal_force_quit
|
||||
frame:
|
||||
- frame.unreal_quest_precompile
|
||||
- frame.unreal_quest_keymap
|
||||
- frame.unreal_thumb_touch
|
||||
adapter:
|
||||
pose_time_fix: 1
|
||||
verified:
|
||||
date: '2026-10-09'
|
||||
min_app: 0.12.1
|
||||
source_hint: Vader Immortal- Episode III
|
||||
@@ -0,0 +1,24 @@
|
||||
package: com.MightyCoconut.WalkaboutMiniGolf
|
||||
title: Walkabout Mini Golf
|
||||
status: works
|
||||
tested_version: '6.7'
|
||||
engine: Unity
|
||||
xr: OpenXR
|
||||
frame:
|
||||
- frame.unity_text_input
|
||||
- frame.oculusos
|
||||
device:
|
||||
- device.text_input_window
|
||||
adapter:
|
||||
controller_models: 1
|
||||
haptic_fix: 1
|
||||
scale: 1.5
|
||||
verified:
|
||||
date: '2026-10-08'
|
||||
known_good_sha256: cf3b5cbe131af8a2baaa3f5c665b1c7001c8b299473abfcf98d90e3c02b08a2f
|
||||
app: 0.12.0
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261007.6125817'
|
||||
agent: 59
|
||||
issue: 111
|
||||
source_hint: Walkabout Mini Golf
|
||||
@@ -0,0 +1,22 @@
|
||||
package: com.PeanutButton.Retropolis
|
||||
title: Retropolis
|
||||
status: works
|
||||
tested_version: '0.87'
|
||||
engine: Unity
|
||||
xr: OpenXR
|
||||
frame:
|
||||
- frame.unity_text_input
|
||||
- frame.oculusos
|
||||
device:
|
||||
- device.text_input_window
|
||||
adapter:
|
||||
haptic_fix: 1
|
||||
verified:
|
||||
date: '2026-10-10'
|
||||
known_good_sha256: 4656b980fccd812d8edac15805dcd86c2f44029abdab98c3187699d1fc878f88
|
||||
app: 0.12.0
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261007.6125817'
|
||||
agent: 59
|
||||
issue: 153
|
||||
source_hint: com.PeanutButton.Retropolis
|
||||
@@ -1,12 +1,14 @@
|
||||
package: com.PixelToys.BattleSisters
|
||||
title: BattleSisters
|
||||
status: works
|
||||
notes: Starts in VR; controller buttons and vibration work.
|
||||
details: Unity 2019.4 with Unity's built-in Oculus support. frame.unity_oculus_check starts VR (Meta's system-app check),
|
||||
adds the frame wait its legacy loop never makes (without it the GPU hung, black screen) and lets Unity's Oculus
|
||||
input accept Lepton's device model (it only reported controllers on a device named "Oculus ...", so buttons were
|
||||
dead). haptic_fix stops the first controller vibration from freezing the Frame (OVRPort's loader read its duration
|
||||
in nanoseconds as seconds and the game ran out of memory).
|
||||
notes: Plays; controller buttons and vibration work, hands follow the controllers (pose_time_fix).
|
||||
details: Unity 2019.4 with Unity's built-in Oculus support. frame.unity_oculus_check starts VR (Meta's system-app
|
||||
check), adds the frame wait its legacy loop never makes (without it the GPU hung, black screen) and lets Unity's
|
||||
Oculus input accept Lepton's device model (it only reported controllers on a device named "Oculus ...", so buttons
|
||||
were dead). haptic_fix stops the first controller vibration from freezing the Frame (OVRPort's loader read its
|
||||
duration in nanoseconds as seconds and the game ran out of memory). With pose_time_fix the hands follow the controllers
|
||||
- OVRPlugin asked for hand poses at Android's monotonic "now", which on SteamOS 0.4.5 is 2.56 s behind the runtime's
|
||||
XrTime, so the hands lagged far behind.
|
||||
tested_version: 1.2.4
|
||||
engine: Unity
|
||||
xr: VrApi
|
||||
@@ -18,9 +20,10 @@ frame:
|
||||
- frame.unity_gl_shim
|
||||
adapter:
|
||||
haptic_fix: 1
|
||||
pose_time_fix: 1
|
||||
verified:
|
||||
date: '2026-10-06'
|
||||
date: '2026-10-08'
|
||||
issue: 48
|
||||
updated: '2026-10-06'
|
||||
min_app: 0.11.1
|
||||
updated: '2026-10-08'
|
||||
min_app: 0.12.1
|
||||
source_hint: Battle Sister
|
||||
@@ -0,0 +1,22 @@
|
||||
package: com.ScytheDevTeam.ContainmentProtocol
|
||||
title: Deep Cuts
|
||||
status: works
|
||||
tested_version: 1.1.3271
|
||||
engine: Unity
|
||||
xr: OpenXR
|
||||
frame:
|
||||
- frame.unity_text_input
|
||||
- frame.oculusos
|
||||
device:
|
||||
- device.text_input_window
|
||||
adapter:
|
||||
haptic_fix: 1
|
||||
verified:
|
||||
date: '2026-10-10'
|
||||
known_good_sha256: d8d4bfb0954059c5ed1bcaa0edfb8b18f154ff710049f4808c42cfd8d88ee5a2
|
||||
app: 0.12.0
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261007.6125817'
|
||||
agent: 59
|
||||
issue: 144
|
||||
source_hint: com.ScytheDevTeam.ContainmentProtocol
|
||||
@@ -0,0 +1,22 @@
|
||||
package: com.ToastVR.Matilda
|
||||
title: Max Mustard
|
||||
status: works
|
||||
tested_version: 1.1.0
|
||||
engine: Unity
|
||||
xr: OpenXR
|
||||
frame:
|
||||
- frame.unity_text_input
|
||||
device:
|
||||
- device.text_input_window
|
||||
adapter:
|
||||
haptic_fix: 1
|
||||
verified:
|
||||
date: '2026-10-08'
|
||||
known_good_sha256: 9a67459fa36c3b9ac0d035e6c43b1809b39772699333e8cfd7d2a4d7f17926a7
|
||||
app: 0.12.0
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261007.6125817'
|
||||
agent: 59
|
||||
issue: 110
|
||||
updated: '2026-10-09'
|
||||
source_hint: com.ToastVR.Matilda
|
||||
@@ -0,0 +1,22 @@
|
||||
package: com.UNIVRS.Freedom
|
||||
title: Freedom
|
||||
status: issues
|
||||
notes: Volume can't be changed in the game.
|
||||
tested_version: 1.0.2950
|
||||
engine: Unity
|
||||
xr: OpenXR
|
||||
frame:
|
||||
- frame.unity_text_input
|
||||
device:
|
||||
- device.text_input_window
|
||||
adapter:
|
||||
haptic_fix: 1
|
||||
verified:
|
||||
date: '2026-10-10'
|
||||
known_good_sha256: 24662272c4cbe5dc7c4f3c803bdb9dead9661ac3d59bf80cca2e260256acc4bc
|
||||
app: 0.12.0
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261007.6125817'
|
||||
agent: 59
|
||||
issue: 132
|
||||
source_hint: AOT VR
|
||||
@@ -0,0 +1,22 @@
|
||||
package: com.XRGames.ZombielandVR
|
||||
title: ZombielandVR
|
||||
status: works
|
||||
tested_version: 1.7.0
|
||||
engine: Unity
|
||||
xr: VrApi
|
||||
frame:
|
||||
- frame.unity_text_input
|
||||
- frame.vrapi_stub
|
||||
device:
|
||||
- device.text_input_window
|
||||
adapter:
|
||||
haptic_fix: 1
|
||||
verified:
|
||||
date: '2026-10-10'
|
||||
known_good_sha256: 750067107cd739c80b65516dd1c18219283b2a29b39430bb21ed85d48b9b94ac
|
||||
app: 0.12.1.dev252
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261007.6125817'
|
||||
agent: 71
|
||||
issue: 141
|
||||
source_hint: ZombielandVR
|
||||
@@ -1,16 +1,23 @@
|
||||
package: com.YourCompany.RoboRecall
|
||||
title: Robo Recall
|
||||
tested_version: '1.0'
|
||||
source_hint: 'Robo Recall- Unplugged'
|
||||
engine: Unreal
|
||||
xr: VrApi
|
||||
status: works
|
||||
notes: Needed the LAUNCHER category fix.
|
||||
details: Source APK is a community 'patch+savefix+90Hz' build.
|
||||
details: Source APK is a community 'patch+savefix+90Hz' build. Shares Vader Immortal's Unreal 4 Oculus input (GitHub
|
||||
49) - thumbs follow the touches (frame.unreal_thumb_touch) and controller poses are located at the right time
|
||||
(pose_time_fix); added 2026-10-09 from Vader's headset results, not yet checked in this game.
|
||||
tested_version: '1.0'
|
||||
engine: Unreal
|
||||
xr: VrApi
|
||||
alt_overport:
|
||||
- patch_remove_unreal_force_quit
|
||||
frame:
|
||||
- frame.unreal_thumb_touch
|
||||
adapter:
|
||||
pose_time_fix: 1
|
||||
verified:
|
||||
date: '2026-09-28'
|
||||
overport_cli: 1.2.3
|
||||
overport_runtime: 3.4.3-23204ea
|
||||
known_good_sha256: 4ce6e3563da131e288645f4b62a634ac98043e55bc42b7c0ad5f461207d5f53c
|
||||
updated: '2026-10-09'
|
||||
source_hint: Robo Recall- Unplugged
|
||||
@@ -0,0 +1,23 @@
|
||||
package: com.asg.clockworkdev
|
||||
title: Clockwork
|
||||
status: works
|
||||
tested_version: '1.29'
|
||||
engine: Unity
|
||||
xr: OpenXR
|
||||
frame:
|
||||
- frame.unity_text_input
|
||||
- frame.unity_runtime_msaa_off
|
||||
- frame.unity_gl_shim
|
||||
device:
|
||||
- device.text_input_window
|
||||
adapter:
|
||||
haptic_fix: 1
|
||||
verified:
|
||||
date: '2026-10-09'
|
||||
known_good_sha256: 99a14eed320ba267153963c2d87d4e11e943b9920d48dfd5352c681de28ba95e
|
||||
app: 0.12.1.dev203
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261007.6125817'
|
||||
agent: 67
|
||||
issue: 116
|
||||
source_hint: com.asg.clockworkdev
|
||||
@@ -1,6 +1,7 @@
|
||||
package: com.beatgames.beatsaber.lj369vr
|
||||
title: Beat Saber
|
||||
status: works
|
||||
notes: Purchased DLC isn't detected (ownership comes from Meta's servers).
|
||||
tested_version: 1.40.8_7379
|
||||
engine: Unity
|
||||
xr: OpenXR
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package: com.beatgames.beatsaber
|
||||
title: Beat Saber
|
||||
status: works
|
||||
notes: Purchased DLC isn't detected (ownership comes from Meta's servers).
|
||||
tested_version: 1.40.8_7379
|
||||
engine: Unity
|
||||
xr: OpenXR
|
||||
|
||||
@@ -1,16 +1,26 @@
|
||||
package: com.camouflaj.manta
|
||||
title: 'Batman: Arkham Shadow'
|
||||
tested_version: 1.4.1-350961
|
||||
source_hint: 'Batman- Arkham Shadow'
|
||||
engine: Unity
|
||||
xr: OpenXR
|
||||
status: works
|
||||
notes: Large data set (~27 GiB) incl. all language packs.
|
||||
details: Uses Meta XR Audio (Wwise), handled by patch_meta_xr_audio. Includes all language packs (~28 GB).
|
||||
details: 'Uses Meta XR Audio (Wwise), handled by patch_meta_xr_audio. Cutscenes are 8K HEVC panoramas: frame.hw_video_decode
|
||||
decodes them on the Frame''s hardware, adapter.surface_native shows them in stereo (PRs #96, #128). Includes all
|
||||
language packs (~28 GB). sync_guard (to test, GitHub #102) - a reporter''s game quit to Steam''s waiting screen
|
||||
after the Frame runtime crashed in xrSyncActions (CVRInputLatest::UpdateActionState), the input race Myst had.'
|
||||
tested_version: 1.4.1-350961
|
||||
engine: Unity
|
||||
xr: OpenXR
|
||||
overport_extra:
|
||||
- patch_disable_space_warp
|
||||
frame:
|
||||
- frame.hw_video_decode
|
||||
adapter:
|
||||
sync_guard: 1
|
||||
surface_native: 1
|
||||
verified:
|
||||
date: '2026-09-28'
|
||||
overport_cli: 1.2.3
|
||||
overport_runtime: 3.4.3-23204ea
|
||||
known_good_sha256: 796d1cab08f614d72c50d9702974c719c0908f5de91183cfe02d1fd5eb09551a
|
||||
updated: '2026-10-10'
|
||||
min_app: 0.12.1
|
||||
source_hint: Batman- Arkham Shadow
|
||||
@@ -1,14 +1,23 @@
|
||||
package: com.drbeef.doom3quest
|
||||
title: Doom3Quest
|
||||
status: issues
|
||||
notes: PDA shows black screen.
|
||||
status: works
|
||||
notes: HUD and PDA show with frame.gl_multiview_fbo (Xandrix1987's headset test, GitHub 77, no frame-rate drop with
|
||||
the PDA open). Walking and running can switch when the frame rate drops, which seems to be the game's own behaviour.
|
||||
details: Doom3Quest compiles every vertex shader for two views (OVR_multiview) and draws its HUD/PDA into single-view
|
||||
framebuffers. Mesa (the Frame's GL) rejects that combination as the spec requires and drops the draw, so they
|
||||
stayed black; frame.gl_multiview_fbo draws those passes with a single-view copy of the shader. Xandrix1987's framebuffer.cpp
|
||||
fix went upstream as a PR to Team-Beef-Studios/Doom3Quest.
|
||||
tested_version: 1.4.8
|
||||
engine: Other
|
||||
xr: OpenXR
|
||||
frame:
|
||||
- frame.gl_multiview_fbo
|
||||
verified:
|
||||
date: '2026-10-06'
|
||||
known_good_sha256: 3c733f5cd08b6fa5d9e2775b1c1aee36b5943518b5d8451ba87e3c59a702afdf
|
||||
app: 0.12.0
|
||||
overport_cli: 1.2.3
|
||||
issue: 77
|
||||
updated: '2026-10-09'
|
||||
min_app: 0.12.1
|
||||
source_hint: doom3quest148
|
||||
@@ -0,0 +1,25 @@
|
||||
package: com.endspace.quest
|
||||
title: End Space
|
||||
status: issues
|
||||
notes: Controls stop responding after the first mission loads.
|
||||
tested_version: 1.0.6.1
|
||||
engine: Unity
|
||||
xr: VrApi
|
||||
frame:
|
||||
- frame.unity_oculus_check
|
||||
- frame.unity_text_input
|
||||
- frame.unity_runtime_msaa_off
|
||||
- frame.unity_gl_shim
|
||||
device:
|
||||
- device.text_input_window
|
||||
adapter:
|
||||
haptic_fix: 1
|
||||
verified:
|
||||
date: '2026-10-10'
|
||||
known_good_sha256: c5eb892311a130686f238e6f61cbdb619324f5c21f8c0641c0fcd49d77369eaf
|
||||
app: 0.12.0
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261007.6125817'
|
||||
agent: 59
|
||||
issue: 148
|
||||
source_hint: com.endspace.quest
|
||||
@@ -0,0 +1,22 @@
|
||||
package: com.forcefieldxr.explorevr
|
||||
title: ExploreVR
|
||||
status: issues
|
||||
notes: The 3D world warps and shifts with head movement (wrong perspective).
|
||||
tested_version: 1.2.1
|
||||
engine: Unreal
|
||||
xr: VrApi
|
||||
alt_overport:
|
||||
- patch_remove_unreal_force_quit
|
||||
frame:
|
||||
- frame.nodebug
|
||||
adapter:
|
||||
haptic_fix: 1
|
||||
verified:
|
||||
date: '2026-10-10'
|
||||
known_good_sha256: 04576c46a91f4bb851a344c75e022b17a5d2837d054e7323a184b81436cf8019
|
||||
app: 0.12.0
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261007.6125817'
|
||||
agent: 59
|
||||
issue: 149
|
||||
source_hint: com.forcefieldxr.explorevr
|
||||
@@ -1,18 +1,24 @@
|
||||
package: com.forcefieldxr.timestall
|
||||
title: Time Stall
|
||||
tested_version: '1.0'
|
||||
source_hint: Time Stall
|
||||
engine: Unreal
|
||||
xr: VrApi
|
||||
status: issues
|
||||
notes: Both eyes distort during movement (unresolved).
|
||||
details: Legacy VrApi via OVRPlugin.
|
||||
details: Legacy VrApi via OVRPlugin. Shares Vader Immortal's Unreal 4 Oculus input (GitHub 49) - thumbs follow the
|
||||
touches (frame.unreal_thumb_touch) and controller poses are located at the right time (pose_time_fix); added 2026-10-09
|
||||
from Vader's headset results, not yet checked in this game.
|
||||
tested_version: '1.0'
|
||||
engine: Unreal
|
||||
xr: VrApi
|
||||
alt_overport:
|
||||
- patch_remove_unreal_force_quit
|
||||
frame:
|
||||
- frame.unreal_thumb_touch
|
||||
- frame.nodebug
|
||||
adapter:
|
||||
pose_time_fix: 1
|
||||
verified:
|
||||
date: '2026-09-28'
|
||||
overport_cli: 1.2.3
|
||||
overport_runtime: 3.4.3-23204ea
|
||||
known_good_sha256: 50c4d05b663b2f1851f5a7d650a89fd34587d65fafba13cc58671c96f7016db6
|
||||
updated: '2026-10-09'
|
||||
source_hint: Time Stall
|
||||
@@ -0,0 +1,9 @@
|
||||
package: com.golfscope.proputt
|
||||
title: GOLF+
|
||||
status: unsupported
|
||||
notes: Black screen. The game's servers reject the login on this platform (Authentication not supported).
|
||||
engine: Unity
|
||||
xr: OpenXR
|
||||
verified:
|
||||
date: '2026-10-10'
|
||||
issue: 147
|
||||
@@ -0,0 +1,24 @@
|
||||
package: com.harmonixmusic.kata
|
||||
title: Audica
|
||||
status: works
|
||||
tested_version: 1.0.3.4
|
||||
engine: Unity
|
||||
xr: VrApi
|
||||
frame:
|
||||
- frame.unity_no_msaa
|
||||
- frame.unity_oculus_check
|
||||
- frame.unity_text_input
|
||||
- frame.unity_runtime_msaa_off
|
||||
- frame.unity_gl_shim
|
||||
device:
|
||||
- device.text_input_window
|
||||
adapter:
|
||||
haptic_fix: 1
|
||||
verified:
|
||||
date: '2026-10-09'
|
||||
known_good_sha256: bc2c00fe049fd97643a296e622e3a90e08f0bd796ee454b0278525e9d72f8139
|
||||
app: 0.12.0
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261007.6125817'
|
||||
agent: 59
|
||||
issue: 126
|
||||
@@ -0,0 +1,27 @@
|
||||
package: com.ilmxlab.tales
|
||||
title: 'Star Wars: Tales from the Galaxy''s Edge'
|
||||
status: unknown
|
||||
notes: Not working yet - after the intro logos and a loading animation the picture goes black (GitHub issue 61).
|
||||
Gets the controller fixes found for Vader Immortal (same studio) to test.
|
||||
details: Unreal Engine 4 (GLES) by ILMxLAB, like Vader Immortal, but a different engine build - it has none of Vader's
|
||||
Quest-only branches (no GetQuestShaderPrecompilePercent or RPOC key map; it precompiles shaders through Unreal's
|
||||
own pipeline cache), so frame.unreal_quest_precompile/_keymap don't apply. Its seasons and Wwise banks are Meta
|
||||
platform asset files (frame.asset_files). Vader's OVRPlugin findings apply to it as well - poses asked for at
|
||||
OVRPlugin's own clock (pose_time_fix) and thumbs from near-touch, which the Frame never reports (frame.unreal_thumb_touch).
|
||||
Ruled out for the black picture so far (see the diagnostics in issue 61) - asset-file paks, Valve's foveation,
|
||||
GL errors; the game's own eye image reads back black.
|
||||
tested_version: 1.1.9+734762.cl.439699
|
||||
engine: Unreal
|
||||
xr: VrApi
|
||||
alt_overport:
|
||||
- patch_remove_unreal_force_quit
|
||||
frame:
|
||||
- frame.asset_files
|
||||
- frame.unreal_thumb_touch
|
||||
adapter:
|
||||
pose_time_fix: 1
|
||||
verified:
|
||||
issue: 61
|
||||
updated: '2026-10-09'
|
||||
min_app: 0.12.1
|
||||
source_hint: Star Wars- Tales from the Galaxys Edge
|
||||
@@ -0,0 +1,21 @@
|
||||
package: com.kluge.SynthRiders
|
||||
title: SynthRiders
|
||||
status: works
|
||||
tested_version: 3.6.7a1
|
||||
engine: Unity
|
||||
xr: OpenXR
|
||||
frame:
|
||||
- frame.unity_text_input
|
||||
- frame.oculusos
|
||||
device:
|
||||
- device.text_input_window
|
||||
adapter:
|
||||
controller_models: 1
|
||||
haptic_fix: 1
|
||||
verified:
|
||||
date: '2026-10-10'
|
||||
known_good_sha256: fb982ad7617629df50190c98d1de906ac9b41903d782c0ada0087b32fc95a5f1
|
||||
app: 0.12.0
|
||||
overport_cli: 1.2.5
|
||||
issue: 158
|
||||
source_hint: com.kluge.SynthRiders
|
||||
@@ -0,0 +1,24 @@
|
||||
package: com.markschramm.gravitylab
|
||||
title: Gravity Lab
|
||||
status: works
|
||||
notes: Works great, along with passthrough mode
|
||||
tested_version: '1.221'
|
||||
engine: Unity
|
||||
xr: OpenXR
|
||||
frame:
|
||||
- frame.unity_text_input
|
||||
- frame.unity_runtime_msaa_off
|
||||
- frame.unity_gl_shim
|
||||
device:
|
||||
- device.text_input_window
|
||||
adapter:
|
||||
haptic_fix: 1
|
||||
verified:
|
||||
date: '2026-10-09'
|
||||
known_good_sha256: 82c95ee7487a130b6e37b967dd97c8362bf4d7e873fcff823f2c7877a62ff99f
|
||||
app: 0.12.0
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261007.6125817'
|
||||
agent: 59
|
||||
issue: 113
|
||||
source_hint: Gravity Lab
|
||||
@@ -0,0 +1,21 @@
|
||||
package: com.miketeevee.shoresofloci
|
||||
title: Shores of Loci
|
||||
status: works
|
||||
tested_version: '1.2'
|
||||
engine: Unity
|
||||
xr: OpenXR
|
||||
frame:
|
||||
- frame.unity_text_input
|
||||
device:
|
||||
- device.text_input_window
|
||||
adapter:
|
||||
haptic_fix: 1
|
||||
verified:
|
||||
date: '2026-10-10'
|
||||
known_good_sha256: c223a99cc1f1597a477a4677c1390cf744d517bd1e8fa7cf82e20b1baefaba26
|
||||
app: 0.12.0
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261007.6125817'
|
||||
agent: 59
|
||||
issue: 154
|
||||
source_hint: com.miketeevee.shoresofloci
|
||||
@@ -1,18 +1,25 @@
|
||||
package: com.nDreams.PhantomQuest
|
||||
title: 'Phantom: Covert Ops'
|
||||
tested_version: '1.2'
|
||||
source_hint: 'Phantom- Covert Ops'
|
||||
engine: Unreal
|
||||
xr: VrApi
|
||||
status: issues
|
||||
notes: DLC/store button crashes (no Meta store). Installs the no-ForceQuit build.
|
||||
details: The regular build quits itself on the Frame (System.exit after a failed platform check), so the no-ForceQuit
|
||||
build is installed.
|
||||
build is installed. Shares Vader Immortal's Unreal 4 Oculus input (GitHub 49) - thumbs follow the touches (frame.unreal_thumb_touch)
|
||||
and controller poses are located at the right time (pose_time_fix); added 2026-10-09 from Vader's headset results,
|
||||
not yet checked in this game.
|
||||
tested_version: '1.2'
|
||||
engine: Unreal
|
||||
xr: VrApi
|
||||
alt_overport:
|
||||
- patch_remove_unreal_force_quit
|
||||
use_alt: true
|
||||
frame:
|
||||
- frame.unreal_thumb_touch
|
||||
adapter:
|
||||
pose_time_fix: 1
|
||||
verified:
|
||||
date: '2026-09-28'
|
||||
overport_cli: 1.2.3
|
||||
overport_runtime: 3.4.3-23204ea
|
||||
known_good_sha256: bb02b20a23fbe5e7a580ecde15a3cd015a4183421a51aab4a4dbcddbe7a09d1d
|
||||
updated: '2026-10-09'
|
||||
source_hint: Phantom- Covert Ops
|
||||
@@ -0,0 +1,23 @@
|
||||
package: com.onehamsa.RNXQ
|
||||
title: 'Racket: Nx'
|
||||
status: works
|
||||
tested_version: 2.8.31
|
||||
engine: Unity
|
||||
xr: VrApi
|
||||
frame:
|
||||
- frame.unity_text_input
|
||||
- frame.unity_runtime_msaa_off
|
||||
- frame.unity_gl_shim
|
||||
device:
|
||||
- device.text_input_window
|
||||
adapter:
|
||||
haptic_fix: 1
|
||||
verified:
|
||||
date: '2026-10-10'
|
||||
known_good_sha256: f78de8051c5808e4244d9fa757050d6c131350112315ad6e01e2b1457f2e2053
|
||||
app: 0.12.0
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261007.6125817'
|
||||
agent: 59
|
||||
issue: 151
|
||||
source_hint: '9030540110323274'
|
||||
@@ -0,0 +1,22 @@
|
||||
package: com.quaternionsoftware.rcpilottrainer
|
||||
title: RC Pilot Trainer
|
||||
status: works
|
||||
tested_version: 0.7.0.2
|
||||
engine: Unity
|
||||
xr: OpenXR
|
||||
frame:
|
||||
- frame.unity_text_input
|
||||
- frame.oculusos
|
||||
device:
|
||||
- device.text_input_window
|
||||
adapter:
|
||||
haptic_fix: 1
|
||||
verified:
|
||||
date: '2026-10-10'
|
||||
known_good_sha256: 1b98f0dea74f058a838ac17299a0e1c67362cb1ecfbc97e4cb2aad3bcbdfb173
|
||||
app: 0.12.0
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261007.6125817'
|
||||
agent: 59
|
||||
issue: 152
|
||||
source_hint: com.quaternionsoftware.rcpilottrainer
|
||||
@@ -0,0 +1,20 @@
|
||||
package: com.rrrgames.CaveCrave
|
||||
title: Caves
|
||||
status: works
|
||||
notes: First cave loads up perfectly, didn't play to unlock other game modes
|
||||
tested_version: 1.1.4
|
||||
engine: Unity
|
||||
xr: OpenXR
|
||||
frame:
|
||||
- frame.oculusos
|
||||
adapter:
|
||||
haptic_fix: 1
|
||||
verified:
|
||||
date: '2026-10-10'
|
||||
known_good_sha256: 9720a9af42590dfdb742f278352583e56f36efbf5d96c56c59ac4b6a615f276e
|
||||
app: 0.12.0
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261007.6125817'
|
||||
agent: 59
|
||||
issue: 142
|
||||
source_hint: com.rrrgames.CaveCrave
|
||||
@@ -0,0 +1,22 @@
|
||||
package: com.tvb.cubism
|
||||
title: cubism
|
||||
status: works
|
||||
tested_version: 1.8.0
|
||||
engine: Unity
|
||||
xr: OpenXR
|
||||
frame:
|
||||
- frame.unity_text_input
|
||||
device:
|
||||
- device.text_input_window
|
||||
adapter:
|
||||
haptic_fix: 1
|
||||
scale: 2.0
|
||||
verified:
|
||||
date: '2026-10-09'
|
||||
known_good_sha256: e4e000392e53111a991c1c78653c9241b8007f81dcdb126a4f4b2003033f5a6e
|
||||
app: 0.12.0
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261007.6125817'
|
||||
agent: 59
|
||||
issue: 121
|
||||
source_hint: com.tvb.cubism
|
||||
@@ -0,0 +1,22 @@
|
||||
package: de.erthu.ancientdungeonfull
|
||||
title: Ancient_Dungeon
|
||||
status: issues
|
||||
notes: Multiplayer isn't available (offline).
|
||||
tested_version: ea0.1.10.2
|
||||
engine: Unity
|
||||
xr: OpenXR
|
||||
frame:
|
||||
- frame.unity_text_input
|
||||
device:
|
||||
- device.text_input_window
|
||||
adapter:
|
||||
haptic_fix: 1
|
||||
verified:
|
||||
date: '2026-10-10'
|
||||
known_good_sha256: 0bcbd6d01d085183df586ee692267341a9ea15d1f52fbc33265601d55c73c2d2
|
||||
app: 0.12.0
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261007.6125817'
|
||||
agent: 59
|
||||
issue: 143
|
||||
source_hint: de.erthu.ancientdungeonfull
|
||||
@@ -0,0 +1,21 @@
|
||||
package: jp.co.amata.nvr
|
||||
title: The Tale of Onogoro
|
||||
status: works
|
||||
tested_version: 1.1.0248
|
||||
engine: Unity
|
||||
xr: OpenXR
|
||||
frame:
|
||||
- frame.unity_text_input
|
||||
device:
|
||||
- device.text_input_window
|
||||
adapter:
|
||||
haptic_fix: 1
|
||||
verified:
|
||||
date: '2026-10-08'
|
||||
known_good_sha256: d6258a22a0a6e4588bbec36170f126bffc44ed64784f99e37cf4b03ad212fb79
|
||||
app: 0.12.0
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261006.6173745'
|
||||
agent: 59
|
||||
issue: 108
|
||||
source_hint: The Tale of Onogoro
|
||||
@@ -0,0 +1,11 @@
|
||||
package: quest.eleven.forfunlabs
|
||||
title: Eleven Table Tennis
|
||||
status: unsupported
|
||||
notes: Stops at the splash screen. The game needs Meta's online services after start, which aren't available on
|
||||
the Frame.
|
||||
engine: Unity
|
||||
xr: OpenXR
|
||||
pcvr_alternative: The PC VR (Rift) version works on the Frame through FramePort.
|
||||
verified:
|
||||
date: '2026-10-10'
|
||||
issue: 160
|
||||
@@ -0,0 +1,23 @@
|
||||
package: rift.beat_saber
|
||||
title: Beat Saber
|
||||
status: works
|
||||
notes: 'Supports SteamVR/OpenXR itself: runs directly, without Revive.'
|
||||
engine: Unity
|
||||
xr: OpenXR
|
||||
kind: rift
|
||||
quest_package: com.beatgames.beatsaber.lj369vr
|
||||
pcvr:
|
||||
- pcvr.xr_timefix
|
||||
- pcvr.steamvr_tuning
|
||||
pcvr_remove:
|
||||
- pcvr.revive
|
||||
as_is: true
|
||||
verified:
|
||||
date: '2026-10-09'
|
||||
known_good_sha256: dc80bd1f8e46e7b7cdc4fbf51a84e68f2918d7481581bee9c21f65e269c6bf8b
|
||||
app: 0.12.1.dev232
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261007.6125817'
|
||||
agent: 67
|
||||
issue: 117
|
||||
source_hint: Beat Saber
|
||||
@@ -0,0 +1,23 @@
|
||||
package: rift.eleven_table_tennis_vr
|
||||
title: 'Eleven: Table Tennis VR'
|
||||
status: works
|
||||
notes: 'Supports SteamVR/OpenXR itself: runs directly, without Revive (arguments -vrmode OpenVR).'
|
||||
engine: Unity
|
||||
xr: LibOVR+OpenVR
|
||||
kind: rift
|
||||
pcvr:
|
||||
- pcvr.launch_args
|
||||
- pcvr.xr_timefix
|
||||
- pcvr.steamvr_tuning
|
||||
pcvr_remove:
|
||||
- pcvr.revive
|
||||
as_is: true
|
||||
verified:
|
||||
date: '2026-10-09'
|
||||
known_good_sha256: 2cdfe3b096aef0bf76726156699381f7847ca4d17e7222359521982778470705
|
||||
app: 0.12.1.dev232
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261007.6125817'
|
||||
agent: 67
|
||||
issue: 118
|
||||
source_hint: Eleven Table Tennis VR
|
||||
@@ -0,0 +1,22 @@
|
||||
package: rift.pistol_whip
|
||||
title: Pistol Whip
|
||||
status: works
|
||||
notes: 'Supports SteamVR/OpenXR itself: runs directly, without Revive.'
|
||||
engine: Unity
|
||||
xr: OpenVR
|
||||
kind: rift
|
||||
pcvr:
|
||||
- pcvr.xr_timefix
|
||||
- pcvr.steamvr_tuning
|
||||
pcvr_remove:
|
||||
- pcvr.revive
|
||||
as_is: true
|
||||
verified:
|
||||
date: '2026-10-09'
|
||||
known_good_sha256: a01eaf73b292eb8ad21e316f1f99ad258d41b2cfed8436858a8caf2f5c0a4d28
|
||||
app: 0.12.1.dev232
|
||||
overport_cli: 1.2.5
|
||||
frame_build: '20261007.6125817'
|
||||
agent: 67
|
||||
issue: 119
|
||||
source_hint: Pistol Whip
|
||||
@@ -1,11 +1,13 @@
|
||||
package: rift.superhot_vr
|
||||
title: SUPERHOT VR
|
||||
status: works
|
||||
notes: 'Supports SteamVR/OpenXR itself: runs directly, without Revive.'
|
||||
notes: 'Supports SteamVR/OpenXR itself: runs directly, without Revive. Older builds with both Oculus and SteamVR support
|
||||
(SUPERHOTVR.exe) start with -vrmode OpenVR.'
|
||||
engine: Unity
|
||||
xr: OpenXR
|
||||
kind: rift
|
||||
pcvr:
|
||||
- pcvr.launch_args
|
||||
- pcvr.xr_timefix
|
||||
- pcvr.steamvr_tuning
|
||||
pcvr_remove:
|
||||
@@ -17,4 +19,5 @@ verified:
|
||||
app: 0.6.3
|
||||
overport_cli: 1.2.5
|
||||
issue: 28
|
||||
updated: '2026-10-09'
|
||||
source_hint: SUPERHOT VR
|
||||
@@ -3,9 +3,11 @@ title: SUPERHOT VR
|
||||
status: works
|
||||
notes: Quest version. Needs FramePort's launcher from agent 41 (reinstall once) so the game can write its saves.
|
||||
details: Unity 2018.4 with built-in Oculus support (GLES). Its eye swapchains (GL_RGBA8, then a 16-bit format) are
|
||||
created as sRGB by the adapter's swapchain_fix. The game creates its cloud save folder with mode 1700 and quits at
|
||||
start when it can't write there ("Something failed to initialize. Quitting!"); the launcher now gives every folder
|
||||
in the game's storage owner and group write permission.
|
||||
created as sRGB by the adapter's swapchain_fix. The game creates its cloud save folder with mode 1700 and quits
|
||||
at start when it can't write there ("Something failed to initialize. Quitting!"); the launcher now gives every
|
||||
folder in the game's storage owner and group write permission. On the very first start it creates that folder
|
||||
and checks it in the same moment (GitHub 120), so the recipe creates the folder at install (device_files) and
|
||||
the launcher fixes it before the game starts.
|
||||
tested_version: '1.161'
|
||||
engine: Unity
|
||||
xr: VrApi
|
||||
@@ -16,7 +18,9 @@ frame:
|
||||
- frame.unity_runtime_msaa_off
|
||||
device:
|
||||
- device.text_input_window
|
||||
device_files:
|
||||
cloud/data/.frameport: ''
|
||||
verified:
|
||||
date: '2026-10-04'
|
||||
updated: '2026-10-04'
|
||||
updated: '2026-10-09'
|
||||
source_hint: SUPERHOT VR
|
||||
+151
-93
@@ -1,344 +1,385 @@
|
||||
# Log signature -> diagnosis -> suggested fix. Matched against the game's launch.log (Lepton logcat mirror).
|
||||
# Log signature -> diagnosis -> suggested patches. Matched against the game's launch.log (Lepton logcat mirror).
|
||||
# `pattern` is a Python regex (case-sensitive). `suggest` lists patch ids (+ optional params) the UI offers as
|
||||
# "apply and rebuild". `severity`: fatal (the game can't run) | error | warning | info.
|
||||
# "apply and rebuild"; an entry `adapter.<key>=<value>` sets that value (else 1). `severity`: fatal (the game can't
|
||||
# run) | error | warning | info. `question`: a symptom only the player sees (play sessions, GUI "Last session"): its
|
||||
# fix is offered as that question, never applied on its own. `report: true` = the useful next step is a problem report
|
||||
# with diagnostics. Launch tests and real play sessions (agent session_log, `frameport session`) are both matched.
|
||||
# Sources: every failure we hit porting 34 games to the Steam Frame (see docs/PLAYBOOK.md).
|
||||
signatures:
|
||||
- id: no-launcher
|
||||
pattern: 'APP_ACTIVITY is empty'
|
||||
severity: fatal
|
||||
diagnosis: Lepton found no activity with category LAUNCHER.
|
||||
diagnosis: 'Nothing starts: Lepton found no entry point in the app (an activity with category LAUNCHER).'
|
||||
suggest: [frame.launcher]
|
||||
- id: linux-x86-no-fex
|
||||
pattern: '(cannot execute binary file: Exec format error|exec format error)'
|
||||
severity: fatal
|
||||
diagnosis: An x86_64 Linux program was started directly; the Frame's arm64 CPU needs FEX (x86 translation) for it. Reinstall the app with FramePort 0.12 or newer, which installs FEX and starts the program through it.
|
||||
diagnosis: This x86_64 Linux program was started without the translator it needs. The Frame's arm64 CPU runs it only through FEX; reinstall the app with FramePort 0.12 or newer, which installs FEX and starts the program through it.
|
||||
suggest: []
|
||||
- id: no-arm64
|
||||
pattern: 'INSTALL_FAILED_NO_MATCHING_ABIS'
|
||||
severity: fatal
|
||||
diagnosis: 32-bit-only APK. The Steam Frame has no AArch32; this cannot run. Use the PC (Rift) version via Revive.
|
||||
diagnosis: This game is 32-bit only and can't run on the Frame (no AArch32). Use the PC (Rift) version through Revive.
|
||||
suggest: []
|
||||
- id: android-too-new
|
||||
pattern: '(NoClassDefFoundError|ClassNotFoundException|NoSuchMethodError)\b.*(Landroid/window/|android\.window\.|(storeStoreFence|loadLoadFence)\(\)V in class Ljava/lang/invoke/VarHandle)'
|
||||
severity: fatal
|
||||
diagnosis: The app calls Android 12/13+ classes (android.window.*, VarHandle fences) that the Frame's Android 11 (API 30) container doesn't have; it needs a newer Android (e.g. minSdk 34 apps). Nothing to patch - it can't run until Valve updates the Frame's Android.
|
||||
diagnosis: The game needs a newer Android than the Frame has, so it can't run yet. It calls Android 12/13+ classes (android.window.*, VarHandle fences) that the Frame's Android 11 (API 30) container lacks (for example minSdk 34 apps); nothing to patch until Valve updates Lepton's Android.
|
||||
suggest: []
|
||||
- id: web-wrapper
|
||||
pattern: '(Creating TwaLauncher for com\.oculus\.browser|NameNotFoundException:? com\.oculus\.browser)'
|
||||
severity: fatal
|
||||
diagnosis: The app is a website in an Android wrapper (Trusted Web Activity) that opens Meta's browser (com.oculus.browser), which the Frame doesn't have, so nothing opens. There's no game to port - open the website (TWALauncherActivity's "Using URL" line) in a browser instead.
|
||||
diagnosis: This app is a website, not a game, and it can't open on the Frame. It is a Trusted Web Activity that opens Meta's browser (com.oculus.browser), which the Frame doesn't have; open the website (TWALauncherActivity's "Using URL" line) in a browser instead.
|
||||
suggest: []
|
||||
- id: unity-render-crash
|
||||
pattern: 'CRASH\s*:.*#\d+\s+pc [0-9a-f]+\s+\S*libgallium_dri\.so'
|
||||
severity: fatal
|
||||
diagnosis: Unity's render thread crashed inside the Frame's GL driver (Mesa/Zink); the picture freezes or stays grey. Known triggers - an OVROverlay copy (try "Unity - skip OVROverlay layers", e.g. The Room VR), MSAA switched on at runtime, a GPU hang (zink DEVICE LOST).
|
||||
diagnosis: 'The game''s graphics crashed, so the picture freezes or stays gray. Unity''s render thread crashed in the Frame''s GL driver (Mesa/Zink); known triggers are an OVROverlay copy (try "Unity: skip OVROverlay layers", for example The Room VR), MSAA switched on at runtime and a GPU hang (zink DEVICE LOST).'
|
||||
suggest: [frame.unity_no_overlay_copy, frame.unity_runtime_msaa_off]
|
||||
- id: unreal-msrtt-crash
|
||||
pattern: 'fault addr 0x10000 in tid \d+ \((RHIThread|RenderThread)'
|
||||
pattern: 'fault addr 0x10000 in tid \d+ \((RHIThread|RenderThread)|libgallium_dri\.so \(find_rp_state'
|
||||
severity: fatal
|
||||
diagnosis: The game's render thread jumped to address 0x10000 inside the Frame's GL driver (Mesa/Zink) a few seconds after start. Zink looks up a render-pass cache slot past its end when a game renders through multisampled render-to-texture (Unreal's mobile MSAA, e.g. Star Wars Pinball VR). Load the GL shim, which hides that extension.
|
||||
diagnosis: The game's graphics crashed a few seconds after start. Its render thread jumped to address 0x10000 in the Frame's GL driver (Mesa/Zink), which reads past a render-pass cache when a game uses multisampled render-to-texture (Unreal's mobile MSAA, for example Star Wars Pinball VR); the GL shim hides that extension.
|
||||
suggest: [frame.unreal_gl_shim, frame.unity_gl_shim]
|
||||
- id: pac-unpaired
|
||||
pattern: 'ILL_ILLOPN\), fault addr 0x[0-9a-f]+ \(\*pc=0xd50323bf\)'
|
||||
severity: fatal
|
||||
diagnosis: The game crashed on a return-address check (autiasp) its code never signed. The Quest's CPU ignores these checks, the Steam Frame's enforces them; some OpenSSL assembly in game engines has such unpaired checks (e.g. Star Wars Pinball VR on its first network connection, thread HttpManager).
|
||||
diagnosis: The game crashed on a CPU check the Quest ignores but the Frame enforces. Its code checks a return address (autiasp) it never signed; some OpenSSL assembly in game engines does this (for example Star Wars Pinball VR on its first network connection, thread HttpManager).
|
||||
suggest: [frame.pac_hints]
|
||||
- id: cube-swapchain-refused
|
||||
pattern: 'xrCreateSwapchain \d+x\d+ .*faces=6 .*result=-\d+'
|
||||
unless: 'cube_standin: runtime refused'
|
||||
severity: fatal
|
||||
diagnosis: The game asked for a cube-map swapchain (for example an OVROverlay skybox or loading cube), which the Frame's runtime doesn't have. OVRPlugin goes on without images and crashes in ovrp_EndFrame4 (Unity's render thread SIGSEGV in memset, for example Budget Cuts Ultimate). FrameBridge from FramePort 0.12 serves such swapchains itself and drops their cube layers (cube_standin, GLES games) - rebuild and reinstall the game.
|
||||
suggest: [frame.adapter]
|
||||
supersedes: [unity-render-crash, native-crash]
|
||||
- id: swapchain-rect-invalid
|
||||
pattern: 'xrEndFrame failed -25\b'
|
||||
severity: fatal
|
||||
diagnosis: The runtime rejects the game's frames because an image rect reaches past its swapchain (by a few pixels on some Frames); the game stops drawing (e.g. stuck at a "Waiting" box). FrameBridge from FramePort 0.11.0 clamps the rects - rebuild and reinstall the game.
|
||||
diagnosis: The runtime rejects the game's frames, so it stops drawing (for example stuck at a "Waiting" box). An image rect reaches a few pixels past its swapchain on some Frames; FrameBridge from FramePort 0.11.0 clamps the rects, so rebuild and reinstall the game.
|
||||
suggest: [frame.adapter]
|
||||
- id: missing-ovr-symbol
|
||||
pattern: '(UnsatisfiedLinkError|cannot locate symbol) .*"?(ovr_[A-Za-z0-9_]+|ovr[A-Z][A-Za-z0-9]*_ToString)'
|
||||
severity: fatal
|
||||
diagnosis: The game imports Meta platform functions overport's loader lacks.
|
||||
diagnosis: The game can't load because OVRPort's platform loader lacks Meta platform functions it uses.
|
||||
suggest: [frame.ovrstubs, frame.ovrplatformcompat]
|
||||
- id: oculus-os-class
|
||||
pattern: '(ClassNotFoundException|NoClassDefFoundError).*com[./]oculus[./]os[./](AnalyticsEvent|UnifiedTelemetryLogger)'
|
||||
severity: fatal
|
||||
diagnosis: Quest-only telemetry class lookup aborts the app (Meta XR Audio / native telemetry).
|
||||
diagnosis: The game looks up a Quest-only system class and aborts. The lookup comes from Quest telemetry (Meta XR Audio or native code).
|
||||
suggest: [frame.metaxr_telemetry, frame.oculusos]
|
||||
- id: checkjni-abort
|
||||
pattern: 'JNI DETECTED ERROR IN APPLICATION|GetStringUTFChars.*NULL|CheckJNI'
|
||||
severity: fatal
|
||||
diagnosis: CheckJNI (on because the app is debuggable) aborts on sloppy JNI usage.
|
||||
diagnosis: Android's debug checks stopped the game. CheckJNI is on because the converted app is debuggable, and it aborts on sloppy JNI use.
|
||||
suggest: [frame.nodebug]
|
||||
- id: force-quit
|
||||
pattern: 'System\.exit|ForceQuit|FAndroidMisc::RequestExit'
|
||||
severity: error
|
||||
diagnosis: The game quit itself right after starting (Unreal ForceQuit after a failed platform check).
|
||||
diagnosis: The game quit itself right after starting. Usually Unreal's ForceQuit after a failed Quest platform check; the alternate build leaves it out.
|
||||
suggest: [patch_remove_unreal_force_quit]
|
||||
use_alt: true
|
||||
- id: swapchain-format
|
||||
pattern: 'xrCreateSwapchain.*(-26|FORMAT_UNSUPPORTED)|swapchain format .* rejected'
|
||||
unless: 'FrameBridge:\s+retry (samples=1|format=\d+) result=0' # the adapter's fallback worked
|
||||
severity: error
|
||||
diagnosis: The Frame rejected the swapchain format (GLES games must use sRGB formats, no MSAA).
|
||||
diagnosis: The Frame rejected the game's image format. GLES games must use sRGB formats without MSAA.
|
||||
suggest: [adapter.swapchain_fix]
|
||||
- id: zink-shader-fix-mismatch
|
||||
pattern: 'shader fix layer: a \d+-byte module differs from fix'
|
||||
severity: warning
|
||||
diagnosis: The game's OpenGL ES shader fix (zink_shader_fix) no longer matches the shader the Frame's GL driver (Zink)
|
||||
builds - a Frame or Lepton update changed the driver's output - so the shader it fixes (for example Vader Immortal's
|
||||
lightspeed jump) may hang the GPU again. Capture the new modules with zink_shader_dump=1 (files/fp_spirv/ in the
|
||||
game's storage) and update the fix.
|
||||
suggest: [adapter.zink_shader_dump]
|
||||
- id: zink-shader-layer-inactive
|
||||
pattern: 'shader fix layer: NOT active'
|
||||
severity: warning
|
||||
diagnosis: FramePort's shader-fix Vulkan layer couldn't add itself to the game's Vulkan layers (Android's
|
||||
GraphicsEnv functions it uses were not found or behaved differently, for example after a Lepton update), so the game's
|
||||
OpenGL ES shader fixes (zink_shader_fix) don't apply.
|
||||
suggest: []
|
||||
- id: zink-device-lost
|
||||
pattern: 'zink.*DEVICE[_ ]LOST|VK_ERROR_DEVICE_LOST'
|
||||
severity: fatal
|
||||
diagnosis: The GPU hung (Zink/Mesa). For GLES Unity games MSAA render-to-texture is the usual cause.
|
||||
diagnosis: The GPU hung, so the game froze or closed. For GLES Unity games (Zink/Mesa) MSAA render-to-texture is the usual cause; at one effect only, a shader reading undefined loop counters (for example Vader Immortal's lightspeed jump, patch frame.zink_shader_fix).
|
||||
suggest: [frame.unity_no_msaa, frame.unity_runtime_msaa_off]
|
||||
- id: gpu-hang
|
||||
pattern: 'kernel: .*(?i:hangcheck|gpu fault|msm_drm.*(hang|recover)|kgsl.*(hang|fault)|adreno.*(hang|fault))'
|
||||
severity: fatal
|
||||
diagnosis: The Frame's GPU hung while the game ran (the kernel reset it; the game froze or closed). Usually one
|
||||
shader or effect the Frame's driver can't handle (for example Vader Immortal's lightspeed jump, a VR4 cutscene).
|
||||
FramePort can't fix that on its own; capture the game's shaders (the shader dump), play to the hang once more and
|
||||
send a problem report with diagnostics, so a shader fix can be added for this game.
|
||||
# triage keeps only the dump for the graphics API the session used (FrameBridge's swapchain formats)
|
||||
suggest: [adapter.vk_shader_dump, adapter.zink_shader_dump]
|
||||
report: true
|
||||
- id: space-warp-used
|
||||
pattern: 'xrCreateSwapchain \d+x\d+ format=(97|129) '
|
||||
unless: 'per-game: hide_space_warp=1'
|
||||
severity: info
|
||||
diagnosis: The game uses Meta's space warp (it renders half of its frames plus motion vectors, and the runtime makes
|
||||
up the rest). On the Frame that can make textures flicker, jump or smear while you move (for example Into The Radius 2,
|
||||
Metro Awakening). Turning it off makes the game render every frame itself.
|
||||
question: Did textures flicker, jump or smear while you moved?
|
||||
suggest: [adapter.hide_space_warp]
|
||||
- id: unity-runtime-msaa
|
||||
pattern: 'recommended MSAA level is [248]\. Switching to the recommended level'
|
||||
severity: info
|
||||
diagnosis: The game's OVRManager turns MSAA on at runtime (QualitySettings can't keep it off). On GLES this can
|
||||
hang the Frame's GPU or restart the headset; if it does, keep it off in the game's code.
|
||||
diagnosis: The game turns MSAA on at runtime, which can hang the Frame's GPU. Its OVRManager does this past QualitySettings; if the game hangs or the Frame restarts, keep it off in the game's code.
|
||||
suggest: [frame.unity_runtime_msaa_off]
|
||||
- id: runtime-input-crash
|
||||
pattern: 'vrclient\.so[^\n]*(UpdateActionStateInternal|sxr_xrSyncActions)'
|
||||
severity: fatal
|
||||
diagnosis: The Frame's runtime crashed in its controller-input code (xrSyncActions), typically right after the game
|
||||
got focus. sync_guard serialises input syncs and pauses them briefly after focus returns.
|
||||
diagnosis: The Frame's runtime crashed in its controller code, usually right after the game got focus. sync_guard runs input syncs (xrSyncActions) one at a time and pauses them briefly after focus returns.
|
||||
suggest: [adapter.sync_guard]
|
||||
- id: focus-dip-teleport
|
||||
pattern: 'OnVRPresence[^\n]*Teleport'
|
||||
severity: warning
|
||||
diagnosis: The game moves the player when the headset reports presence again, which the Frame's brief focus dips
|
||||
trigger (the view jumps). focus_hold hides dips under 600 ms.
|
||||
diagnosis: The view jumps because the game moves the player after the Frame's brief focus dips. The game reacts to the headset reporting presence again; focus_hold hides short dips.
|
||||
suggest: [adapter.focus_hold]
|
||||
- id: unity-vr-device-none
|
||||
pattern: 'NewtonVR.*(not setup properly|no headset found)|Loaded VR device: None|XR: Oculus could not be loaded'
|
||||
severity: fatal
|
||||
diagnosis: Unity didn't start its Oculus VR device (older Unity checks for Meta's system apps first), so the game
|
||||
runs as a hidden 2D app.
|
||||
diagnosis: Unity didn't start VR, so the game runs as a hidden 2D app. Older Unity checks for Meta's system apps before it starts its Oculus VR device.
|
||||
suggest: [frame.unity_oculus_check]
|
||||
- id: unity-frame-not-begun
|
||||
pattern: 'frame loop shim: frame \d+: the last waited frame wasn.t begun'
|
||||
severity: info
|
||||
diagnosis: Unity skipped beginning a frame (typically while it activates a scene); FramePort's frame wait didn't
|
||||
wait for that frame instead of blocking the game. A few at each scene load are normal.
|
||||
diagnosis: Unity skipped beginning a frame, and FramePort's frame wait moved on instead of blocking the game. This happens while a scene loads; a few at each scene load are normal.
|
||||
suggest: []
|
||||
- id: sdl-no-clipboard
|
||||
pattern: 'ClipboardManager\.addPrimaryClipChangedListener|SDLClipboardHandler\.<init>'
|
||||
severity: fatal
|
||||
diagnosis: An SDL app (SDL2 / LÖVE) crashed at start because Lepton's Android has no clipboard service.
|
||||
diagnosis: The app crashed at start because the Frame's Android has no clipboard. SDL apps (SDL2 / LÖVE) need Android's clipboard service, which Lepton lacks.
|
||||
suggest: [frame.sdl_clipboard]
|
||||
- id: controller-profile-rejected
|
||||
pattern: 'PATH_UNSUPPORTED.*xrSuggestInteractionProfileBindings|xrSuggestInteractionProfileBindings.*(-48|PATH_UNSUPPORTED)'
|
||||
severity: info
|
||||
diagnosis: The runtime rejected controller bindings for a profile it doesn't know (Meta's Touch Plus/Pro). Usually
|
||||
harmless (Meta's OVRPlugin suggests plain Touch too); a game that suggests only these gets them again as Touch
|
||||
(profile_remap, on by default; log "controller profile ... -> oculus/touch_controller").
|
||||
diagnosis: 'Usually harmless: the runtime rejected bindings for controllers it doesn''t know (Meta''s Touch Plus/Pro). OVRPlugin games suggest plain Touch too; a game that suggests only these gets them again as Touch (profile_remap, on by default; log "controller profile ... -> oculus/touch_controller").'
|
||||
suggest: []
|
||||
- id: input-call-failed
|
||||
pattern: 'input_diag: unsupported: (xrStringToPath|xrCreateAction|xrAttachSessionActionSets|xrSyncActions) ->'
|
||||
severity: warning
|
||||
diagnosis: The runtime refused one of the game's controller-input calls (logged by input_diag; the line names the
|
||||
call, the result and the argument), so controls set up through it don't work.
|
||||
diagnosis: 'Some controls may not work: the runtime refused one of the game''s controller-input calls. input_diag logged it; the line names the call, the result and the argument.'
|
||||
suggest: []
|
||||
- id: gl-shader-failed
|
||||
pattern: 'GLShim\s*: SHADER COMPILE FAILED|#extension directive is not allowed in the middle|could not implicitly convert operands'
|
||||
severity: error
|
||||
diagnosis: Shaders written for Quest drivers fail on Mesa (GLSL strictness).
|
||||
diagnosis: The game's shaders don't compile on the Frame, so parts of the picture are missing. Shaders written for Quest drivers fail on Mesa's stricter GLSL.
|
||||
suggest: [frame.gl_shim]
|
||||
- id: gl-multiview-twin-failed
|
||||
pattern: 'GLMV\s*: twin of program \d+(: stage| failed)'
|
||||
severity: warning
|
||||
diagnosis: The multiview interposer (frame.gl_multiview_fbo) couldn't build a single-view copy of one of the
|
||||
game's shader programs (the line has the compiler's message); draws of that program into flat panels (HUD,
|
||||
menus) still stay black. Please report it with the log; turning the patch off changes nothing else.
|
||||
suggest: []
|
||||
- id: vrapi-unsupported-layer
|
||||
pattern: 'OVRPortVrApi.*Unsupported VrApi layer type (\d+)'
|
||||
severity: error
|
||||
diagnosis: The game submits a VrApi layer type the bridge can't show; whole frames are dropped (black screen).
|
||||
diagnosis: The screen stays black because the game submits a layer the VrApi bridge can't show. Whole frames with that VrApi layer type are dropped.
|
||||
suggest: []
|
||||
- id: graphics-requirements-missing
|
||||
pattern: '(XR_ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING|Failed to create XR session: -50\b|xrCreateSession[^\n]*-50\b)'
|
||||
severity: fatal
|
||||
diagnosis: The game creates its OpenXR session without asking for the graphics requirements first; Meta's runtime
|
||||
allows that, the Frame's doesn't (e.g. Lambda1VR). Current FrameBridge builds ask on the game's behalf and retry -
|
||||
rebuild the game.
|
||||
diagnosis: The game can't start VR on the Frame; rebuild it with the current FramePort. It creates its OpenXR session without asking for the graphics requirements first, which Meta's runtime allows and the Frame's doesn't (for example Lambda1VR); current FrameBridge builds ask on the game's behalf and retry.
|
||||
suggest: [frame.adapter]
|
||||
supersedes: [native-crash]
|
||||
- id: avatar-driver-missing
|
||||
pattern: 'OVRAvatar-Loader: DisplayErrorAndExit'
|
||||
severity: fatal
|
||||
diagnosis: Meta's avatar library can't find its driver (it needs Meta's Horizon app) and stops the game (e.g.
|
||||
BlazeRush). Replace it with a do-nothing library; the game runs without Meta avatars.
|
||||
diagnosis: Meta's avatar library stopped the game because it needs Meta's Horizon app. A do-nothing stand-in lets the game run without Meta avatars (for example BlazeRush).
|
||||
suggest: [frame.avatar_stub]
|
||||
supersedes: [native-crash, java-crash]
|
||||
- id: vrapi-symbol-missing
|
||||
pattern: 'cannot locate symbol "vrapi_\w+"'
|
||||
severity: fatal
|
||||
diagnosis: The game needs a VrApi function its libvrapi.so doesn't have (e.g. BlazeRush before the bridge gained
|
||||
vrapi_PollEvent). Rebuild with the current FramePort; if it persists, report the function name.
|
||||
diagnosis: The game needs a VrApi function the VrApi bridge doesn't have. Rebuild with the current FramePort; if it persists, report the function name (for example BlazeRush before the bridge gained vrapi_PollEvent).
|
||||
suggest: []
|
||||
supersedes: [native-crash, java-crash, dlopen-failed]
|
||||
- id: vrapi-before-init
|
||||
pattern: 'VrApiLoader: vrapi_\w+ was called before vrapi_Initialize'
|
||||
severity: fatal
|
||||
diagnosis: Meta's VrApi loader stopped the game. Its OVRPlugin runs on OpenXR but still calls a VrApi function
|
||||
without starting VrApi (e.g. Jurassic World Aftermath); the VrApi bridge can't stand in for this loader.
|
||||
diagnosis: Meta's VrApi loader stopped the game. Its OVRPlugin runs on OpenXR but still calls a VrApi function without starting VrApi (for example Jurassic World Aftermath); the VrApi bridge can't stand in for this loader.
|
||||
suggest: [frame.vrapi_stub]
|
||||
supersedes: [direct-vrapi, native-crash]
|
||||
- id: direct-vrapi
|
||||
pattern: '(?<!called before )vrapi_Initialize|VrApi.*not supported|libvrapi\.so.*(not found|failed)'
|
||||
severity: warning
|
||||
diagnosis: The engine talks to VrApi directly; it needs the VrApi bridge.
|
||||
diagnosis: The game uses Meta's VrApi directly and needs the VrApi bridge.
|
||||
suggest: [frame.vrapi_bridge]
|
||||
- id: passthrough-missing
|
||||
pattern: 'XR_FB_passthrough.*(not supported|UNSUPPORTED|missing)|XR_ERROR_EXTENSION_NOT_PRESENT.*passthrough'
|
||||
severity: error
|
||||
diagnosis: The game needs Meta passthrough; the adapter emulates it.
|
||||
diagnosis: The game needs Meta passthrough (the camera view), which the Frame lacks; the adapter emulates it.
|
||||
suggest: [adapter.passthrough_emul, patch_force_passthrough]
|
||||
- id: render-model-requested
|
||||
pattern: 'dropped unsupported extension XR_FB_render_model'
|
||||
severity: info
|
||||
diagnosis: The game asks the headset for its controller models (XR_FB_render_model), which the Frame lacks, so it
|
||||
shows its own (Quest) controllers or none. The adapter can serve the Steam Frame controllers instead.
|
||||
diagnosis: The game shows Quest controllers (or none) because the Frame doesn't provide controller models. It asks for them through XR_FB_render_model; the adapter can serve the Frame's own controller models instead.
|
||||
suggest: [adapter.controller_models]
|
||||
- id: controller-models-missing
|
||||
pattern: 'FrameBridge: controller models not found'
|
||||
severity: warning
|
||||
diagnosis: Steam Frame controller models are on, but the converted models aren't in the game's files dir (the
|
||||
agent found no Frame controller render models in SteamVR at install time; see the install log, or run the
|
||||
agent's controller_models command).
|
||||
diagnosis: Frame controller models are on, but the converted models are missing from the game's files. The agent found no Frame controller render models in SteamVR at install time; see the install log, or run the agent's controller_models command.
|
||||
suggest: []
|
||||
- id: scene-missing
|
||||
# not OVRPlugin's routine "Unavailable OpenXR extension: XR_FB_scene" (printed by every OVRPlugin game)
|
||||
pattern: '(?<!Unavailable OpenXR extension: )XR_FB_scene|XR_FB_spatial_entity.*(not supported|UNSUPPORTED)|xrQuerySpacesFB'
|
||||
severity: warning
|
||||
diagnosis: The game uses the Meta scene (room) API; enable the adapter's guardian-based room emulation.
|
||||
diagnosis: The game wants Meta's room data (scene API), which the Frame lacks. The adapter can emulate a room from the guardian bounds.
|
||||
suggest: [adapter.scene_emul]
|
||||
- id: time-conversion
|
||||
pattern: 'xrConvert(Timespec)?Time(ToTimespec)?Time(KHR)?.*(-12|FUNCTION_UNSUPPORTED)'
|
||||
severity: warning
|
||||
diagnosis: Runtime lacks timespec time conversion (emulated by the current adapter build).
|
||||
diagnosis: The Frame's runtime lacks timespec time conversion; the current adapter build emulates it.
|
||||
suggest: [frame.adapter]
|
||||
- id: unreal-vulkan-driver-crash
|
||||
pattern: '#00 pc [^\n]*/vulkan\.freedreno\.so[\s\S]{0,3000}?lib(Unreal|UE4)\.so'
|
||||
severity: fatal
|
||||
diagnosis: The Frame's Vulkan driver crashed on a call from Unreal. Unreal 5 passes things Quest's driver ignores - a depth resolve in a subpass without a depth attachment (fixed by the Vulkan shim), image barriers and image views for a missing image when it expects fragment density maps (foveation) from the headset (e.g. Metro Awakening).
|
||||
diagnosis: 'The Frame''s Vulkan driver crashed on a call from Unreal. Unreal 5 passes things Quest''s driver ignores: a depth resolve in a subpass without a depth attachment (handled by the Vulkan shim), and image barriers and views for a missing image when it expects fragment density maps (foveation) from the headset (for example Metro Awakening).'
|
||||
suggest: [frame.vk_sanitize, adapter.vk_spec_fixes, adapter.vk_hide_fdm]
|
||||
supersedes: [native-crash]
|
||||
- id: unreal-fdm-missing
|
||||
pattern: 'vk shim: left out \d+ image barrier\(s\) without an image \(first: layout \d+ -> 1000218000'
|
||||
unless: 'vk shim: fragment density map extensions hidden'
|
||||
severity: warning
|
||||
diagnosis: Unreal expects fragment density maps (foveation) from the headset, which the Frame doesn't provide; its image views for them crash the Frame's driver a few seconds later (e.g. Metro Awakening).
|
||||
diagnosis: 'The game will likely crash a few seconds in: Unreal expects foveation data the Frame doesn''t provide. Its image views for the missing fragment density maps crash the Frame''s driver (for example Metro Awakening).'
|
||||
suggest: [adapter.vk_hide_fdm]
|
||||
- id: fossilize-renderpass
|
||||
pattern: '#0\d pc [^\n]*libVkLayer_fossilize\.so[\s\S]{0,4000}?FVulkanRenderPass::FVulkanRenderPass'
|
||||
severity: fatal
|
||||
diagnosis: Lepton's Fossilize layer crashed while recording a render pass (the engine leaves an attachment reference's pNext uninitialized).
|
||||
diagnosis: A Vulkan layer in Lepton (Fossilize) crashed while the game set up its graphics. The engine leaves an attachment reference's pNext uninitialized, and Fossilize follows it while recording a render pass.
|
||||
suggest: [frame.vk_sanitize]
|
||||
supersedes: [native-crash]
|
||||
- id: equirect-layers-dropped
|
||||
pattern: 'new layer: type=100009100\d [^\n]*usable=0|new layer: type=1000018000 [^\n]*usable=0'
|
||||
severity: warning
|
||||
diagnosis: The game shows 360° (equirect) layers, e.g. a video player's theatre or 360° videos, which the Frame's
|
||||
runtime can't composite, so they are missing. GLES games can get them back as panels around the player.
|
||||
diagnosis: The game's 360° pictures (for example a video player's theater or 360° videos) are missing because the Frame's runtime can't show equirect layers. GLES games can get them back through the adapter.
|
||||
suggest: [adapter.equirect_emul]
|
||||
- id: equirect-emul-disabled
|
||||
pattern: 'equirect_emul: (disabled|drawing failed|not a GLES session)'
|
||||
severity: warning
|
||||
diagnosis: The 360° layer emulation switched itself off for this session (no shared GLES context, or drawing
|
||||
failed); the 360° layers are dropped as without it. See the lines before it in the log.
|
||||
diagnosis: The 360° layer emulation switched itself off for this session, so 360° pictures are missing. No shared GLES context, or drawing failed; see the lines before it in the log.
|
||||
suggest: []
|
||||
- id: swapchain-size-abort
|
||||
pattern: '#01 pc [^\n]*libopenxr_loader\.so \(xrCreateSwapchain\+|Wrong createInfo size'
|
||||
severity: fatal
|
||||
diagnosis: overport's OpenXR dispatcher aborted on a swapchain larger than 4096 px (video players, big textures).
|
||||
diagnosis: The game crashed creating a very large image (over 4096 px, for example in video players). OVRPort's OpenXR dispatcher aborts on such swapchains.
|
||||
suggest: [frame.swapchain_limit]
|
||||
supersedes: [native-crash]
|
||||
- id: ovr-microphone-crash
|
||||
pattern: 'ovr_Microphone_GetOutputBufferMaxSize\+'
|
||||
severity: fatal
|
||||
diagnosis: The game asked OVRPort's Meta platform library for the microphone buffer size before starting the
|
||||
microphone, and the library read the not-yet-opened audio stream (SIGSEGV in libaaudio.so, e.g. Unreal's Oculus
|
||||
voice chat a few seconds after the logo).
|
||||
diagnosis: The game crashed while setting up the microphone (for example Unreal's Oculus voice chat a few seconds after the logo). It asks OVRPort's Meta platform library for the microphone buffer size before starting the microphone, and the library reads the not-yet-opened audio stream (SIGSEGV in libaaudio.so).
|
||||
suggest: [frame.ovr_microphone]
|
||||
supersedes: [native-crash]
|
||||
- id: slz-vulkan-hook-crash
|
||||
pattern: 'SLZ Graphics plugin loading![\s\S]{0,20000}?E CRASH : .*pc 0000000000000000'
|
||||
severity: fatal
|
||||
diagnosis: Stress Level Zero's graphics plugin (libSLZQuestNative.so) hooks Unity's Vulkan start-up and calls an invalid function there on the Frame (e.g. BONELAB 1.2974); the game crashes or hangs before its first frame.
|
||||
diagnosis: The game's own graphics plugin crashes or hangs it before the first frame (for example BONELAB 1.2974). Stress Level Zero's plugin (libSLZQuestNative.so) hooks Unity's Vulkan start-up and calls an invalid function there on the Frame.
|
||||
suggest: [frame.slz_vulkan_hooks]
|
||||
supersedes: [java-crash, native-crash]
|
||||
- id: vivox-api31
|
||||
pattern: 'NoSuchMethodError: No virtual method \w*CommunicationDevice\w*\(.*Landroid/media/AudioManager'
|
||||
severity: fatal
|
||||
diagnosis: The game's Vivox voice-chat SDK calls Android 12 audio-routing methods (AudioManager communication devices) without checking the Android version; Lepton runs Android 11, so the app crashes (for example Green Hell VR). The patch makes Vivox's audio-route check return early (voice chat keeps the default route).
|
||||
suggest: [frame.vivox_audio_route]
|
||||
supersedes: [java-crash]
|
||||
- id: native-crash
|
||||
pattern: 'Fatal signal (\d+) \(SIG[A-Z]+\)'
|
||||
severity: fatal
|
||||
diagnosis: Native crash. See the backtrace (#00 pc ...) for the library.
|
||||
diagnosis: The game crashed. The backtrace (#00 pc ...) names the library.
|
||||
suggest: []
|
||||
- id: java-crash
|
||||
pattern: 'FATAL EXCEPTION'
|
||||
severity: fatal
|
||||
diagnosis: Java crash. See "Caused by".
|
||||
diagnosis: The game's Java code crashed. See "Caused by" in the log.
|
||||
suggest: []
|
||||
- id: dlopen-failed
|
||||
pattern: 'dlopen failed: (.*)'
|
||||
severity: info
|
||||
diagnosis: A native library failed to load. Usually an optional probe (libOVRMrcLib, libovraudio32, …); it only
|
||||
matters when a crash or UnsatisfiedLinkError abort follows.
|
||||
diagnosis: 'Usually harmless: a native library failed to load. Often an optional probe (libOVRMrcLib, libovraudio32, …); it only matters when a crash or UnsatisfiedLinkError follows.'
|
||||
suggest: []
|
||||
- id: keyring-quota
|
||||
pattern: 'create keyring .*Disk quota exceeded'
|
||||
severity: fatal
|
||||
diagnosis: The Frame ran out of kernel keys (rootless podman leaks one session keyring per container start). The
|
||||
FramePort agent sets keyring=false in ~/.config/containers/containers.conf; reboot the Frame to free the leaked keys.
|
||||
diagnosis: 'Games can''t start until the Frame restarts: it ran out of kernel keys. Rootless podman leaks one session keyring per container start; the FramePort agent sets keyring=false in ~/.config/containers/containers.conf, and a reboot frees the leaked keys.'
|
||||
suggest: []
|
||||
- id: container-not-started
|
||||
pattern: "is not a running context|OCI runtime error"
|
||||
unless: 'Boot complete!' # Lepton 3.x prints the error while its container is still starting, then boots fine
|
||||
severity: fatal
|
||||
diagnosis: The Lepton container failed to start (see the error above it in launch.log).
|
||||
diagnosis: The game's Android container (Lepton) failed to start. See the error above it in launch.log.
|
||||
suggest: []
|
||||
- id: unity-data-missing
|
||||
pattern: 'Unable to open archive file|is corrupted! Remove it and launch unity again|Failed to read data for the AssetBundle'
|
||||
severity: fatal
|
||||
diagnosis: The game can't read its own data files (OBB/data folder) - they are incomplete or from another version of the game than the APK. Copy the whole data folder again from the same install as the APK, add the game again and reinstall.
|
||||
suggest: []
|
||||
- id: permission-denied-save
|
||||
pattern: 'Permission denied.*(Android/data|/sdcard)|EACCES.*Android/data'
|
||||
severity: warning
|
||||
diagnosis: The game created folders it can't write (saves break). The FramePort launcher repairs permissions every 2 s.
|
||||
diagnosis: The game can't write some of its folders, so saves may break. The FramePort launcher repairs permissions every 2 s.
|
||||
suggest: []
|
||||
# ---- PC VR (Oculus Rift games under Revive; on the Frame under Proton). kind: pcvr = only for those logs
|
||||
- id: proton-missing-runtime
|
||||
kind: pcvr
|
||||
pattern: 'needs Steam app \d+ \(runtime\)|_v2-entry-point: (No such file|not found)'
|
||||
severity: fatal
|
||||
diagnosis: The Steam Linux Runtime that Proton needs isn't installed on the Frame.
|
||||
diagnosis: Proton can't start because the Steam Linux Runtime it needs isn't installed on the Frame.
|
||||
suggest: []
|
||||
- id: revive-inject-failed
|
||||
kind: pcvr
|
||||
pattern: 'Failed to create process'
|
||||
severity: fatal
|
||||
diagnosis: Revive's injector could not start the game (wrong exe path, or a 32-bit/64-bit mismatch).
|
||||
diagnosis: 'Revive couldn''t start the game: wrong exe path, or a 32-bit/64-bit mismatch.'
|
||||
suggest: []
|
||||
- id: oculus-hmd-event
|
||||
kind: pcvr
|
||||
pattern: 'FramePort oculushmd: could not (create the OculusHMDConnected event|start the command)'
|
||||
severity: error
|
||||
diagnosis: FramePort's Oculus detection helper couldn't provide the OculusHMDConnected event (or couldn't start the game). Unreal's Oculus plugin then skips VR silently and the game runs as a flat window.
|
||||
diagnosis: The game runs as a flat window because FramePort's Oculus detection helper failed. It couldn't provide the OculusHMDConnected event (or couldn't start the game), so Unreal's Oculus plugin skips VR silently.
|
||||
suggest: [pcvr.oculus_unreal, pcvr.proton_log]
|
||||
- id: openxr-no-runtime
|
||||
kind: pcvr
|
||||
# (not the loader's 'xrCreateInstance failed': Proton's own OpenXR probe fails once and retries on the Frame)
|
||||
pattern: 'XR_ERROR_RUNTIME_(UNAVAILABLE|FAILURE)|No OpenXR runtime|OpenXR runtime (is )?not (found|available)|failed to (create|initialize) (the )?OpenXR'
|
||||
severity: fatal
|
||||
diagnosis: No OpenXR runtime reached the game. On a PC start SteamVR (or set it as the OpenXR runtime); on the Frame Proton couldn't bridge to the Frame runtime.
|
||||
diagnosis: No VR runtime reached the game. On a PC, start SteamVR (or set it as the OpenXR runtime); on the Frame, Proton couldn't bridge to the Frame's runtime.
|
||||
suggest: []
|
||||
- id: openxr-missing-ext
|
||||
kind: pcvr
|
||||
pattern: 'XR_ERROR_EXTENSION_NOT_PRESENT|XR_KHR_D3D11_enable.*(not|unsupported)'
|
||||
severity: fatal
|
||||
diagnosis: The OpenXR runtime lacks an extension Revive requires (XR_KHR_D3D11_enable / win32 time conversion).
|
||||
diagnosis: The VR runtime lacks a feature Revive needs (XR_KHR_D3D11_enable or win32 time conversion).
|
||||
suggest: [pcvr.xr_timefix, pcvr.revive_openvr]
|
||||
- id: openxr-api-version
|
||||
kind: pcvr
|
||||
pattern: 'LoaderInstance::CreateInstance chained CreateInstance call failed|XR_ERROR_API_VERSION_UNSUPPORTED|Unable to load LibOVRRT DLL'
|
||||
severity: fatal
|
||||
diagnosis: Proton's VR setup couldn't create an OpenXR instance (the Frame's SteamVR runtime only accepts OpenXR 1.0 apps; Proton asks for 1.1), so the game got no VR — a flat window, or Revive fails with "Unable to load LibOVRRT DLL".
|
||||
diagnosis: The game got no VR, so it runs as a flat window or Revive fails. Proton asks for OpenXR 1.1 but the Frame's SteamVR runtime only accepts 1.0 apps (Revive then reports "Unable to load LibOVRRT DLL").
|
||||
suggest: [pcvr.xr_timefix]
|
||||
- id: openxr-time-conversion
|
||||
kind: pcvr
|
||||
pattern: 'xrConvert(TimespecTimeToTime|TimeToTimespecTime)KHR failed|XR_KHR_convert_timespec_time not available'
|
||||
severity: error
|
||||
diagnosis: The OpenXR runtime refused time conversion, which Proton needs for Windows games' performance-counter times.
|
||||
diagnosis: The VR runtime refused a time conversion that Proton needs for Windows games' performance-counter times.
|
||||
suggest: [pcvr.xr_timefix]
|
||||
- id: delayload-missing
|
||||
kind: pcvr
|
||||
pattern: '[Ee]xception:? 0xc06d007e|code=c06d007e'
|
||||
severity: fatal
|
||||
diagnosis: A DLL the game loads on demand is missing (Windows delay-load error). For Oculus Store games this is usually LibOVRPlatform64_1.dll, the Oculus Platform SDK that the Oculus app installs for the licence check; FramePort doesn't replace it, so such games need the Oculus app (PC mode).
|
||||
diagnosis: A DLL the game needs is missing, so it closes at once. For Oculus Store games this is usually LibOVRPlatform64_1.dll, the Oculus Platform SDK that the Oculus app installs for the license check; FramePort doesn't replace it, so such games need the Oculus app (PC mode).
|
||||
suggest: []
|
||||
supersedes: [unreal-crash, wine-crash] # the crash is this missing DLL; don't send the user after other fixes
|
||||
- id: oculus-entitlement
|
||||
kind: pcvr
|
||||
pattern: '(?i)entitlement (check )?fail|ovr_PlatformInitialize.*(fail|error)|ovrPlatformInitialize_(NotEntitled|Uninitialized|PreLoaded|FileInvalid|SignatureInvalid|UnableToVerify)'
|
||||
severity: fatal
|
||||
diagnosis: The Oculus Platform SDK entitlement check failed. The game needs the Oculus app running with a license you own (PC mode only).
|
||||
diagnosis: The game's Oculus license check failed. It needs the Oculus app running with a license you own (PC mode only).
|
||||
suggest: []
|
||||
- id: vcruntime-missing
|
||||
kind: pcvr
|
||||
@@ -350,39 +391,56 @@ signatures:
|
||||
kind: pcvr
|
||||
pattern: 'DXVK: .*(DEVICE_LOST|Device lost)|VK_ERROR_DEVICE_LOST'
|
||||
severity: fatal
|
||||
diagnosis: The GPU driver lost the device while running the game (D3D through DXVK on freedreno).
|
||||
diagnosis: The GPU stopped responding while running the game (D3D through DXVK on freedreno).
|
||||
suggest: [pcvr.proton_log]
|
||||
- id: unreal-crash
|
||||
kind: pcvr
|
||||
pattern: 'CrashReportClient|UE4CC-Windows|UECC-Windows|Fatal error!|Unhandled Exception: EXCEPTION'
|
||||
severity: fatal
|
||||
diagnosis: The game crashed (Unreal's crash reporter started). See the game log and crash summary in the log. Common causes are that no VR runtime reached the game (Revive off) or a GPU or driver problem under Proton.
|
||||
diagnosis: The game crashed (Unreal's crash reporter started). Common causes are that no VR runtime reached the game (Revive off) or a GPU or driver problem under Proton; see the game log and crash summary in the log.
|
||||
suggest: [pcvr.revive, pcvr.proton_log, pcvr.no_crash_reporter]
|
||||
- id: unity-vr-init
|
||||
kind: pcvr
|
||||
pattern: '(?i)OpenVR failed initialization|VRInitError_(?!None\b)\w+|Initialization of device \w+ failed|Failed to (load|initialize|start) (VR|XR|OpenVR|Oculus)\b'
|
||||
severity: error
|
||||
diagnosis: The game's Unity log shows that a VR device failed to start. Unity games built for both the Oculus and the SteamVR (OpenVR) runtime choose one with an argument; without it they may try Oculus, which the Frame doesn't have, and run without VR or quit. Start the game with -vrmode OpenVR (Game arguments).
|
||||
suggest: [pcvr.launch_args]
|
||||
- id: unity-crash
|
||||
kind: pcvr
|
||||
pattern: 'Crash!!!|caused an Access Violation|caused an Unhandled Exception'
|
||||
severity: fatal
|
||||
diagnosis: The game crashed (Unity's crash handler wrote a report; the Unity log in the launch log shows the stack). Common causes are that no VR runtime reached the game or a GPU or driver problem under Proton.
|
||||
suggest: [pcvr.proton_log]
|
||||
supersedes: [wine-crash]
|
||||
- id: wine-crash
|
||||
kind: pcvr
|
||||
pattern: 'Unhandled exception: page fault|wine: Unhandled|Backtrace:'
|
||||
severity: error
|
||||
diagnosis: The game crashed under Wine/Proton (set the Proton debug log and check steam-<appid>.log).
|
||||
diagnosis: The game crashed under Wine/Proton. Turn on the Proton debug log and check steam-<appid>.log.
|
||||
suggest: [pcvr.proton_log]
|
||||
|
||||
- id: save-folder-permission
|
||||
pattern: "(We don't have write permission to|UnauthorizedAccessException: Access to the path \"/(sdcard|storage/emulated/0)/Android/data/)"
|
||||
severity: error
|
||||
diagnosis: The game can't write to a folder it created in its storage (e.g. SUPERHOT's cloud/data, mode 1700, which
|
||||
makes it quit at start). FramePort's launcher (agent 41 or newer) gives such folders owner and group write
|
||||
permission before and during every launch; update the game on the Frame (reinstall) to get the new launcher.
|
||||
diagnosis: The game can't write to a folder it created, so it may quit at start (for example SUPERHOT's cloud/data, mode 1700). FramePort's launcher (agent 41 or newer) gives such folders owner and group write permission before and during every launch; reinstall the game to get the new launcher. A folder the game creates and checks in the same moment on its very first start can't be repaired in time, so start the game again.
|
||||
suggest: []
|
||||
- id: surface-swapchain-emulated
|
||||
pattern: 'surface_emul: emulated Android surface swapchain'
|
||||
severity: info
|
||||
diagnosis: The game plays a video on a panel through an Android Surface (XR_KHR_android_surface_swapchain), which the
|
||||
Frame's runtime refuses; FrameBridge emulates it (surface_emul) and copies each video frame into the panel.
|
||||
diagnosis: The game plays video on a panel through an Android Surface, which FrameBridge emulates. The Frame's runtime refuses XR_KHR_android_surface_swapchain; surface_emul copies each video frame into the panel.
|
||||
suggest: []
|
||||
- id: surface-swapchain-failed
|
||||
pattern: 'surface_emul: (setup failed|upload failed|EGL context failed|Vulkan upload path unavailable)'
|
||||
severity: warning
|
||||
diagnosis: FrameBridge couldn't emulate an Android video panel (XR_KHR_android_surface_swapchain); the panel stays
|
||||
empty, and a game waiting for its intro video may stay black (e.g. I Am Monkey's intro).
|
||||
diagnosis: A video panel stays empty, and a game waiting for its intro video may stay black (for example I Am Monkey's intro). FrameBridge couldn't emulate the Android video panel (XR_KHR_android_surface_swapchain).
|
||||
suggest: []
|
||||
- id: hw-video-decoder-busy
|
||||
pattern: 'Iris \S+ unavailable; keeping Android|Iris \S+ initialization failed \(-1[26]\); using software'
|
||||
severity: info
|
||||
diagnosis: FramePort's hardware video decoder (frame.hw_video_decode) couldn't open a session, because other
|
||||
decoder sessions held the hardware (Steam's own hardware video decoding, SteamVR's link while a game starts);
|
||||
the video was decoded in software instead, which is slow for 4K/8K. Turn off hardware video decoding in Steam's
|
||||
settings, restart Steam, then start the game again.
|
||||
suggest: []
|
||||
milestones: # progress markers, in order; the furthest one reached is reported
|
||||
- {id: pcvr-launch, kind: pcvr, pattern: 'FramePort: launching|Launched injector with', label: Launcher started}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
3. **Recipe** (`recommend/engine.py`): every patch's `detect()` suggests itself with a reason; a catalog entry (exact
|
||||
known-good recipe) overrides heuristics. The UI shows toggles; the user confirms.
|
||||
4. **Build** (`build.py`): overport CLI (OVRPort; defaults + extras) → apk-stage patches in `order` on an
|
||||
`ApkWorkspace` → apksigner (with the package's own keystore) → static validation. Optional alternate build (e.g.
|
||||
`ApkWorkspace` → apksigner (with the package's own keystore) → static validation. Optional alternate build (for example
|
||||
without Unreal ForceQuit).
|
||||
5. **Install** (`install/installer.py` + `agent/frameport_agent.py`): `prepare` (paths, what's already there) → SFTP
|
||||
uploads with resume → `finalize` (move into place, settings.conf/framebridge.conf, device files, launch.sh,
|
||||
@@ -33,7 +33,7 @@
|
||||
`triage.py` (milestones + signatures → suggested patches) → UI offers "apply suggestions and rebuild".
|
||||
|
||||
## Extending
|
||||
- **New fix**: `patches/frame/<name>.py` with a `Patch` subclass (`detect`, `apply`, optional `validate`), plus a
|
||||
- **New patch**: `patches/frame/<name>.py` with a `Patch` subclass (`detect`, `apply`, optional `validate`), plus a
|
||||
signature in `catalog/triage.yaml` and a PLAYBOOK row. Stages: `overport` | `apk` | `install`.
|
||||
- **Upstream fixed a bug we work around**: register an `UpstreamFix` (`patches/upstream.py`) in the workaround's
|
||||
module: a probe that finds the fix in OVRPort's output (True / False / None = can't tell). Each build runs the probes
|
||||
@@ -106,4 +106,4 @@ FramePort is a front end for other projects; most of the functionality comes fro
|
||||
| OculusDB, Steam store | Game descriptions, genres and artwork |
|
||||
|
||||
FramePort's own parts: game detection and recipes, the Steam Frame OpenXR adapter (FrameBridge) and the other native
|
||||
fixes in `native/`, the installer agent that runs on the Frame, and the desktop/command-line app.
|
||||
patches in `native/`, the installer agent that runs on the Frame, and the desktop/command-line app.
|
||||
+11
-20
@@ -1,30 +1,21 @@
|
||||
# Compatibility
|
||||
|
||||
The built-in catalog has tested settings for games, each marked as working, working with known issues, or not
|
||||
running on the Frame: see the [list of tested games](GAMES.md) (recipes in [catalog/games](../catalog/games)).
|
||||
Other games get suggested patches from detection rules; each suggestion states its reason, and every patch can be
|
||||
switched on or off under **Customize**: described in plain words, with **Show technical details** for the exact
|
||||
effect of each patch.
|
||||
FramePort's catalog has a tested recipe (the patches and settings that work) for many games, each marked as working,
|
||||
working with issues or not running: see the [list of tested games](GAMES.md). Other games get suggested patches,
|
||||
each with its reason. Every patch can be switched on or off under **Customize** on the game's page.
|
||||
|
||||
Tried an untested game? Its page asks how it runs; **Share working recipe…** opens a prefilled GitHub issue so your
|
||||
recipe can join the built-in catalog for everyone.
|
||||
Got a game working? [Share its recipe](INSTALL.md#share-a-recipe-or-report-a-problem).
|
||||
|
||||

|
||||
|
||||
| Kind of app | On the Steam Frame |
|
||||
| Kind of game | On the Steam Frame |
|
||||
|---|---|
|
||||
| Meta Quest games (APK) | Translated to OpenXR (OVRPort) and patched for the Frame; run in Valve's Android runtime (Lepton) |
|
||||
| Other Android VR apps using OpenXR (e.g. Pico builds) | Translated the same way; the other headset's own extensions and store services aren't available |
|
||||
| Ordinary Android apps and games (no VR) | Installed unchanged and shown as a flat window in the headset |
|
||||
| PC VR games (Windows; OpenXR, SteamVR or Oculus) | Run through Proton on the Frame (experimental), or on a Windows PC with SteamVR and streamed to the Frame; Oculus-only games use Revive |
|
||||
| Can't run | 32-bit-only or x86-only APKs, Pico/HTC Wave SDK apps, Android XR apps, and games that check an Oculus licence (they need the Oculus app on a PC) |
|
||||
| Quest games | Converted to OpenXR (the VR standard the Frame uses) by OVRPort and patched; they run in Lepton, Valve's Android runtime |
|
||||
| Other Android VR apps using OpenXR (for example Pico builds) | Converted the same way; the other headset's own features and store services aren't available |
|
||||
| Android apps without VR | Installed unchanged and shown as a window in the headset |
|
||||
| PC VR games | On the Frame through Proton (experimental), or on your PC and streamed to the Frame: see [PC VR games](INSTALL.md#pc-vr-games) |
|
||||
| Can't run | 32-bit-only or x86-only Android apps, apps for Pico's or HTC's own VR system, Android XR apps, and games that check their license through the Oculus app |
|
||||
|
||||
Automated launch tests confirm that a game starts; visuals can only be checked in the headset.
|
||||
Automatic launch tests show that a game starts; only the headset shows whether it looks right.
|
||||
|
||||

|
||||
|
||||
The **Files** tab manages files on the Frame: upload videos, documents, mods or saves from the computer (buttons or
|
||||
drag-and-drop), download, rename and delete (one entry or a selection), in the shared folders every game sees or in
|
||||
one game's own storage.
|
||||
|
||||

|
||||
+16
-6
@@ -1,14 +1,14 @@
|
||||
# Diagnostics bundles and shared recipes
|
||||
# Diagnostics and problem reports
|
||||
|
||||
Two ways users feed results back, both without a GitHub token:
|
||||
|
||||
- **Share working recipe** (game menu, `frameport share-recipe <pkg>`): saves the recipe as a user catalog entry and
|
||||
- **Share working recipe…** (game menu, `frameport share-recipe <pkg>`): saves the recipe as a user catalog entry and
|
||||
opens a prefilled issue from `.github/ISSUE_TEMPLATE/working-config.yml`. A maintainer checks it and adds the label
|
||||
`catalog-accepted`. Then `.github/workflows/catalog-from-issue.yml` runs `scripts/catalog_from_issue.py`, which reads
|
||||
only the YAML block, validates it, and writes `catalog/games/<pkg>.yaml`, and the workflow opens a PR.
|
||||
- The PR step needs Settings → Actions → "Allow GitHub Actions to create and approve pull requests".
|
||||
- Create the labels `working-config`, `catalog-accepted` and `bug` once.
|
||||
- **Report a problem / Collect logs** (game menu, Settings, the failure pop-up, `frameport diag report|collect`): writes
|
||||
- **Report a problem…** / **Collect logs** (game menu, Settings, the failure pop-up, `frameport diag report|collect`): writes
|
||||
a redacted zip and opens a prefilled `bug-report.yml` issue.
|
||||
- GitHub has no API for issue attachments, so the user drags the zip in (25 MB max; the bundle stays under 24 MB).
|
||||
- Prefilled links are capped at about 7.5k characters. Free text is trimmed first; the recipe is never cut.
|
||||
@@ -38,8 +38,18 @@ games/<pkg>/package/ stand-in for the game files (no content):
|
||||
games/<pkg>/target/ from the Frame (or the PC): launch.sh, settings.conf, deployment.json, launch.log,
|
||||
launch-test.log (PC VR), lepton-steamlaunch-<appid>.log, logcat-{main,crash,system,...}.log,
|
||||
ReviveInjector.txt / steam-<appid>.log / game-log-N.txt (PC VR), files.json (+ missing)
|
||||
(game-log-N.txt: Unreal Saved/Logs + crash summaries, Unity Player.log / Player-prev.log /
|
||||
output_log.txt + crash error.log from the Proton prefix, agent v67)
|
||||
games/<pkg>/target/shaders/ shader dumps (agent v72), when the game wrote any:
|
||||
fp_vk_shaders/ adapter vk_shader_dump=1 (Vulkan shim): <size>_<sha256>.spv + index.txt
|
||||
fp_spirv/ adapter zink_shader_dump=1 (OpenGL ES, shader-fix layer under Zink): <size>_<sha256>.spv
|
||||
```
|
||||
Each log keeps at most its last 4 MB (2 MB per file from the Frame).
|
||||
Each log keeps at most its last 4 MB (2 MB per file from the Frame). Shader dumps: the newest modules (by time
|
||||
written) up to 4 MB per folder, SPIR-V unchanged (compiled game shaders, not redacted); a module the game created
|
||||
for the first time right before a GPU hang is among them. `index.txt` (Vulkan) lists every vkCreateShaderModule as
|
||||
`<seq> <ms since the first module> <unix ms> <size>_<sha256>.spv new|known|again|failed`; match the unix time with
|
||||
the kernel's `hangcheck detected gpu lockup` line (this-boot-kernel.txt). All modules stay in the game's storage on
|
||||
the Frame (`Android/data/<pkg>/files/fp_vk_shaders/`, Files tab → the game's storage).
|
||||
|
||||
## Redaction
|
||||
`diag/redact.py` runs on every file and on the issue text.
|
||||
@@ -47,14 +57,14 @@ Each log keeps at most its last 4 MB (2 MB per file from the Frame).
|
||||
saved Frame addresses → `<host>`, Steam account ids from the Frame's `info` and the PC's Steam → `<steam-id>`, the
|
||||
folders holding the user's game dumps → `<source>`.
|
||||
- **Patterns:** IPv4 addresses (first octet ≥ 10, so version numbers survive), IPv6, MAC, SteamID64, `userdata/<id>`,
|
||||
e-mail addresses (file names like `x@123.txt` excluded), and any `/home/<u>`, `/Users/<u>`, `C:\Users\<u>` or
|
||||
email addresses (file names like `x@123.txt` excluded), and any `/home/<u>`, `/Users/<u>`, `C:\Users\<u>` or
|
||||
`/mnt/c/Users/<u>`.
|
||||
- **Kept:** generic accounts that identify no one: `steamos`, `steamuser` (Proton), `root`, `deck`.
|
||||
|
||||
## Debugging from a bundle (no game, no Frame, no GUI)
|
||||
1. `frameport diag inspect <zip>` (`--json` for everything). It prints the versions and warnings, the last launch
|
||||
test, and a fresh triage of the newest launch log with the current `catalog/triage.yaml`.
|
||||
2. Match the findings and log lines against `docs/PLAYBOOK.md` (symptom → fix) and `docs/FRAME_RUNTIME.md`.
|
||||
2. Match the findings and log lines against `docs/PLAYBOOK.md` (symptom → cause → fix) and `docs/FRAME_RUNTIME.md`.
|
||||
3. Check the analysis in `entry.json` (engine, XR API, `extra`: missing ovr symbols, features, Unreal version) and
|
||||
`package/elf.json` against the heuristics in CLAUDE.md. Compare `recipe.yaml` with catalog games that use the same
|
||||
engine and API.
|
||||
|
||||
+9
-13
@@ -1,9 +1,9 @@
|
||||
# FAQ
|
||||
|
||||
## How should I lay out a game that has OBB files (an APK plus a data folder)?
|
||||
## How should I lay out a game that has OBB files?
|
||||
|
||||
Give every game its own folder, put the APK in it, and put the game's data next to the APK in a folder named
|
||||
after the game's **package name** (the name the `.obb` files contain, e.g. `com.Armature.VR4`):
|
||||
Some Quest games come as an APK (the app file) plus `.obb` files (the game's data). Give every game its own folder,
|
||||
put the APK in it and put the data in a folder named after the game's **package name** (for example `com.Armature.VR4`):
|
||||
|
||||
```
|
||||
Games/ ← scan this folder (Add games → Scan a folder)
|
||||
@@ -16,16 +16,12 @@ Games/ ← scan this folder (Add games → Scan
|
||||
└── com.beatgames.beatsaber.apk ← games without OBBs: just the APK
|
||||
```
|
||||
|
||||
- **Data folder name:** the package name (`com.Armature.VR4` above), or `obb`. FramePort uses the first of the two
|
||||
that exists and isn't empty.
|
||||
- **Everything in that folder is copied** to the game's `Android/obb/<package>/` on the Frame, subfolders included.
|
||||
So games that ship raw data files instead of `.obb` files work the same way.
|
||||
- **One game per folder.** Several APKs in one folder count as one game; FramePort uses the first and keeps the others
|
||||
as alternates.
|
||||
- **Data folder name:** the package name (`com.Armature.VR4` above) or `obb`.
|
||||
- **Everything in that folder is copied** to the Steam Frame, subfolders included, so other data files work too.
|
||||
- **One game per folder.** Several APKs in one folder count as one game.
|
||||
- **Scanning:** pick the folder that contains the game folders (`Games/` above) to add them all, or one game's folder
|
||||
to add just that game. FramePort looks up to 5 levels deep.
|
||||
- **A single game:** Add games → Add an APK… works with a lone APK too. Its data is found when the data folder sits next
|
||||
to the APK, named as above.
|
||||
- **A single game:** **Add games → Add an APK…** also finds the data folder next to the APK.
|
||||
|
||||
Not sure of the package name? Look at the OBB file names: `main.<version>.<package name>.obb`. Or add the APK
|
||||
first: the game's page shows the package name under **Details**.
|
||||
Not sure of the package name? It's in the OBB file names (`main.<version>.<package name>.obb`), and the game's page
|
||||
shows it under **Details**.
|
||||
+30
-8
@@ -1,5 +1,20 @@
|
||||
# Steam Frame runtime reference (SteamOS 0.3.0, build 20260922)
|
||||
|
||||
## Setup from the project page (checked 2026-10-10, dev Frame, SteamOS build 20260922)
|
||||
|
||||
- Factory Frames have no browser; Steam's taskbar **+** offers Chromium as a Flatpak (`org.chromium.Chromium`,
|
||||
flathub is configured as a system remote). It is the default handler for https links once installed.
|
||||
- Desktop Mode has `curl`, `wget`, `python3` 3.12, `konsole`, `kdialog`, `xdg-open`, `avahi-browse`, `systemd-run`;
|
||||
no `wl-copy`/`xclip`.
|
||||
- avahi-daemon runs, but `avahi-browse` from an SSH session fails ("Daemon not running": no system D-Bus access
|
||||
there). A stdlib-Python mDNS query works when it listens on port 5353 in the 224.0.0.251 group (like avahi):
|
||||
replies to a random source port are dropped by the Frame's firewall. `bootstrap/setup.sh` does exactly that.
|
||||
- The Frame reaches the PC's port 8765 over the home Wi-Fi without any firewall change on the PC side here (WSL in
|
||||
mirrored mode with the earlier FramePort rule state). The PC is also visible through the Frame's hotspot
|
||||
(`wlanap`, 10.35.78.x): the script lists one PC once, by name and words.
|
||||
- Dolphin's "executable scripts" setting is the default (ask); `.sh` files open with a `bash.desktop` handler that
|
||||
runs them in a terminal. Not used by the setup (a pasted line is simpler and needs no download prompt).
|
||||
|
||||
## Lepton (Android container)
|
||||
- Steam app **3029110 "Lepton"** (runtime) and **3056000 "Lepton Development"** (needs Developer Mode). The binary
|
||||
is `<Steam library>/steamapps/common/Lepton/lepton`; FramePort finds it via the appmanifests.
|
||||
@@ -64,7 +79,7 @@
|
||||
submission order (seen 2026-10-01: quads placed before 4XVR's projection layer covered it).
|
||||
- Swapchain formats: GLES `GL_SRGB8_ALPHA8` (35907) / `GL_SRGB8` (35905) only, samples = 1. Vulkan: 43 (R8G8B8A8_SRGB)
|
||||
and 50, not 37/44 (UNORM).
|
||||
- Environment blend: ALPHA_BLEND available (greyscale passthrough cameras).
|
||||
- Environment blend: ALPHA_BLEND available (grayscale passthrough cameras).
|
||||
- Reference spaces: STAGE bounds are reported as 1×1 m.
|
||||
- Display 72 Hz by default in tests. Head pose is only tracked while the headset is worn; otherwise flags 0x3 and
|
||||
the session stays below FOCUSED.
|
||||
@@ -76,6 +91,13 @@
|
||||
`device.foveation`: `fixed` = `FDM_DEBUG=disable_offsets`, `off` = `VK_INSTANCE_LAYERS=""`. Lepton passes `FDM`,
|
||||
`FDM_DEBUG`, `FOVE_LEVEL` and `FDM_SWAPCHAIN_SIZE` through to the container (liblepton/mounting.sh PASSTHROUGH_VARS);
|
||||
the layers are chosen on the host, so setting them inside the game does nothing.
|
||||
- How Lepton loads them: `liblepton/vulkan_layers.sh` mounts the chosen layers (only those in the OS image's
|
||||
`/usr/share/guestos/android/vendor/vulkan_layers`) into the app's lib dir and writes their names to Android's
|
||||
`settings global gpu_debug_layers` for `gpu_debug_app` = the game; Android's loader reads that list from GraphicsEnv
|
||||
at each vkCreateInstance and searches the app's lib dir (`/data/app/…/lib/arm64`). A layer bundled in the APK is
|
||||
found there too; FramePort's shader-fix layer (`frame.zink_shader_fix`) adds its own name to GraphicsEnv's list from
|
||||
inside the process (`android::GraphicsEnv::setDebugLayers`, exported by the guest's libgraphicsenv.so, Lepton 3.0.5).
|
||||
That is the only way to reach the Vulkan side of OpenGL ES games (Zink creates the instance inside Mesa).
|
||||
- GL ES: Zink (Mesa GL on Vulkan). Strict GLSL (see PLAYBOOK) and occasional `DEVICE LOST` with MSAA render-to-texture.
|
||||
|
||||
## Proton / Windows games (surveyed 2026-09-29; running a Rift game under it not yet verified)
|
||||
@@ -92,7 +114,7 @@
|
||||
`/fex-compat-tool %verb% --`, **no** require_tool_appid: it does not use the Steam Linux Runtime. fex-compat-tool
|
||||
(Python) runs `<FEX-Emu>/usr/bin/FEX` with RootFS `/usr/share/guestos/fex-mesa` (part of the SteamOS image: an
|
||||
x86 Arch-style root with glibc 2.41, Mesa, graphics_provider.json for x86_64 + i386), emulates x86_64 and i386
|
||||
(emulator.json), honours `STEAM_FEX_TSOENABLED`, `STEAM_FEX_MULTIBLOCK`, `STEAM_COMPAT_FEX_CONFIG`, sets
|
||||
(emulator.json), honors `STEAM_FEX_TSOENABLED`, `STEAM_FEX_MULTIBLOCK`, `STEAM_COMPAT_FEX_CONFIG`, sets
|
||||
`tu_override_uncached_as_cache_coherent=true` and logs to `/tmp/fex-compat-tool-<pid>.log`. It **exits 1 ("No compat
|
||||
data path?") without `STEAM_COMPAT_DATA_PATH`** (keeps Config.json/AppConfig/Server/Telemetry in `<it>/fex-emu/`):
|
||||
the Linux launcher exports `<base>/compatdata`. Version seen: FEX-2607-76-g37265b1. ldd can't read x86 programs,
|
||||
@@ -120,7 +142,7 @@
|
||||
create as 1.0; enabled by `XR_ENABLE_API_LAYERS` from launch.sh. Proton's Steam Linux Runtime container drops
|
||||
`XR_API_LAYER_PATH` (it keeps `XR_ENABLE_API_LAYERS`), so the agent registers the layer as an explicit layer in
|
||||
`~/.local/share/openxr/1/api_layers/explicit.d/` (home is shared into the container) with an absolute library path.
|
||||
- Oculus Store builds that delay-load `LibOVRPlatform64_1.dll` (Platform SDK, e.g. Lies Beneath) crash with
|
||||
- Oculus Store builds that delay-load `LibOVRPlatform64_1.dll` (Platform SDK, for example Lies Beneath) crash with
|
||||
`0xc06d007e` (delay-load module not found): that DLL comes with the Oculus app, which the Frame doesn't have. (No Oculus runtime DLLs or
|
||||
registry keys are needed: Revive's LibOVRRT hook works once OpenXR does.)
|
||||
- Unreal's Oculus plugin (and LibOVR's `ovr_Detect`) first checks for the Windows event `OculusHMDConnected` (created
|
||||
@@ -162,11 +184,11 @@
|
||||
writes it to a v4l2loopback webcam named **"SteamVR"** (`/dev/video99`, 1920x1080 RGB24, advertised 30 fps, frames
|
||||
arrive at the display rate). Nothing on the Frame reads it by default; idle it costs nothing, read ~0.2 core.
|
||||
It shows what the wearer sees (SteamVR home, Steam's panels; a game's layers are expected but not yet seen in it).
|
||||
Black and ~1 fps (one frame per ~1.0 s) while the headset sleeps (standby): a 30 fps stream then repeats each
|
||||
Black and ~1 fps (one frame per ~1.0 s) while the Frame sleeps (standby): a 30 fps stream then repeats each
|
||||
frame in bursts, which looks like a stall in a player. Its size follows SteamVR's headset view (v4l2cam has no size
|
||||
option), so the live view only scales down (360p/480p/720p/1080p) or sends it as is ("full").
|
||||
- Sound: `pactl get-default-sink` (`alsa_loopback_device.stereo.alsa_output.platform-sound.HiFi__Speaker__sink`) and its
|
||||
`.monitor` source carry what the headset plays; the Frame's ffmpeg has the `pulse` input and `aac`. Timestamps: pulse
|
||||
`.monitor` source carry what the Frame plays; the Frame's ffmpeg has the `pulse` input and `aac`. Timestamps: pulse
|
||||
uses the wall clock, v4l2 CLOCK_MONOTONIC → `-ts mono2abs` on the v4l2 input. Don't force
|
||||
`-use_wallclock_as_timestamps` on the pulse input: it stamped bursts of AAC packets with one time.
|
||||
- Steam's own game recording / Remote Play / broadcast capture the **gamescope** PipeWire node (`CDesktopCapturePipeWire:
|
||||
@@ -193,11 +215,11 @@
|
||||
Baseline..Constrained High, levels up to 6.0.
|
||||
- The `steamos` user can open it (group video).
|
||||
- The panel's current refresh rate can be read without privileges through DRM: `/dev/dri/card0` is mode 0666, and
|
||||
GETCRTC reports e.g. `2*2160x2160_96` (clock 1402720 kHz / 4448 × 3285 = 96 Hz) even while the headset sleeps.
|
||||
GETCRTC reports for example `2*2160x2160_96` (clock 1402720 kHz / 4448 × 3285 = 96 Hz) even while the Frame sleeps.
|
||||
The panel offers 72/80/90/96/108/120/144 Hz.
|
||||
- `/dev/video99` (v4l2loopback) has `max_buffers=2`: a reader asking for more gets 2.
|
||||
- Mid-stream keyframe requests (FORCE_KEY_FRAME) take effect on the next frame, and the GOP restarts from there.
|
||||
- Measured 2026-10-07 with the headset asleep (still picture):
|
||||
- Measured 2026-10-07 with the Frame asleep (still picture):
|
||||
- `fp_venc` alone at 32/36 fps: 1% of a core at 1080p, 2.5% at 720p.
|
||||
- Live view end to end: `fp_venc` 2.6% + ffmpeg 8.4% (AAC encoding + muxing).
|
||||
- Conversion cost per new picture (self-test, NEON, 2026-10-07):
|
||||
@@ -258,7 +280,7 @@ All readable by the steamos user without root; the agent reads them directly (no
|
||||
| Power | hwmon `max34417_*` `power{1-4}_{label,input}` (µW) | `vph` = whole system (~3.6 W idle), `gfx` = GPU, `apc0/1/2` = CPU clusters, `nsp1/2` = NPU; each read is an I2C transfer (~0.7 ms wall), so only these are read |
|
||||
| Battery | `power_supply/max1720x_bat_7-36` | `current_now` (µA, negative = draining) × `voltage_now` (µV) = watts; `time_to_empty_now`/`time_to_full_now` (s), `cycle_count`, `health`, `temp` (0.1 °C) |
|
||||
| Game fps | `<base>/launch.log` lines `FrameBridge: pacing: N fps …` (every ~5 s) | Quest games only; SteamVR writes PC VR frame stats only as an end-of-session summary in `vrcompositor.txt` |
|
||||
| Game container | conmon `-n lepton-steamlaunch-<appid>`; its child's `/proc/<pid>/cgroup` → `cpu.stat`, `memory.current` | The container's ~90 Android processes show as uid 1000 on the host and can be signalled (4XVR, 2026-10-07); Android names them after the package's last 15 characters (`lus4xvrplayerov`), the full name is in `cmdline` |
|
||||
| Game container | conmon `-n lepton-steamlaunch-<appid>`; its child's `/proc/<pid>/cgroup` → `cpu.stat`, `memory.current` | The container's ~90 Android processes show as uid 1000 on the host and can be signaled (4XVR, 2026-10-07); Android names them after the package's last 15 characters (`lus4xvrplayerov`), the full name is in `cmdline` |
|
||||
|
||||
Cost: a naive sample (fds of ~520 processes scanned) took 43 ms CPU. With kernel threads skipped after their first
|
||||
sighting, command lines checked once per process, render fds cached (rescanned every 60 s, every 4 s for busy young
|
||||
|
||||
+43
-31
@@ -1,53 +1,65 @@
|
||||
# Frame setup: what changes, networks, undoing it
|
||||
# What the setup changes
|
||||
|
||||
For the steps themselves see [INSTALL.md](INSTALL.md#connecting-the-steam-frame).
|
||||
For the setup steps see [Install and first steps](INSTALL.md#connecting-the-steam-frame). This page lists what the
|
||||
setup changes on the Steam Frame, how to undo it and what your network needs.
|
||||
|
||||
## What the setup changes
|
||||
## Changes on the Frame
|
||||
|
||||
The setup command runs [`bootstrap/bootstrap.sh`](../bootstrap/bootstrap.sh), served by the app over your
|
||||
local network. Everything it changes:
|
||||
The setup runs [`bootstrap/bootstrap.sh`](../bootstrap/bootstrap.sh), which FramePort sends from your PC. It changes:
|
||||
|
||||
| Change | Where | How to undo |
|
||||
|---|---|---|
|
||||
| Turns on **Developer Mode** (only if it's off). Steam restarts once, which closes Desktop Mode; the rest of the setup finishes on its own as a user service (log: `~/.cache/frameport-setup.log`). | `"DevModeEnabled" "1"` in `~/.local/share/Steam/config/config.vdf` (old file kept as `config.vdf.before-frameport`), then Valve's own `steamos-polkit-helpers/steamos-devkit-mode --enable`. That helper enables the SSH server (`sshd`), the devkit service that makes the Frame findable on the network, the remote-desktop and debug services, and system crash dumps. | Settings → System → Developer → Developer Mode off. Valve's helper switches all of those services off again. |
|
||||
| Lets the app's SSH key in. | One line ending in `frameport` in `~/.ssh/authorized_keys`. The folder and file are created if missing. | Delete that line. |
|
||||
| Configures podman for Lepton. Rootless podman leaks one kernel keyring per container start, and after about 200 game starts every game fails. | `[containers]` / `keyring = false` in `~/.config/containers/containers.conf`. | Remove those lines. |
|
||||
| Asks Steam to install **Lepton** (Valve's Android runtime, Steam app 3029110) if it's missing. You confirm it in Steam. | Steam library | Uninstall it in Steam. |
|
||||
| Turns on **Developer Mode** if it's off. Steam restarts once, which closes the desktop; the rest finishes on its own (log: `~/.cache/frameport-setup.log`). | `"DevModeEnabled" "1"` in `~/.local/share/Steam/config/config.vdf` (old copy kept as `config.vdf.before-frameport`), then Valve's own Developer Mode helper. | Settings → System → **Enable Developer Mode** off. |
|
||||
| Lets FramePort log in. | One line ending in `frameport` in `~/.ssh/authorized_keys`. | Delete that line. |
|
||||
| Stops game starts from failing after about 200 launches (a limit in podman, the tool Lepton runs games with). | `[containers]` / `keyring = false` in `~/.config/containers/containers.conf`. | Remove those lines. |
|
||||
| Asks Steam to install **Lepton** (Valve's Android runtime) if it's missing. You confirm it in Steam. | Steam library | Uninstall it in Steam. |
|
||||
|
||||
The script runs as your user: no root, no `sudo`, no password. The only system-level change, Developer Mode, is
|
||||
made by Valve's own helper, the same one the Settings switch uses. If Developer Mode can't be turned on
|
||||
automatically, the script asks you to turn it on in Settings → System → Developer and run the command again.
|
||||
Valve's Developer Mode helper is the same one the Settings switch uses. It turns on remote login (SSH), the service
|
||||
that makes the Frame findable on your network, remote desktop, debugging and crash dumps; turning Developer Mode off
|
||||
turns them all off again.
|
||||
|
||||
Nothing else on the system is touched: no packages, no read-only-filesystem changes, no polkit rules. The script
|
||||
also leaves two files: `~/.cache/frameport-setup.sh` (the part that runs on its own) and its log.
|
||||
The script runs as your user: no root, no `sudo`, no password. Nothing else on the system changes. It also leaves two
|
||||
files: `~/.cache/frameport-setup.sh` (the part that finishes on its own) and its log.
|
||||
|
||||
**Later, the app adds** (all as your user, no root, no `sudo`):
|
||||
- FramePort's helper in `~/.local/share/frameport/`;
|
||||
If Developer Mode can't be turned on automatically, the script asks you to turn it on in Settings → System →
|
||||
**Enable Developer Mode** and run the setup line again.
|
||||
|
||||
**Later, FramePort adds** (as your user):
|
||||
- its helper in `~/.local/share/frameport/`;
|
||||
- the games, each with a launcher and its data in `~/Applications/quest-frame/<package>/`;
|
||||
- their Steam library entries and artwork (`shortcuts.vdf` + `config/grid/`);
|
||||
- for PC VR games: an OpenXR layer (`~/.local/share/openxr/1/api_layers/explicit.d/XR_APILAYER_FRAMEPORT_timefix.json`)
|
||||
and, when the first PC VR game is installed, Valve's ARM64 Proton and its Steam Linux Runtime (Steam downloads them;
|
||||
Steam restarts once).
|
||||
and Valve's ARM64 Proton with its Steam Linux Runtime (Steam downloads them and restarts once).
|
||||
|
||||
**Settings → Uninstall FramePort → Also remove from the Frame** deletes the games, their Steam entries, the helper
|
||||
folder, the OpenXR layer and the setup script's files. Developer Mode, the SSH key line, the podman setting, Lepton
|
||||
and Proton stay. Undo them as shown above or in Steam.
|
||||
folder, the OpenXR layer and the setup files. Developer Mode, the login line, the podman setting, Lepton and Proton
|
||||
stay: undo them as shown above.
|
||||
|
||||
## Network and firewalls
|
||||
|
||||
The setup command is the only time the Frame connects to your computer: it downloads the script from FramePort on
|
||||
TCP port 8765 (8766/8767 if taken), only while the setup command is shown and for at most 30 minutes. Everything
|
||||
else goes from the computer to the Frame. If the command just says "timed out", the setup page shows what is likely
|
||||
blocking it after about 45 seconds:
|
||||
The setup is the only time the Frame connects to your PC. It downloads the setup script from FramePort on TCP port
|
||||
8765 (8766 or 8767 if taken), only while the setup page is open and for at most 30 minutes. Everything else goes
|
||||
from your PC to the Frame.
|
||||
|
||||
- **Windows:** allow FramePort (or Python, when running from source) when Windows asks. On a network Windows treats as
|
||||
**Public** it stays blocked unless you allow public networks; set your home network to Private in Windows'
|
||||
network settings instead.
|
||||
How the setup line finds your PC:
|
||||
|
||||
1. FramePort announces itself on your network while the setup page is open (with your PC's name and two words, never
|
||||
the code). If nothing answers, the setup line tries the USB cable's address and then scans the Frame's network.
|
||||
2. Both sides show the same 4 digits. Nothing happens until you click **Allow** in FramePort.
|
||||
3. FramePort then hands over the one-time code, and the Frame downloads the same setup script as the setup command.
|
||||
|
||||
The setup line's script is [bootstrap/setup.sh](../bootstrap/setup.sh). If the setup just says "timed out", the
|
||||
setup page shows what is likely blocking it after about 45 seconds:
|
||||
|
||||
- **Windows:** allow FramePort when Windows asks. On a network Windows treats as **Public** it stays blocked; set
|
||||
your home network to Private in Windows' network settings.
|
||||
- **macOS:** with the firewall on (System Settings → Network → Firewall), allow incoming connections for FramePort
|
||||
when asked.
|
||||
- **Linux:** firewalld: `sudo firewall-cmd --add-port=8765/tcp` (until the next restart). ufw:
|
||||
`sudo ufw allow 8765/tcp`, afterwards `sudo ufw delete allow 8765/tcp`.
|
||||
- **WSL:** Windows' Hyper-V firewall blocks connections into WSL without asking. FramePort adds a temporary rule for
|
||||
the setup ports (one admin prompt) and removes it again when setup is done or after 35 minutes. WSL must use
|
||||
mirrored networking: `networkingMode=mirrored` under `[wsl2]` in `%UserProfile%\.wslconfig`, then `wsl --shutdown`.
|
||||
- Or skip the setup command and use the devkit pairing (see [INSTALL.md](INSTALL.md#connecting-the-steam-frame)): it needs no connection into your computer.
|
||||
- **WSL** (FramePort's Linux version on Windows): Windows blocks connections into WSL without asking. FramePort
|
||||
adds a temporary firewall rule (one admin prompt) and removes it when setup is done or after 35 minutes. WSL must
|
||||
share Windows' network: `networkingMode=mirrored` under `[wsl2]` in `%UserProfile%\.wslconfig`, then
|
||||
`wsl --shutdown`.
|
||||
- Or skip the setup line and use **Pair new host** (see [Install and first steps](INSTALL.md#connecting-the-steam-frame)):
|
||||
it needs no connection into your PC.
|
||||
+34
-4
@@ -1,7 +1,7 @@
|
||||
# Tested games
|
||||
|
||||
Games tested on the Steam Frame with FramePort's recipes. Games not listed here may work too: FramePort suggests patches for them, and a working recipe can be shared from the app (**Share working recipe…**).
|
||||
Tested a game? [Share a working config](https://github.com/spoopyghosty0/frameport/issues/new?template=working-config.yml) or [report a problem](https://github.com/spoopyghosty0/frameport/issues/new?template=bug-report.yml) (in the app: the game's **…** menu does both and fills in the details).
|
||||
Games tested on the Steam Frame with FramePort. Games not listed may work too: FramePort suggests patches for them. Got one working? [Share its recipe](INSTALL.md#share-a-recipe-or-report-a-problem).
|
||||
|
||||
Generated from [catalog/games](../catalog/games) by `scripts/compat_list.py`.
|
||||
|
||||
| Game | Platform | Status | Notes |
|
||||
@@ -11,6 +11,7 @@ Generated from [catalog/games](../catalog/games) by `scripts/compat_list.py`.
|
||||
| AgeOfJoy | Quest | ✅ Works | |
|
||||
| AllInOneSports | Quest | ✅ Works | |
|
||||
| Asgard's Wrath 2 | Quest | ✅ Works | |
|
||||
| Audica | Quest | ✅ Works | |
|
||||
| BAM | Quest | ✅ Works | |
|
||||
| BARTENDER VR SIMULATOR | Quest | ✅ Works | |
|
||||
| Batman: Arkham Shadow | Quest | ✅ Works | |
|
||||
@@ -18,18 +19,27 @@ Generated from [catalog/games](../catalog/games) by `scripts/compat_list.py`.
|
||||
| BattleSisters | Quest | ✅ Works | |
|
||||
| Beat Saber | Quest | ✅ Works | |
|
||||
| Beat Saber | Quest | ✅ Works | |
|
||||
| Beat Saber | PC VR | ✅ Works | |
|
||||
| Beat Saber (co-existence build) | Quest | ✅ Works | |
|
||||
| Blade & Sorcery: Nomad | Quest | ✅ Works | |
|
||||
| BodyCombat | Quest | ✅ Works | |
|
||||
| BONELAB | Quest | ✅ Works | |
|
||||
| Carve Snowboarding | Quest | ✅ Works | |
|
||||
| Caves | Quest | ✅ Works | |
|
||||
| Clockwork | Quest | ✅ Works | |
|
||||
| Cook-Out | Quest | ✅ Works | |
|
||||
| Creed | Quest | ✅ Works | |
|
||||
| cubism | Quest | ✅ Works | |
|
||||
| Deep Cuts | Quest | ✅ Works | |
|
||||
| Demeter | Quest | ✅ Works | |
|
||||
| Dinosaur Island | Quest | ✅ Works | |
|
||||
| Doom3Quest | Quest | ✅ Works | |
|
||||
| Down the Rabbit Hole | Quest | ✅ Works | |
|
||||
| Eleven: Table Tennis VR | PC VR | ✅ Works | |
|
||||
| Espire 2 | Quest | ✅ Works | |
|
||||
| Genotype | Quest | ✅ Works | |
|
||||
| GORN2 | Quest | ✅ Works | |
|
||||
| Gravity Lab | Quest | ✅ Works | |
|
||||
| H.U.N.T | Quest | ✅ Works | |
|
||||
| I Am Cat | Quest | ✅ Works | |
|
||||
| I Am Monkey | Quest | ✅ Works | |
|
||||
@@ -43,6 +53,7 @@ Generated from [catalog/games](../catalog/games) by `scripts/compat_list.py`.
|
||||
| Lucky's Tale | Quest | ✅ Works | |
|
||||
| Marvel's Deadpool VR | Quest | ✅ Works | |
|
||||
| Marvel's Iron Man VR | Quest | ✅ Works | |
|
||||
| Max Mustard | Quest | ✅ Works | |
|
||||
| Medieval Dynasty New Settlement | Quest | ✅ Works | |
|
||||
| Metro Awakening | Quest | ✅ Works | |
|
||||
| Mobile Suit Gundam: Silver Phantom | Quest | ✅ Works | |
|
||||
@@ -52,14 +63,20 @@ Generated from [catalog/games](../catalog/games) by `scripts/compat_list.py`.
|
||||
| palazzo_santacruz | Quest | ✅ Works | |
|
||||
| Path of the Warrior | Quest | ✅ Works | |
|
||||
| Pistol Whip | Quest | ✅ Works | |
|
||||
| Pistol Whip | PC VR | ✅ Works | |
|
||||
| Please Don't Touch Anything | Quest | ✅ Works | |
|
||||
| PowerWash Simulator VR | Quest | ✅ Works | |
|
||||
| QuestCraft | Quest | ✅ Works | |
|
||||
| Racket: Nx | Quest | ✅ Works | |
|
||||
| RC Pilot Trainer | Quest | ✅ Works | |
|
||||
| Retronika | Quest | ✅ Works | |
|
||||
| Retropolis | Quest | ✅ Works | |
|
||||
| Richie's Plank Experience | Quest | ✅ Works | |
|
||||
| Rick and Morty: Virtual Rick-ality | PC VR | ✅ Works | |
|
||||
| Riven | Quest | ✅ Works | |
|
||||
| Robo Recall | Quest | ✅ Works | |
|
||||
| RUINSMAGUS | Quest | ✅ Works | |
|
||||
| Shores of Loci | Quest | ✅ Works | |
|
||||
| Sniper Elite VR | Quest | ✅ Works | |
|
||||
| Sniper Elite VR: Winter Warrior | Quest | ✅ Works | |
|
||||
| Space Pirate Trainer Quest | Quest | ✅ Works | |
|
||||
@@ -67,30 +84,43 @@ Generated from [catalog/games](../catalog/games) by `scripts/compat_list.py`.
|
||||
| Stremio | Quest | ✅ Works | |
|
||||
| SUPERHOT VR | PC VR | ✅ Works | |
|
||||
| SUPERHOT VR | Quest | ✅ Works | |
|
||||
| SynthRiders | Quest | ✅ Works | |
|
||||
| TetrisEffect | Quest | ✅ Works | |
|
||||
| The Boys VR | Quest | ✅ Works | |
|
||||
| The Climb 2 | Quest | ✅ Works | |
|
||||
| The Room VR | Quest | ✅ Works | |
|
||||
| The Tale of Onogoro | Quest | ✅ Works | |
|
||||
| Time Crisis VR (Experimental) | Quest | ✅ Works | |
|
||||
| Toy Master | Quest | ✅ Works | |
|
||||
| Under Cover | Quest | ✅ Works | |
|
||||
| Vader Immortal: Episode I | Quest | ✅ Works | |
|
||||
| Vader Immortal: Episode II | Quest | ✅ Works | |
|
||||
| Vader Immortal: Episode III | Quest | ✅ Works | |
|
||||
| VR HOT Quest | Quest | ✅ Works | |
|
||||
| VR4 | Quest | ✅ Works | |
|
||||
| Walkabout Mini Golf | Quest | ✅ Works | |
|
||||
| Wallace & Gromit in The Grand Getaway | Quest | ✅ Works | |
|
||||
| Waltz of the Wizard: Extended Edition | Quest | ✅ Works | |
|
||||
| Wander | Quest | ✅ Works | |
|
||||
| ZombielandVR | Quest | ✅ Works | |
|
||||
| Ancient_Dungeon | Quest | ⚠️ Works with issues | Multiplayer isn't available (offline). |
|
||||
| Arcsmith | Quest | ⚠️ Works with issues | Right eye distorts during movement (unresolved; swap, tracking, Valve layers, depth and pacing ruled out). |
|
||||
| Assassin's Creed Nexus | Quest | ⚠️ Works with issues | Some launch warning text is still upside down; the rest of the UI is fixed by flip emulation. |
|
||||
| Doom3Quest | Quest | ⚠️ Works with issues | PDA shows black screen. |
|
||||
| Does it Stack? | Quest | ⚠️ Works with issues | Mixed reality mode does not work (works on Demeo), everything else seems to be OK |
|
||||
| End Space | Quest | ⚠️ Works with issues | Controls stop responding after the first mission loads. |
|
||||
| ExploreVR | Quest | ⚠️ Works with issues | The 3D world warps and shifts with head movement (wrong perspective). |
|
||||
| Freedom | Quest | ⚠️ Works with issues | Volume can't be changed in the game. |
|
||||
| Myst | Quest | ⚠️ Works with issues | Minor graphical glitches on some objects. |
|
||||
| Phantom: Covert Ops | Quest | ⚠️ Works with issues | DLC/store button crashes (no Meta store). |
|
||||
| Pinball FX VR | Quest | ⚠️ Works with issues | Plays; mixed reality mode not working yet. |
|
||||
| Silhouette | Quest | ⚠️ Works with issues | Hand-tracking game; the Frame synthesizes hands from controllers, so it is janky. |
|
||||
| The Light Brigade | Quest | ⚠️ Works with issues | Judder in weapons |
|
||||
| Time Stall | Quest | ⚠️ Works with issues | Both eyes distort during movement (unresolved). |
|
||||
| Vader Immortal: Episode I | Quest | ⚠️ Works with issues | Starts in VR and plays the intro, then stays on the loading card (Vader's portrait with a progress bar). |
|
||||
| WiiCompiled VR | Quest | ⚠️ Works with issues | To add a game: in FramePort's Files tab, upload your .wcgame file to this game's storage, folder Android/data/org.wiicompiled.quest/files/WiiCompiledOpenXRVR… |
|
||||
| BlazeRush | Quest | ❌ Doesn't run | Starts and reaches the menu room, but the room shows no controllers and ignores all input (it all reaches the game); no fix yet. |
|
||||
| Eleven Table Tennis | Quest | ❌ Doesn't run | Stops at the splash screen. |
|
||||
| Espire 1: VR Operative (Quest Edition) | Quest | ❌ Doesn't run | Mesa GL driver crash during texture upload. |
|
||||
| GOLF+ | Quest | ❌ Doesn't run | Black screen. |
|
||||
| HITMAN 3 VR: Reloaded | Quest | ❌ Doesn't run | Vulkan driver crash (freedreno), even without Valve layers. |
|
||||
| Journey of the Gods | Quest | ❌ Doesn't run | 32-bit only; the Frame has no AArch32. |
|
||||
| Roblox | Quest | ❌ Doesn't run | Crashes on its first VR frame on the Frame. |
|
||||
|
||||
+190
-229
@@ -1,298 +1,259 @@
|
||||
# Installing FramePort
|
||||
# Install and first steps
|
||||
|
||||
▶ **[Watch the install tutorial](media/frameport-install.mp4)** (about 90 seconds, MP4; also attached to every
|
||||
release as `FramePort-install.mp4`): from the download to the first game on the Frame.
|
||||
▶ **[Watch the install tutorial](media/frameport-install.mp4)** (about 90 seconds): from the download to the first
|
||||
game on the Steam Frame.
|
||||
|
||||
[](media/frameport-install.mp4)
|
||||
|
||||
Download the archive for your computer from the [latest release](https://github.com/spoopyghosty0/frameport/releases/latest)
|
||||
and extract it anywhere. No installer or admin rights are needed. On first start FramePort downloads its Java
|
||||
runtime, the OVRPort CLI and apksigner into its data folder (Settings → Tools shows them).
|
||||
Download the file for your PC from the [latest release](https://github.com/spoopyghosty0/frameport/releases/latest)
|
||||
and unpack it anywhere. No installer or admin rights are needed.
|
||||
|
||||
| Computer | Archive | Start |
|
||||
| Your PC | Download | Start |
|
||||
|---|---|---|
|
||||
| Windows 10/11 (x64) | `FramePort-windows-x64.zip` | `FramePort.exe` |
|
||||
| macOS (Apple Silicon) | `FramePort-macos-arm64.zip` | `FramePort.app` |
|
||||
| Linux (x64, GTK 3; Ubuntu 22.04 or newer) | `FramePort-linux-x64.tar.gz` | `FramePort/FramePort` |
|
||||
| Linux (ARM64, GTK 3; Ubuntu 22.04 or newer) | `FramePort-linux-arm64.tar.gz` | `FramePort/FramePort` |
|
||||
| Command line only (Python 3.11+) | `frameport-<version>-py3-none-any.whl` | `frameport --help` |
|
||||
| Linux (x64, Ubuntu 22.04 or newer) | `FramePort-linux-x64.tar.gz` | `FramePort/FramePort` |
|
||||
| Linux (ARM64, Ubuntu 22.04 or newer) | `FramePort-linux-arm64.tar.gz` | `FramePort/FramePort` |
|
||||
|
||||
The command-line version installs from the wheel's release link with `uv tool install <link>` (or pipx / pip).
|
||||
On first start FramePort downloads the tools it uses (Settings → Tools shows them).
|
||||
|
||||
## First launch
|
||||
|
||||
The builds are signed with a free self-signed certificate (Windows) and an ad-hoc signature (macOS), so the first
|
||||
start shows a warning:
|
||||
FramePort isn't signed with a paid certificate, so the first start shows a warning:
|
||||
|
||||
- **Windows:** "Windows protected your PC" → **More info** → **Run anyway**. Optional: import
|
||||
`FramePort-selfsigned.cer` (attached to each release) into *Trusted Root Certification Authorities* (Current User) to
|
||||
show FramePort as the publisher; the certificate can only sign code. Remove it with `certmgr.msc`.
|
||||
- **macOS:** right-click `FramePort.app` → **Open** → **Open** (once), or `xattr -dr com.apple.quarantine FramePort.app`.
|
||||
- **Linux:** `tar xzf FramePort-linux-x64.tar.gz && ./FramePort/FramePort` (ARM64: `FramePort-linux-arm64.tar.gz`).
|
||||
- **Windows:** "Windows protected your PC" → **More info** → **Run anyway**.
|
||||
- **macOS:** right-click `FramePort.app` → **Open** → **Open** (once).
|
||||
- **Linux:** `tar xzf FramePort-linux-x64.tar.gz && ./FramePort/FramePort`.
|
||||
|
||||
## Connecting the Steam Frame
|
||||
|
||||
The Frame and the computer must be on the same network.
|
||||
The Frame and your PC must be on the same network (or connected with a [USB cable](#with-a-usb-cable)).
|
||||
|
||||
1. In FramePort open **Steam Frame** and click **Show setup command**.
|
||||
2. First time only, on the Frame:
|
||||
1. Open the **SteamVR dashboard → Launch a program → Desktop**: the Linux desktop opens on a virtual screen.
|
||||
2. Open the app menu (bottom-left corner of that desktop) → **System → Konsole** (or search for Konsole).
|
||||
3. Type the command FramePort shows exactly as shown (on-screen keyboard or any USB/Bluetooth keyboard) and press
|
||||
**Enter**. It looks like `curl -fsS 192.168.1.20:8765/1a2b3c4d | bash`: your computer's address, then a
|
||||
one-time code.
|
||||
4. After a few seconds the desktop closes by itself (Steam restarts once); that's expected. If
|
||||
Steam asks to install **Lepton** (Valve's Android runtime), confirm it.
|
||||
1. In FramePort open **Steam Frame** and click **Start setup**. Keep that page open.
|
||||
2. On the Frame, first time only:
|
||||
1. Open the **SteamVR dashboard → Launch a program → Desktop**. The Frame's desktop opens.
|
||||
2. Open the app menu (bottom left) → **System → Konsole**, the Frame's terminal.
|
||||
3. Type this setup line and press **Enter** (on-screen keyboard or any USB or Bluetooth keyboard):
|
||||
|
||||
FramePort connects by itself within a minute. No password is needed. The command lets FramePort in and turns on
|
||||
**Developer Mode** (which includes SSH); everything it changes is listed in [FRAME_SETUP.md](FRAME_SETUP.md).
|
||||
3. Later starts: a Frame in Developer Mode appears in the list and FramePort connects to it automatically. (If you
|
||||
turn Developer Mode off in Settings → System → Developer, turn it on again there.)
|
||||
```
|
||||
curl -sL frameport.app/s | bash
|
||||
```
|
||||
|
||||
**Without Konsole:** turn on Developer Mode yourself (Settings → System → Developer). The Frame then appears under
|
||||
**On your network**. On the Frame open Settings → Developer → **Pair new host**, then click **Connect** in FramePort
|
||||
and approve it on the Frame (Valve's own devkit pairing; it only sends this computer's key to the Frame). Install
|
||||
Lepton from the Steam Frame page afterwards if it's missing.
|
||||
No keyboard? Open [the setup page](https://frameport.app/setup/) in Chromium on the Frame,
|
||||
tap **Copy** and paste it into Konsole.
|
||||
4. Konsole shows a 4-digit code. When FramePort shows the same code, click **Allow**. Nothing changes on the Frame
|
||||
before that.
|
||||
5. Steam restarts once and the desktop closes. If Steam asks to install **Lepton** (Valve's Android runtime),
|
||||
confirm it.
|
||||
|
||||
FramePort connects within a minute. No password is needed. The setup turns on **Developer Mode**;
|
||||
[What the setup changes](FRAME_SETUP.md) lists everything.
|
||||
|
||||
Later, FramePort connects to the Frame by itself. If you turn Developer Mode off (Settings → System → **Enable
|
||||
Developer Mode**), turn it on again there.
|
||||
|
||||
**Setup command:** if your network blocks FramePort's search, click **Use the setup command**. It shows a line with
|
||||
your PC's address and a one-time code, for example `curl -fsS 192.168.1.20:8765/1a2b3c4d | bash`. Run it in Konsole instead.
|
||||
|
||||
**Without Konsole:** turn on Developer Mode yourself (Settings → System → **Enable Developer Mode**), then open
|
||||
Settings → Developer → **Pair new host** on the Frame. FramePort finds the Frame and asks to connect; approve it in the
|
||||
headset. Install Lepton from FramePort's Steam Frame page afterwards if it's missing.
|
||||
|
||||
### With a USB cable
|
||||
|
||||
For networks that block the setup (guest Wi-Fi, firewalls, discovery not working), and for faster uploads:
|
||||
A cable works on networks that block the setup, and uploads are faster (about 37 MB/s, three times typical Wi-Fi).
|
||||
|
||||
1. On the Frame, turn on **Developer Mode** (Settings → System → Developer Mode). The Frame's USB network only exists
|
||||
in Developer Mode.
|
||||
2. Connect the Frame's USB-C port to the computer.
|
||||
3. In FramePort: **Steam Frame → Set up with a USB cable**. FramePort detects the cable and shows the setup command,
|
||||
which reaches the computer over the cable. Already set up? It connects over the cable right away.
|
||||
1. On the Frame, turn on Developer Mode (Settings → System → **Enable Developer Mode**). The cable only works in
|
||||
Developer Mode.
|
||||
2. Connect the Frame's USB-C port to your PC. No driver is needed.
|
||||
3. In FramePort click **Steam Frame → Set up with a USB cable** and follow the steps.
|
||||
|
||||
The cable needs no driver on Windows 10/11, macOS or Linux, and the computer gets an address from the Frame
|
||||
automatically. Uploads use the cable whenever it's plugged in (about 37 MB/s, ~3× typical Wi-Fi), even when FramePort
|
||||
connected over Wi-Fi. Unplug it any time: FramePort finds the Frame on Wi-Fi again by itself.
|
||||
Uploads use the cable whenever it's plugged in. Unplug it any time: FramePort finds the Frame on Wi-Fi again.
|
||||
|
||||
### Firewalls
|
||||
|
||||
If the setup command only says "timed out", a firewall on your computer blocks the Frame; the setup page
|
||||
says which after about 45 seconds. Details per system: [FRAME_SETUP.md](FRAME_SETUP.md#network-and-firewalls).
|
||||
If the setup only says "timed out", a firewall on your PC blocks the Frame. After about 45 seconds the setup page
|
||||
says which. Details: [Network and firewalls](FRAME_SETUP.md#network-and-firewalls).
|
||||
|
||||
## Running FramePort on the Frame (experimental)
|
||||
|
||||
FramePort can run on the Steam Frame itself, without a PC: in **Desktop Mode**, download
|
||||
`FramePort-linux-arm64.tar.gz`, unpack it (`tar xzf FramePort-linux-arm64.tar.gz`) and start `FramePort/FramePort`.
|
||||
Turn on **Developer Mode** first (Steam → Settings → System); FramePort then manages "This Frame" directly, with
|
||||
no pairing. Games are added to the Steam library when you go back to **Gaming Mode** (Steam has to restart for it,
|
||||
which would end Desktop Mode). This is new: please report anything odd with **Report a problem**.
|
||||
FramePort can run on the Frame itself, without a PC:
|
||||
|
||||
1. Turn on Developer Mode (Settings → System → **Enable Developer Mode**).
|
||||
2. In Desktop Mode, download `FramePort-linux-arm64.tar.gz`, unpack it (`tar xzf FramePort-linux-arm64.tar.gz`) and
|
||||
start `FramePort/FramePort`.
|
||||
|
||||
Games appear in the Steam library when you go back to Gaming Mode. Please report anything odd with **Report a
|
||||
problem…**.
|
||||
|
||||
## Installing games
|
||||
|
||||
- **Install on Frame** on a game's page (or select several in the Library and install them together). Installs run
|
||||
one after another in the background; **Activity** shows the current one at the top.
|
||||
- **Update all** reinstalls every game whose build changed (e.g. after a FramePort update). Questions that need an
|
||||
answer (e.g. Oculus games that can't run on the Frame) are asked once, for all games.
|
||||
- If the Frame goes to sleep, turns off or leaves the Wi-Fi, the queue **waits** and continues once it's back; uploads
|
||||
pick up where they stopped. While installs run, FramePort keeps the Frame from going to sleep. Before a large batch
|
||||
it checks the Frame has enough free space.
|
||||
- **microSD card / other drives:** the **Steam Frame** page's **Storage** section lists the Frame's drives and sets
|
||||
where new games go (**Install new games to**). Games go into a `FramePort` folder on the card. To move a game that's
|
||||
installed already, right-click it → **Move to…** (the game must be closed; saves, settings and the Steam entry stay).
|
||||
A game on the card only starts while the card is inserted (FramePort then says "SD Card not inserted"). Cards
|
||||
formatted as FAT, exFAT or NTFS can't hold games: format the card in SteamOS first.
|
||||
- Your own game files are never changed. The converted copy is temporary: it's removed once the game is on the Frame
|
||||
(Settings → Installing: keep them, or remove all now).
|
||||
- **Game settings…** (game menu or the Steam Frame page): sharpness, refresh rate, controllers, menus, 360° video and
|
||||
mixed-reality options in plain words, only those that matter for the game. Changes are kept with the game and,
|
||||
when it's installed, used the next time it starts.
|
||||
- Ordinary Android apps (no VR) are installed unchanged and shown as a flat window in the headset. Android's
|
||||
back/home/recents buttons are hidden by default (patch **Hide Android's navigation bar**). If FramePort guesses
|
||||
wrong (a phone app shows nothing in the headset, or a VR app opens as a flat window), choose **VR** or **Flat
|
||||
window** under **Show as VR or as a flat window** in the game's **Customize** section, then **Update on Frame**.
|
||||
- **Add games → Add a Windows program…** adds a single Windows program; the Frame runs it through Proton (as a
|
||||
window unless it is a VR game). A program sitting in Downloads, the home folder or a drive root is copied on its
|
||||
own first, so the install doesn't upload everything next to it.
|
||||
- In the packaged app you can also **drag files onto the Library**: APKs, Linux apps (AppImage, `.zip`/`.tar.gz`),
|
||||
Windows programs (`.exe`), folders, or a FrameDrop manifest (`.json`).
|
||||
|
||||
### Install links ("Install with FrameDrop" buttons)
|
||||
|
||||
Some developers put an **Install with FrameDrop** button on their site (the one-click protocol of the FrameDrop
|
||||
sideloader, documented at framedropvr.com/docs). FramePort understands the same links:
|
||||
|
||||
- **Clicking a button** opens FramePort (or the window that's already open) on Windows and Linux. FramePort shows
|
||||
the title, the files, their size and whether a checksum is given, and asks before it downloads anything. Then it
|
||||
downloads the build, adds it to your library and starts the usual install on the Frame. If no Frame is connected,
|
||||
the game is added now and installs once the Frame is back.
|
||||
- **Add games → Add from a link…** takes the button's address (right-click → Copy link), a `framedrop://` or
|
||||
`frameport://` link, a manifest (`.json`) or a direct link to an APK, a Linux build or a Windows program. Use it on
|
||||
macOS, where web pages can't hand links to FramePort yet.
|
||||
- **Settings → Install links** has one switch for `framedrop://` links (the buttons) and one for FramePort's own
|
||||
`frameport://` links. Both are on by default. If FrameDrop is installed too and already opens `framedrop://`
|
||||
links, FramePort leaves them to it; **Use FramePort for these links** takes them over (turn the switch off to give
|
||||
them back).
|
||||
- **For developers:** a FrameDrop manifest works as it is
|
||||
(`{"schema": "framedrop.install/v1", "name": "…", "files": [{"url": "https://…", "sha256": "…"}]}`). FramePort
|
||||
also reads an optional `"frameport": {"description": "…", "icon": "https://….png"}` object (FrameDrop ignores
|
||||
it): the install question then shows the icon and description, and they become the game's icon and "About this
|
||||
game" text when no store has them. For your page there's an "Install with FramePort" button:
|
||||
[INSTALL_BUTTON.md](INSTALL_BUTTON.md). Without a manifest (a bare file link) FramePort guesses the title from the
|
||||
file name and replaces it with the app's own name once it's downloaded.
|
||||
- Only `https://` links to public servers are used (plain `http://` only on this PC, for testing); links with a
|
||||
user name or password, or pointing into your local network, are refused. Only install from sites you trust.
|
||||
|
||||

|
||||
|
||||
Each game has **Game settings** in plain words (sharpness, refresh rate, controllers, menus, 360° video, mixed
|
||||
reality), showing only what matters for that game. Changes are kept with the game and reach the Frame right away.
|
||||
- **Install on Frame** on a game's page, or select several games in the Library and install them together. Installs
|
||||
run in the background; **Activity** shows the current one.
|
||||
- **Update all** updates every game whose build changed, for example after a FramePort update.
|
||||
- If the Frame sleeps or leaves the Wi-Fi, installs wait and continue when it's back. While installs run, the Frame
|
||||
stays awake.
|
||||
- Your own game files are never changed. The patched copy is deleted once the game is on the Frame (Settings →
|
||||
Installing).
|
||||
- In the downloaded app you can also **drag files onto the Library**: games, Linux apps, Windows programs or folders.
|
||||
|
||||
**Game settings…** (in the game's menu) shows the settings that matter for that game in plain words: sharpness,
|
||||
refresh rate, controllers, menus, 360° video and mixed reality. Changes are used the next time the game starts.
|
||||
|
||||

|
||||
|
||||
### microSD cards and other drives
|
||||
|
||||
- The **Steam Frame** page's **Storage** section sets where new games go (**Install new games to**).
|
||||
- To move an installed game, right-click it → **Move to…**. The game must be closed; saves and the Steam entry stay.
|
||||
- A game on a card only starts while the card is inserted.
|
||||
- Cards formatted as FAT, exFAT or NTFS can't hold games: format the card in SteamOS first.
|
||||
|
||||
### Android apps and Windows programs
|
||||
|
||||
- Android apps without VR are installed unchanged and shown as a window in the headset. If one shows nothing (or a
|
||||
VR app opens as a window), open **Customize** on the game's page, set **Show as VR or as a flat window** and click
|
||||
**Update on Frame**.
|
||||
- **Add games → Add a Windows program…** adds a single Windows program. The Frame runs it as a window through Proton
|
||||
(Valve's tool for running Windows programs).
|
||||
|
||||
### Install links ("Install with FrameDrop" buttons)
|
||||
|
||||
Some websites have an **Install with FrameDrop** button. FramePort understands these buttons too:
|
||||
|
||||
- **Click a button** on Windows or Linux: FramePort opens, shows what it would download and asks first. Then it adds
|
||||
the game and installs it on the Frame.
|
||||
- **Add games → Add from a link…** takes a button's address (right-click → Copy link) or a direct download link. Use
|
||||
it on macOS, where buttons can't open FramePort yet.
|
||||
- **Settings → Install links** turns the buttons on or off. If FrameDrop is installed too, it keeps its buttons until
|
||||
you click **Use FramePort for these links**.
|
||||
- Only `https://` links to public servers are used. Only install from sites you trust.
|
||||
|
||||
Website owners: see [Install button](INSTALL_BUTTON.md).
|
||||
|
||||
## Typing on the Frame
|
||||
|
||||
- **Type on Frame** (its own tab in the sidebar; also on the Steam Frame page): while the tab is
|
||||
open, this computer's keyboard works as a keyboard plugged into the Frame. Select a text field in the headset (in
|
||||
an app, Steam or the desktop) and type; Esc and shortcuts go to the Frame too. Paste longer text into the box to
|
||||
type it in one go (US keyboard layout). Opening another tab disconnects the keyboard.
|
||||
- **Steam's on-screen keyboard** opens for text fields of apps shown as a window (2D apps, and VR apps with
|
||||
**Show the app's Android window**). Steam lists that window as **Gamescope** (the Frame's display compositor);
|
||||
leave it open: it's what receives the typing, the VR view isn't affected.
|
||||
- **Unity apps whose text fields close at once** (a caret flashes, nothing can be typed): FramePort suggests
|
||||
**Make Unity text fields work** for them. The first time, it downloads Cpp2IL (a tool that finds the right spot in the
|
||||
game's code, ~17 MB). Games added before this version: open the game's menu → **Analyze again**, then reinstall.
|
||||
- **Type on Frame** (in the sidebar): while this tab is open, your PC's keyboard types on the Frame. Select a text
|
||||
field in the headset and type, or paste longer text into the box.
|
||||
- **Steam's on-screen keyboard** works in apps shown as a window. Steam lists that window as **Gamescope**: leave it
|
||||
open.
|
||||
- **Unity games whose text fields close at once:** FramePort suggests the patch **Make Unity text fields work**.
|
||||
Games added before this patch existed: open the game's menu → **Analyze again**, then reinstall.
|
||||
|
||||
## Watching the Frame (Monitor)
|
||||

|
||||
|
||||
- **Monitor** (its own tab in the sidebar) shows live what the Frame is doing while the tab is open: the running game
|
||||
with its frame rate (Quest games), CPU, graphics chip, memory, the hottest temperature with the fan speed, power
|
||||
draw and battery time left, each with a 2-minute chart. **Show details** adds every CPU core, all temperature
|
||||
sensors, where the power goes and the network.
|
||||
- **Processes**: **Game** (default) lists the running game's processes, **Steam & SteamVR** and **All** show more.
|
||||
Right-click a process (or use **⋯**) to end it, force-kill it or end its whole game; **End game** on the game card
|
||||
closes the game the way Steam's Exit game does. A lock marks programs whose end would close Steam, SteamVR or the
|
||||
desktop: FramePort asks again before ending those.
|
||||
- The numbers come every second (or every 2/5 s) and cost the Frame about 1 % of one CPU core; nothing keeps
|
||||
running on the Frame after you leave the tab.
|
||||
## Watching the Frame
|
||||
|
||||
- **Monitor** (in the sidebar) shows the running game's frame rate, CPU, graphics, memory, temperature, power and
|
||||
battery, each with a 2-minute chart. **Show details** shows more.
|
||||
- Under **Processes**, right-click a process to end it. **End game** closes the game like Steam's Exit game. A lock
|
||||
marks programs Steam or the desktop needs; FramePort asks again before ending those.
|
||||
- **Live view** streams what the headset shows, with sound, to your browser. It uses about one CPU core of the Frame,
|
||||
so stop it when you're done.
|
||||
- **Screenshots** shows the screenshots you took in the headset, sorted by game and day, to view or download.
|
||||
|
||||
## Updating
|
||||
|
||||
**Game configs** (the tested recipes in the catalog) update by themselves: FramePort checks GitHub every 6 hours for
|
||||
newly confirmed or fixed configs and uses them without a FramePort update; a game whose recipe changed then shows
|
||||
**Update on Frame**. Configs that need a newer FramePort are skipped until you update. Settings → Data shows the last
|
||||
check (**Check now**) and turns this off.
|
||||
FramePort checks for a new version at start and every 6 hours. When there is one, the Library shows **Update now**:
|
||||
FramePort downloads it, checks it, restarts and keeps your games and settings. **Later** skips that version.
|
||||
|
||||
|
||||
FramePort checks for a new release at start and every 6 hours (it only downloads the release information). When one
|
||||
exists, the Library shows **Update now**: FramePort downloads the new version, verifies it against the release's
|
||||
`SHA256SUMS.txt` (on Windows also the signature), restarts and opens as the new version. Games, settings, signing keys
|
||||
and the Frame connection are kept. Running installs finish first. **Later** skips that version.
|
||||
|
||||
Settings → **Updates**: turn the check off, or turn on **Install updates automatically** (downloads in the background,
|
||||
installs at the next start). If FramePort's folder isn't writable, **Update now** opens the release page instead. The
|
||||
update log is `logs/update.log` in the data folder.
|
||||
|
||||
**Dev builds:** when you're asked to test a fix before it's released, use Settings → Updates → **Install the latest
|
||||
dev build…**. It shows what to test, then installs like an update (same checks). Dev builds are less tested; the next
|
||||
release is offered to you as a normal update.
|
||||
|
||||
Command line: `frameport update` (`--check` only checks, exit code 10 = update available; `--yes` doesn't ask).
|
||||
`FRAMEPORT_NO_UPDATE_CHECK=1` turns all checks off.
|
||||
- Settings → **Updates** turns the check off or turns on **Install updates automatically**.
|
||||
- **Recipes** (the tested patches and settings for each game) update by themselves. A game whose recipe changed shows
|
||||
**Update on Frame**.
|
||||
- **Dev builds:** if you're asked to test a change before its release, use Settings → Updates → **Install the latest
|
||||
dev build…**. The next release then arrives as a normal update.
|
||||
|
||||
## PC VR games
|
||||
|
||||
PC VR games are Windows VR games (OpenXR, SteamVR or Oculus). Scan a folder of them (one folder per game) or use
|
||||
**Add games → Add a PC game folder…**. FramePort finds the game's program and asks when there is more than one
|
||||
candidate. **Already patched** on a game page installs a copy unchanged. Oculus-only games need Revive: FramePort uses
|
||||
an installed Revive, or downloads a portable copy.
|
||||
PC VR games are Windows VR games. Scan a folder of them (one folder per game) or use **Add games → Add a PC game
|
||||
folder…**. FramePort asks which program starts the game if it finds more than one.
|
||||
|
||||
- **Play from this PC:** Windows with Steam and SteamVR. **Install on this PC** adds the game to Steam; stream it to the
|
||||
Frame with Steam Link. If a game can't keep up with the refresh rate, FramePort lowers the rate and enables motion
|
||||
smoothing in SteamVR's per-game settings the next time you press Play.
|
||||
- **Play on the Frame (experimental):** Steam Frame → *PC VR games (Proton)* → **Install**, then **Install on Frame**
|
||||
on the game page.
|
||||
- Games that use the Oculus Platform SDK check the licence through the Oculus app, so they run on the PC only.
|
||||
- **Play from this PC** (Windows with Steam and SteamVR): **Install on this PC** adds the game to Steam. Stream it to
|
||||
the Frame with Steam Link.
|
||||
- **Play on the Frame (experimental):** on the Steam Frame page, install *PC VR games (Proton)*, then click **Install
|
||||
on Frame** on the game's page.
|
||||
- **Oculus games** (made for Meta's Rift headset) need Revive, which FramePort downloads. Games that check their
|
||||
license through the Oculus app only run on your PC.
|
||||
|
||||
**Windows games without VR:** **Add games → Add a PC game folder…** with the game's folder (pick the program that
|
||||
starts it if asked). FramePort installs it on the Frame and Proton runs it as a window, like Steam's own Windows games;
|
||||
it shows up in the Frame's Steam library tagged "Windows game on Frame". Whether a game runs depends on Proton on ARM
|
||||
(x86 games run through emulation).
|
||||
**Windows games without VR:** use **Add games → Add a PC game folder…** too. The Frame runs them as a window through
|
||||
Proton, like Steam's own Windows games. Whether a game runs depends on Proton.
|
||||
|
||||
## Linux apps
|
||||
|
||||
The Frame runs SteamOS on an arm64 CPU, so native Linux apps built for **aarch64/arm64** run on it directly (no
|
||||
Android container, no Proton). **Add games → Add a Linux app…** takes an AppImage or a `.zip`/`.tar.gz`/
|
||||
`.tar.xz` archive; **Add a Linux app folder…** takes an unpacked app. FramePort finds the program that starts it (the
|
||||
game page's **Change…** picks another one) and whether it's a VR (OpenXR) app. **Install on Frame** uploads it
|
||||
unchanged and adds it to the Frame's Steam library, tagged "Linux app on Frame"; Play, launch tests and Uninstall
|
||||
work like for other games.
|
||||
**Add games → Add a Linux app…** takes an AppImage (a single-file Linux app) or a `.zip`/`.tar.gz`/`.tar.xz`
|
||||
archive; **Add a Linux app folder…** takes an unpacked app. **Install on Frame** uploads it unchanged and adds it to
|
||||
the Steam library.
|
||||
|
||||
- **x86_64 builds** run through **FEX**, Valve's x86 translator, with the x86 system libraries SteamOS ships for it
|
||||
(the way Steam on the Frame runs x86 Linux games). The first install of one installs FEX on the Frame (Steam
|
||||
restarts once and downloads it, a few MB). They run slower than arm64 builds: when an app offers both, FramePort picks the arm64 one. The game
|
||||
page shows which CPU a build is for.
|
||||
- The app must bring the libraries SteamOS doesn't have (checked for arm64 builds; x86_64 builds use FEX's x86
|
||||
system, which has glibc and Mesa, and aren't checked ahead). If some are missing, the install reports them and the game
|
||||
page lists them: look for a build that includes them.
|
||||
- **Desktop Mode:** Linux apps also appear in Desktop Mode's application menu and as an icon on its desktop. Some
|
||||
apps work better there, with a mouse and keyboard, than in Gaming Mode (where Steam Input turns the controllers into
|
||||
a gamepad). Switch it off per app on the game page (**Desktop Mode**).
|
||||
- From the command line: `frameport add-linux <AppImage, folder or archive> [--exe <program>]`.
|
||||
- Apps built for **arm64** (the Frame's processor) run directly. Apps built for **x86_64** (most PCs) run through FEX,
|
||||
a translator Steam installs on the Frame the first time; they run slower. The game page shows which kind you have.
|
||||
- If the app needs libraries the Frame doesn't have, the game page lists them: look for a build that includes them.
|
||||
- Linux apps also appear in **Desktop Mode**'s app menu. Turn this off on the game
|
||||
page (**Desktop Mode**).
|
||||
|
||||
## Files on the Frame (videos, documents, mods, saves)
|
||||
## Files on the Frame
|
||||
|
||||
The **Files** tab manages files on the Frame over the same connection as installs; no other transfer app is needed.
|
||||
Pick a location, browse folders, and use **Upload files** / **Upload folder**, **New folder**, or the download, rename
|
||||
and delete buttons on each entry. Right-click an entry (or the empty space) for the same actions in a menu. Tick
|
||||
several entries (or the box above the list for all), or click and drag across them, to download or delete them
|
||||
together; a right-click on one of them then acts on all. The **Screenshots** tab and the **Library** work the same
|
||||
way: right-click for a menu, drag across cards to select several. In the downloaded app you can also drag files and folders from Explorer / Finder / your file manager onto
|
||||
the list to upload them into the open folder. Uploads and downloads run in the Activity panel, resume after an interruption and
|
||||
skip files that are already there.
|
||||
The **Files** tab copies files between your PC and the Frame: videos, documents, mods and saves.
|
||||
|
||||
- **Videos**, **Downloads** and **Documents** appear inside every Quest game as `/sdcard/Movies`, `/sdcard/Download`
|
||||
and `/sdcard/Documents`. Apps find files by browsing folders; Android's media index doesn't work on the Frame.
|
||||
- Under **Game storage**, each installed game has its own `/sdcard` (mods, saves). A game's menu → **Add videos and
|
||||
files…** opens it. Video players that list only their own folder (e.g. 4XVR's "Internal Storage" = `4XPlayer`) find
|
||||
videos uploaded into that folder.
|
||||
- **Home folder** shows everything in the Frame's home folder (hidden files with **Show hidden files**).
|
||||

|
||||
|
||||
Command line: `frameport frame send <files> --dest videos` (`frameport frame storage` lists the destinations).
|
||||
- Use **Upload files**, **Upload folder** and **New folder**; right-click an entry to download, rename or delete
|
||||
it. Drag across entries to select several.
|
||||
- In the downloaded app you can drag files from your PC onto the list.
|
||||
- **Videos**, **Downloads** and **Documents** are shared by every Quest game (inside the game: `/sdcard/Movies`,
|
||||
`/sdcard/Download`, `/sdcard/Documents`).
|
||||
- **Game storage** holds each game's own files. A game's menu → **Add videos and files…** opens it.
|
||||
|
||||
## Sharing a working game, reporting a problem
|
||||
## Share a recipe or report a problem
|
||||
|
||||
- **Share working recipe…** (game menu): opens a prefilled GitHub issue with the game's patches and settings. Accepted
|
||||
configs become built-in recipes. Untested games ask on their page once they've been installed or tested: **It
|
||||
works**, **It has issues** or **It doesn't run**.
|
||||
- **Report a problem…** (game menu, or Settings → Problems and feedback): saves a diagnostics zip to Documents (logs,
|
||||
recipe, device details; IP addresses, user names, home folders and Steam ids replaced) and opens a prefilled GitHub
|
||||
issue to attach it to. Command line: `frameport diag report <game>`, `frameport share-recipe <game>`.
|
||||
- **Share working recipe…** (in the game's menu) opens a GitHub issue with the game's recipe filled in. Accepted
|
||||
recipes become built-in for everyone. Untested games ask how they run after you install or test them.
|
||||
- **Report a problem…** (in the game's menu, or Settings → Problems and feedback) saves a diagnostics zip with
|
||||
personal data removed and opens a GitHub issue to attach it to.
|
||||
|
||||
## Command line
|
||||
|
||||
Everything the app does is also a `frameport` command (in a source checkout: `uv run frameport`); `frameport --help`
|
||||
and `frameport <command> --help` describe every option. The main ones:
|
||||
|
||||
| Command | What it does |
|
||||
|---|---|
|
||||
| `scan <folder>` / `list` / `show <game>` | add games, list the library, show a game's analysis and patches |
|
||||
| `add-linux <path>` | add a Linux app, arm64 or x86_64 (AppImage, folder or archive) |
|
||||
| `recipe <game> --enable/--disable <patch>` | change a game's patches (`patches` lists them all) |
|
||||
| `build <game>` / `install <game>` / `test <game>` | build, install on the Frame (`--to pc` for PC VR on this PC), launch test |
|
||||
| `frame discover` / `frame connect` / `frame info` | find, pair with and describe the Frame |
|
||||
| `frame send` / `frame storage` / `frame cleanup` | copy files to the Frame, show where they go, free space |
|
||||
| `frame drives` / `frame move <game> --to <drive>` / `install --dest <drive>` | the Frame's drives (microSD), move a game, install to a drive |
|
||||
| `tools status` / `tools install` | the tools FramePort downloads |
|
||||
| `open-link "<link>"` | install from an "Install with FrameDrop" button's address or a manifest/APK/zip link (`--yes`, `--no-install`) |
|
||||
| `diag report <game>` / `share-recipe <game>` | report a problem / share a working recipe |
|
||||
| `update` | update FramePort |
|
||||
|
||||
Exit codes: 0 done, 1 something failed, 2 wrong usage, 10 (`update --check`) a newer version exists. Errors are
|
||||
one line on stderr; `FRAMEPORT_DEBUG=1` shows the full traceback.
|
||||
Without the app: [share a recipe](https://github.com/spoopyghosty0/frameport/issues/new?template=working-config.yml)
|
||||
· [report a problem](https://github.com/spoopyghosty0/frameport/issues/new?template=bug-report.yml).
|
||||
|
||||
## Uninstalling
|
||||
|
||||
Settings → **Uninstall FramePort…** (or `frameport uninstall-app`) removes its data folder, the Steam shortcuts it
|
||||
added on this computer and, optionally, its games on the Frame (saves can be kept). It first saves your signing keys
|
||||
to Documents: game updates must be signed with the same key. Then delete the program folder.
|
||||
Settings → **Uninstall FramePort…** removes FramePort's data and, if you choose, its games on the Frame (saves can be
|
||||
kept). It first saves your signing keys to Documents: you need them to update your games later. Then delete the
|
||||
FramePort folder.
|
||||
|
||||
## Verify a download
|
||||
|
||||
Each archive has a GitHub build attestation:
|
||||
`gh attestation verify FramePort-windows-x64.zip -R spoopyghosty0/frameport`. `SHA256SUMS.txt` lists the checksums
|
||||
(`sha256sum -c SHA256SUMS.txt`). Windows certificate SHA-256 fingerprint:
|
||||
`SHA256SUMS.txt` in each release lists the files' checksums: `sha256sum -c SHA256SUMS.txt`. Each file also has a
|
||||
GitHub build attestation (proof that GitHub built it from this repository):
|
||||
`gh attestation verify FramePort-windows-x64.zip -R spoopyghosty0/frameport`.
|
||||
|
||||
Windows: to show FramePort as the publisher, import `FramePort-selfsigned.cer` (attached to each release) into
|
||||
*Trusted Root Certification Authorities* (Current User). The certificate can only sign code; remove it with
|
||||
`certmgr.msc`. Its SHA-256 fingerprint:
|
||||
`4E:12:98:91:62:C0:E4:50:FB:65:1D:34:BB:73:00:09:7B:78:BE:88:5C:A7:6C:42:23:46:9B:92:A1:59:A7:6E`.
|
||||
|
||||
## For power users: the command line
|
||||
|
||||
The **command-line version** (Python 3.11 or newer) installs from the release's
|
||||
`frameport-<version>-py3-none-any.whl` with `uv tool install <link>` (or pipx or pip).
|
||||
|
||||
Everything the app does is also a `frameport` command; `frameport --help` and `frameport <command> --help` list every
|
||||
option. The main ones:
|
||||
|
||||
| Command | What it does |
|
||||
|---|---|
|
||||
| `scan <folder>` / `list` / `show <game>` | add games, list the library, show a game's patches |
|
||||
| `add-linux <path> [--exe <program>]` | add a Linux app (AppImage, folder or archive) |
|
||||
| `recipe <game> --enable/--disable <patch>` | change a game's patches (`patches` lists them all) |
|
||||
| `build <game>` / `install <game>` / `test <game>` | build, install on the Frame (`--to pc` for this PC), launch test |
|
||||
| `frame discover` / `frame connect` / `frame info` | find, connect to and describe the Frame |
|
||||
| `frame send <files> --dest videos` / `frame storage` / `frame cleanup` | copy files to the Frame, list where they can go, free space |
|
||||
| `frame drives` / `frame move <game> --to <drive>` / `install --dest <drive>` | list the Frame's drives, move a game, install to a drive |
|
||||
| `tools status` / `tools install` | the tools FramePort downloads |
|
||||
| `open-link "<link>"` | install from an install button's address or a download link (`--yes`, `--no-install`) |
|
||||
| `diag report <game>` / `share-recipe <game>` | report a problem / share a working recipe |
|
||||
| `update` | update FramePort (`--check` only checks: exit code 10 = update available) |
|
||||
| `uninstall-app` | uninstall FramePort |
|
||||
|
||||
Exit codes: 0 done, 1 failed, 2 wrong usage. `FRAMEPORT_DEBUG=1` shows full error details;
|
||||
`FRAMEPORT_NO_UPDATE_CHECK=1` turns update checks off.
|
||||
@@ -1,4 +1,4 @@
|
||||
# "Install with FramePort" button
|
||||
# Install button
|
||||
|
||||
A button for web pages and READMEs that opens a game straight in FramePort. Clicking it hands FramePort an install
|
||||
link; FramePort shows what it would download and asks before it does anything (see
|
||||
@@ -15,8 +15,8 @@ All files are in [`docs/badges/`](badges/). Each SVG is self-contained (no exter
|
||||
| File | Use it for |
|
||||
|---|---|
|
||||
| [`install-with-frameport.svg`](badges/install-with-frameport.svg) | Everywhere. No motion. |
|
||||
| [`install-with-frameport-animated.svg`](badges/install-with-frameport-animated.svg) | GitHub READMEs and other pages that only allow images. The glow plays by itself every 6 seconds: blue swells from the left, the portal between "Frame" and "Port" flares, then orange swells on the right. |
|
||||
| [`install-with-frameport-hover.svg`](badges/install-with-frameport-hover.svg) | Websites where you can paste HTML. The glow brightens and the middle portal lights up while the pointer is on the button. It only reacts to the mouse when the SVG code is placed in the page itself (see below). |
|
||||
| [`install-with-frameport-animated.svg`](badges/install-with-frameport-animated.svg) | GitHub READMEs and other pages that only allow images. The glow plays by itself every 6 seconds. |
|
||||
| [`install-with-frameport-hover.svg`](badges/install-with-frameport-hover.svg) | Websites where you can paste HTML. It glows while the pointer is on it, but only when its SVG code is in the page itself (see below). |
|
||||
| [`install-with-frameport@2x.png`](badges/install-with-frameport@2x.png) | Places without SVG support (some forums, email). 432 × 120; show it at 216 × 60. |
|
||||
|
||||
Both animated versions stop moving for visitors who turn on reduced motion in their system settings.
|
||||
@@ -81,8 +81,7 @@ FrameDrop's install page, which opens `framedrop://` links (FramePort opens thos
|
||||
[](https://framedropvr.com/install?manifest=https%3A%2F%2Fexample.com%2Fmy-game.json)
|
||||
```
|
||||
|
||||
Use the animated or still SVG; the hover version doesn't react inside a README, because GitHub shows SVGs as
|
||||
images.
|
||||
Use the animated or still SVG: GitHub shows SVGs as images, so the hover version doesn't react there.
|
||||
|
||||
## If a visitor doesn't have FramePort
|
||||
|
||||
|
||||
+72
-52
@@ -1,6 +1,6 @@
|
||||
# Porting playbook: symptom → cause → fix
|
||||
# Porting playbook
|
||||
|
||||
Everything here was hit while porting Quest and Rift games to the Steam Frame (Sept–Oct 2026; 38 catalog recipes). The machine-readable
|
||||
Everything here was hit while porting Quest and Rift games to the Steam Frame (September–October 2026; 38 catalog recipes). The machine-readable
|
||||
version is `catalog/triage.yaml` (used by `frameport test` / the Job screen); keep both in sync.
|
||||
|
||||
## Fast path for a new game
|
||||
@@ -8,13 +8,13 @@ version is `catalog/triage.yaml` (used by `frameport test` / the Job screen); ke
|
||||
2. `frameport build <pkg>` → all static checks must pass (32-bit-only → stop, it can't run).
|
||||
3. `frameport install <pkg>` → `frameport test <pkg>`: want **RUNNING** + "Submitting frames" at ~72 fps.
|
||||
4. Put the headset on and look. Headless tests can't judge visuals (no FOCUSED state without the headset worn).
|
||||
5. Fix by symptom below, rebuild, repeat. When it's good: **Save as known-good** (GUI) / add a catalog YAML.
|
||||
5. Fix by symptom below, rebuild, repeat. When it's good: **Save as known-good** (GUI) or add a catalog YAML.
|
||||
|
||||
## Startup failures (visible in launch.log)
|
||||
| Symptom | Cause | Fix |
|
||||
|---|---|---|
|
||||
| A launch test suggests a fix (e.g. triage `sdl-no-clipboard` → `frame.sdl_clipboard`) but the game page doesn't show it / lists it as not applicable; or a game added long ago lacks warnings newer ones get (Android version, web wrapper, missing OBB) (GitHub #104, Dramatic Shape) | the library entry was analysed by an older FramePort: the analysis field the patch reads (`sdl_java`, `min_sdk`, `web_wrapper`, `expects_obb`, …) is missing, so `applies()` is false | entries whose `analysis.extra.analysis_version` is below `detect.ANALYSIS_VERSION` are analysed again at the GUI's start (background) and before a build (`pipeline.refresh_analyses`); by hand: game menu → "Analyze again", then Update on Frame. An unreadable APK is marked `analysis_failed` (retried after the next version bump). Adding an analysis field: bump `ANALYSIS_VERSION` |
|
||||
| One eye (usually the right) shimmers or jitters in the 3D view while menus and panels look steady; pacing is clean (GitHub #69, e.g. RTCWQuest, Moss) | Valve's eye-tracked foveation layer (`VALVE_fdm_injection`) moves its low-density regions with each eye's gaze, and the right eye's gaze filter restarts often (`CEyePoseUKF R: Large dt … Bootstrapped` in `~/.local/share/Steam/logs/eyetracking.txt`) | Customize → "Eye-tracked foveation (Valve)" (`device.foveation`): **Fixed** (`FDM_DEBUG=disable_offsets`, keeps the GPU saving) or **Off** (`VK_INSTANCE_LAYERS=""`); catalog field `foveation:` |
|
||||
| A launch test suggests a patch (for example triage `sdl-no-clipboard` → `frame.sdl_clipboard`) but the game page doesn't show it / lists it as not applicable; or a game added long ago lacks warnings newer ones get (Android version, web wrapper, missing OBB) (GitHub #104, Dramatic Shape) | the library entry was analyzed by an older FramePort: the analysis field the patch reads (`sdl_java`, `min_sdk`, `web_wrapper`, `expects_obb`, …) is missing, so `applies()` is false | entries whose `analysis.extra.analysis_version` is below `detect.ANALYSIS_VERSION` are analyzed again at the GUI's start (background) and before a build (`pipeline.refresh_analyses`); by hand: game menu → "Analyze again", then Update on Frame. An unreadable APK is marked `analysis_failed` (retried after the next version bump). Adding an analysis field: bump `ANALYSIS_VERSION` |
|
||||
| One eye (usually the right) shimmers or jitters in the 3D view while menus and panels look steady; pacing is clean (GitHub #69, for example RTCWQuest, Moss) | Valve's eye-tracked foveation layer (`VALVE_fdm_injection`) moves its low-density regions with each eye's gaze, and the right eye's gaze filter restarts often (`CEyePoseUKF R: Large dt … Bootstrapped` in `~/.local/share/Steam/logs/eyetracking.txt`) | Customize → "Eye-tracked foveation (Valve)" (`device.foveation`): **Fixed** (`FDM_DEBUG=disable_offsets`, keeps the GPU saving) or **Off** (`VK_INSTANCE_LAYERS=""`); catalog field `foveation:` |
|
||||
| A Unity OpenXR game closes right after the OpenXR instance is created: `F VrApiLoader: vrapi_SetPropertyInt was called before vrapi_Initialize()!`, SIGABRT on UnityMain (GitHub #62, Jurassic World Aftermath) | the APK still ships Meta's VrApi loader; OVRPlugin (1.89, on OpenXR) calls it without starting VrApi and Meta's loader aborts. The VrApi bridge can't replace it (39 of the loader's 114 functions: OVRPlugin wouldn't link) | `frame.vrapi_stub` (same exports, each returns 0); triage `vrapi-before-init` |
|
||||
| A VrApi game exits at once: `UnsatisfiedLinkError … dlopen failed: cannot locate symbol "vrapi_PollEvent"` (GitHub #57, BlazeRush) | the engine imports a VrApi function the VrApi bridge didn't implement | the bridge has `vrapi_PollEvent`, `RecenterPose`, `SetDisplayRefreshRate`, `GetSystemPropertyFloatArray` (rebuild the game); the static check "VrApi functions resolvable" names any other missing one; triage `vrapi-symbol-missing` |
|
||||
| A Team Beef port (Lambda1VR, RTCWQuest, …) exits at once: `UnsatisfiedLinkError: dlopen failed: library "libopenxr_loader_valve.so" not found` (GitHub #59) | TBXR loads `openxr_loader_<Build.MANUFACTURER>` (Lepton: valve) and takes the Meta path only when `strstr(OPENXR_HMD, "meta")` matches, else Pico's | `frame.tbxr_vendor` (empty `libopenxr_loader_valve.so` + the "meta" literal → "alve"). Game data (`xash/`, …) goes to /sdcard: upload it with the Files tab to the game's storage. Black eyes with `TBXR: Incomplete frame buffer object: GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE`: TBXR always uses multisampled render-to-texture (even `--msaa 1`); `frame.tbxr_vendor` links the GL shim, which hands it single-sampled versions (log `GL shim: multisampled render-to-texture … drawn single-sampled`) |
|
||||
@@ -22,32 +22,33 @@ version is `catalog/triage.yaml` (used by `frameport test` / the Job screen); ke
|
||||
| `cannot locate symbol "ovrPeerConnectionState_ToString"` (or another `ovr<Enum>_ToString`) at start (BlazeRush, GitHub #57) | OVRPort's platform loader lacks several Platform SDK enum helpers | `frame.ovrstubs` now stubs them too; `*_ToString` stubs return "" (not NULL) |
|
||||
| Exits right after the OpenXR instance is created: `Failed to create XR session: -50` (`XR_ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING`, Lambda1VR) | the game skips `xrGet*GraphicsRequirementsKHR`; Meta's runtime tolerates it, SteamVR's doesn't. Lambda1VR's TBXR doesn't even enable `XR_KHR_opengl_es_enable` (only `XR_EXT_local_floor`) | FrameBridge adds `XR_KHR_opengl_es_enable` when an app enables no graphics API extension, asks for the requirements on the game's behalf and retries xrCreateSession once (logs `added XR_KHR_opengl_es_enable …`, `the app skipped …; asked for it`; every launch logs the final extension list `xrCreateInstance with N extension(s)`); triage `graphics-requirements-missing`. Verified headless: Lambda1VR runs at 72 fps |
|
||||
| Exits at start: `OVRAvatar-Loader: DisplayErrorAndExit: Failed to launch SystemActivities` after `ovrAvatar_Initialize: Failed to load AvatarSDK driver` (BlazeRush, GitHub #57) | Meta's avatar loader needs Horizon; it then tries Meta's error screen and aborts | `frame.avatar_stub` (same exports, do nothing); triage `avatar-driver-missing`. Games that ship the library but don't start avatars at launch (Lucky's Tale, BattleSisters, Arcsmith) don't need it |
|
||||
| Frame freezes or the game is killed (OOM) on the first controller vibration (e.g. Lucky's Tale's save slots, BattleSisters, Sniper Elite VR's tutorial grab: memory grows ~1 GB/s until the kill) | OVRPort runtimes up to 3.4.3-23204ea read the haptic envelope's duration (ns) as seconds and allocate gigabytes of samples (GitHub #9, ovrport/app#73); also reached from Unity's legacy `ovrp_SetControllerHaptics`; perf page faults all in `libopenxr_loader.so` `xrApplyHapticFeedback` | `adapter.haptic_fix` (envelope → one plain vibration in `native/xrshim`; PCM vibrations (`XrHapticPcmVibrationFB`) are converted the same way). Fixed in runtime 3.4.3-aa54c3f: builds made with it leave the workaround out by themselves (log "not needed: adapter.haptic_fix", `frameport show` "last build left out"); rebuild an older build to switch |
|
||||
| Frame freezes or the game is killed (OOM) on the first controller vibration (for example Lucky's Tale's save slots, BattleSisters, Sniper Elite VR's tutorial grab: memory grows ~1 GB/s until the kill) | OVRPort runtimes up to 3.4.3-23204ea read the haptic envelope's duration (ns) as seconds and allocate gigabytes of samples (GitHub #9, ovrport/app#73); also reached from Unity's legacy `ovrp_SetControllerHaptics`; perf page faults all in `libopenxr_loader.so` `xrApplyHapticFeedback` | `adapter.haptic_fix` (envelope → one plain vibration in `native/xrshim`; PCM vibrations (`XrHapticPcmVibrationFB`) are converted the same way). Fixed in runtime 3.4.3-aa54c3f: builds made with it leave the workaround out by themselves (log "not needed: adapter.haptic_fix", `frameport show` "last build left out"); rebuild an older build to switch |
|
||||
| Controller vibrations much stronger than on a Quest (The Boys VR, Jurassic World, BONELAB, …) | OVRPlugin games send amplitude envelopes; `haptic_fix` turned each into one vibration at the envelope's *peak* for its whole duration (a short fading pulse became a long full-strength buzz) | `haptic_fix` now uses the envelope's RMS; Game settings → "Vibration strength" (`haptic_scale`, 0-1) scales every vibration in FrameBridge; launch.log shows the first requests (`haptic: …`). OVRPlugin stops a vibration with amplitude 0 (2 s duration): FrameBridge turns that into xrStopHapticFeedback (without it the last buzz ran its full 2 s) |
|
||||
| Play or a launch test fails at once: `Game files missing at <path> (storage not mounted?)` in launch.log, or "… files are on a drive that isn't inserted" (GitHub #90) | the game was installed or moved to a microSD card (`<mount>/FramePort/<pkg>`) that isn't inserted or mounted now | insert the card; or move the game back (game menu → Move to…, `frameport frame move <pkg> --to internal`) once the card is back. `frameport frame drives` shows what the agent sees (exFAT/NTFS cards are refused: format in SteamOS) |
|
||||
| A Linux app started from Desktop Mode's menu closes after ~2 s, or opens on the wrong display (GitHub #84) | its launcher predates agent v63: the "Steam parent gone" watchdog ended it when Plasma's launcher exited, and it took gamescope's DISPLAY from Steam | connect FramePort once (agent v63's `upgrade_launchers` adds the `FRAMEPORT_DESKTOP` checks; the menu entry runs `env FRAMEPORT_DESKTOP=1 <anchor>/launch.sh`). Game Mode controller problems in such apps are Steam Input's (a separate issue) |
|
||||
| A Linux app (AppImage) shows no/FramePort's placeholder icon in Desktop Mode or Steam (GitHub #99) | before agent v64 only FramePort's art set's icon was used, and a lone AppImage has no store art | connect FramePort once (agent v64 copies the app's `.DirIcon` / `.desktop` `Icon=` to `<anchor>/artwork/app-icon.*` and refreshes the menu entry); reinstall to also get it into the library + Steam shortcut. Still the placeholder: check `<base>/app/squashfs-root/.DirIcon` and the `.desktop` file's `Icon=` (an icon outside the app folder or only an XPM isn't used); a chosen icon (`artwork/.icon-source` = `custom`) always wins |
|
||||
| Every game suddenly fails to start: `crun: create keyring …: Disk quota exceeded`, `is not a running context` | rootless podman leaked a kernel keyring per launch; 200-key quota exhausted | `keyring = false` in `~/.config/containers/containers.conf` (FramePort agent does it), then reboot the Frame once |
|
||||
| A Unity app's text field shows a caret for a moment and loses focus; no keyboard appears (e.g. Stremio VR login) | Unity's TMP_InputField/InputField wait for Android's on-screen keyboard and close themselves without one (Lepton has none); headless VR apps also have no focused Android window, so no key press reaches them | `frame.unity_text_input` (Cpp2IL finds `TouchScreenKeyboardShouldBeUsed`/`isKeyboardUsingEvents`, rewritten to false/true) + `device.text_input_window` (lepton-show-flatscreen: Steam's keyboard and Type on Frame work) |
|
||||
| A Unity app's text field shows a caret for a moment and loses focus; no keyboard appears (for example Stremio VR login) | Unity's TMP_InputField/InputField wait for Android's on-screen keyboard and close themselves without one (Lepton has none); headless VR apps also have no focused Android window, so no key press reaches them | `frame.unity_text_input` (Cpp2IL finds `TouchScreenKeyboardShouldBeUsed`/`isKeyboardUsingEvents`, rewritten to false/true) + `device.text_input_window` (lepton-show-flatscreen: Steam's keyboard and Type on Frame work) |
|
||||
| Play gives Steam's "Game configuration unavailable"; Steam's console_log: `GameAction [AppID <id>] … RequestingLicense → UpdatingAppInfo → LaunchApp failed with AppError_9` | this Frame's Steam never loaded FramePort's shortcuts.vdf entry (it treats the id as a store app); cause unknown (GitHub #21/#30) | automatic since agent v43: Play registers the game through Steam's devkit interface ("Devkit Game: …", `devkit_register`) and starts that; uninstall removes it. Agent v58: a devkit entry Steam forgot after a restart is added again live on Play (no NOT_IN_LIBRARY → no Steam restart), and installs/art updates of devkit games only copy art (no Steam restart, GitHub #41) |
|
||||
| Steam's Exit game leaves the game running (container `lepton-steamlaunch-<appid>` still up) | Steam stopped only its `reaper`; launch.sh and Lepton (setsid) never got a signal (GitHub #36) | agent v44: launch.sh's 2 s loop ends the game when its parent is gone (`upgrade_launchers` adds it to existing launchers); by hand: `podman kill lepton-steamlaunch-<appid>` |
|
||||
| Black screen at start while audio/ExoPlayer runs; log `xrEndFrame: dropped N unusable layer(s)`, a quad layer with swapchain 0x0 (e.g. I Am Monkey's intro video) | The game plays video into an Android-surface swapchain (XR_KHR_android_surface_swapchain); the Frame's runtime lists the extension but returns FUNCTION_UNSUPPORTED | adapter `surface_emul` (default on): FrameBridge gives the player a SurfaceTexture-backed Surface and copies each frame into an ordinary swapchain (log `surface_emul: …`) |
|
||||
| The game quits right after start: `Something failed to initialize. Quitting!` / `We don't have write permission to …/files/cloud/data` (e.g. SUPERHOT) | The game created a save folder with mode 1700; inside Lepton the app writes through the folder's group | launch.sh `fix_perms` adds owner + group write to every folder in the game's storage (agent 41); reinstall to get the new launcher |
|
||||
| The whole Frame slows to a halt, then the game is killed (`Out of memory: Killed process … anon-rss:10+ GB`), e.g. Lucky's Tale | The game's own memory grows ~1 GB/s on Unity's `Loading.PreloadManager` thread (perf page-fault profile); not the flat window, not the text-input patches | none yet: mark unsupported; profile with `perf record -p <pid> -e page-faults --call-graph fp` (works as steamos, `perf_event_paranoid` 2) |
|
||||
| Black screen at start while audio/ExoPlayer runs; log `xrEndFrame: dropped N unusable layer(s)`, a quad layer with swapchain 0x0 (for example I Am Monkey's intro video) | The game plays video into an Android-surface swapchain (XR_KHR_android_surface_swapchain); the Frame's runtime lists the extension but returns FUNCTION_UNSUPPORTED | adapter `surface_emul` (default on): FrameBridge gives the player a SurfaceTexture-backed Surface and copies each frame into an ordinary swapchain (log `surface_emul: …`) |
|
||||
| The game quits right after start: `Something failed to initialize. Quitting!` / `We don't have write permission to …/files/cloud/data` (for example SUPERHOT) | The game created a save folder with mode 1700; inside Lepton the app writes through the folder's group | launch.sh `fix_perms` adds owner + group write to every folder in the game's storage (agent 41); reinstall to get the new launcher |
|
||||
| The whole Frame slows to a halt, then the game is killed (`Out of memory: Killed process … anon-rss:10+ GB`), for example Lucky's Tale | The game's own memory grows ~1 GB/s on Unity's `Loading.PreloadManager` thread (perf page-fault profile); not the flat window, not the text-input patches | none yet: mark unsupported; profile with `perf record -p <pid> -e page-faults --call-graph fp` (works as steamos, `perf_event_paranoid` 2) |
|
||||
| A Linux app exits at once: `cannot execute binary file: Exec format error` in launch.log | an x86_64 program started directly (installed before FramePort ran x86 builds through FEX, or by hand) | reinstall it: x86_64 Linux apps install FEX on the Frame and start through it (agent v61, `kind: linux_x86`; FEX also needs `STEAM_COMPAT_DATA_PATH`: "No compat data path?" in launch.log = an agent v60 launcher, reinstall); triage `linux-x86-no-fex`. Prefer an arm64 build when the app offers one |
|
||||
| `APP_ACTIVITY is empty`, nothing starts | Manifest has category INFO only; Lepton needs LAUNCHER | `frame.launcher` (automatic) |
|
||||
| PC VR game on the Frame shows as a flat window / Revive: `Unable to load LibOVRRT DLL` / `LoaderInstance::CreateInstance chained CreateInstance call failed` | Frame SteamVR runtime rejects OpenXR apiVersion 1.1 (`XR_ERROR_API_VERSION_UNSUPPORTED`), which Proton 11's VR helper requests | `pcvr.xr_timefix` (Frame OpenXR layer, default on): retries xrCreateInstance as 1.0 |
|
||||
| Unreal PC VR game on the Frame runs as a flat window although OpenXR works (no `LogHMD` OVRPlugin lines; Unreal logs nothing when it skips the Oculus plugin) / launch.log: `FramePort oculushmd: could not create the OculusHMDConnected event` | UE's OculusHMD (and LibOVR's `ovr_Detect`) only start when the Windows event `OculusHMDConnected` exists and is signalled; on a PC the Oculus service creates it. Revive hooks `OpenEventW` for it, but that relies on Detours patching Wine's (ARM64EC) kernelbase | `pcvr.oculus_unreal` (default for Unreal Rift games; PC VR counterpart of overport's `patch_oculus_unreal`): launch.sh runs the injector through `fp_oculushmd.exe`, which provides the real event until the game exits |
|
||||
| PC VR game runs as a flat 2D window (no VR) | SteamVR was not running, so Revive/LibOVR had no runtime to bind to | FramePort now auto-starts SteamVR on Play; make sure your headset/SteamVR come up before the game |
|
||||
| Unreal PC VR game on the Frame runs as a flat window although OpenXR works (no `LogHMD` OVRPlugin lines; Unreal logs nothing when it skips the Oculus plugin) / launch.log: `FramePort oculushmd: could not create the OculusHMDConnected event` | UE's OculusHMD (and LibOVR's `ovr_Detect`) only start when the Windows event `OculusHMDConnected` exists and is signaled; on a PC the Oculus service creates it. Revive hooks `OpenEventW` for it, but that relies on Detours patching Wine's (ARM64EC) kernelbase | `pcvr.oculus_unreal` (default for Unreal Rift games; PC VR counterpart of overport's `patch_oculus_unreal`): launch.sh runs the injector through `fp_oculushmd.exe`, which provides the real event until the game exits |
|
||||
| PC VR game runs as a flat 2D window (no VR) | SteamVR was not running, so Revive/LibOVR had no runtime to bind to | FramePort now auto-starts SteamVR on Play; make sure SteamVR comes up before the game |
|
||||
| PC VR game crashed launching via Steam on the OpenXR backend | Revive's newer OpenXR backend was less reliable | PC now defaults to Revive's OpenVR (SteamVR) backend; reinstall to apply |
|
||||
| Oculus PC VR game: `Unable to load LibOVRRT DLL` / `-3001` on the Frame | The game can't find a VR runtime (Revive's LoadLibrary hook doesn't work under Proton-arm64) | `pcvr.libovr_redirect` (default on) symlinks Revive's runtime as `LibOVRRT{64,32}_1.dll` in the exe dir — pure substitution; a build that checks the runtime signature then hits `-3021` (not bypassed) |
|
||||
| Oculus Rift game won't run on the Steam Frame | Oculus/LibOVR game: needs Revive, whose hooks don't work under Proton-arm64, and FramePort won't defeat the Oculus runtime signature check | Play it on this PC (SteamVR + Revive). Only OpenVR/OpenXR-native Rift games run on the Frame |
|
||||
| Oculus Rift game won't run on the Frame | Oculus/LibOVR game: needs Revive, whose hooks don't work under Proton-arm64, and FramePort won't defeat the Oculus runtime signature check | Play it on this PC (SteamVR + Revive). Only OpenVR/OpenXR-native Rift games run on the Frame |
|
||||
| Un-cracked Oculus PC VR game: "Initializing OVR session" then exits / signature check on the runtime | Revive's hooks don't install on Proton-arm64; the Oculus shim rejects the unsigned Revive runtime | Not runnable on the Frame without the repack's crack extracted (not done by FramePort); use the PC version |
|
||||
| PC VR game: `Failed to initialize Oculus API (-3001)` / `Unable to load LibOVRRT DLL` | Revive's LoadLibrary hook doesn't work under Proton arm64 (ARM64EC kernelbase); the game's LibOVR shim finds no runtime DLL | Symlink `LibOVRRT64_1.dll` → Revive's DLL in the prefix's system32 (manual so far) → then -3021 (runtime signature check; open) |
|
||||
| Uploads to the Frame are slow (~15 MB/s) | PC and Frame both on Wi-Fi through the home router | Connect the PC to the Frame's own hotspot (or a USB cable): FramePort uses the direct link automatically (~80-100 MB/s); job log line "Transfer link" |
|
||||
| PC VR game exits right away: `Unhandled Exception: 0xc06d007e` (after `FOnlineSubsystemOculus::InitWithWindowsPlatform`) | Delay-loaded `LibOVRPlatform64_1.dll` (Oculus Platform SDK, installed with the Oculus app) is missing | None on the Frame (entitlement check; FramePort doesn't replace it). PC mode with the Oculus app |
|
||||
| Unity PC VR game (Oculus + SteamVR build: `OVRPlugin.dll` and `openvr_api.dll` in `<Name>_Data/Plugins`) opens a window and quits after ~20 s; no VR Vulkan instance after the game's DXVK device in launch.log; Unity log (`unity log … Player.log`, agent v67): `OpenVR failed initialization` / `Initialization of device … failed` | Unity's built-in VR tries its SDKs in list order (Oculus first) unless `-vrmode` picks one; a catalog recipe verified with another build of the game (for example SUPERHOT VR's OpenXR build, GitHub #105) used to drop the build's own arguments | `pcvr.launch_args` = `-vrmode OpenVR` (detected for such builds; kept when the catalog's `xr` differs from the build's). A game's Electron launcher next to it (SHVR.exe) is ranked below the game |
|
||||
| Unreal PC VR game opens the crash reporter instead of closing | UE starts CrashReportClient.exe on a crash | `pcvr.no_crash_reporter` (default for Unreal Rift games): `-nocrashreports` + CrashReportClient.exe renamed `.disabled` in the Frame copy |
|
||||
| A backup's game was added without its data (library `data_dir` null, `data_bytes` 0) although the folder has .obb files | The OBBs sit in a layout the scan didn't know: `<game>/obb/<package>/`, `Android/obb/<package>/`, or SideQuest-style `<game>/apk/x.apk` + `<game>/obb/<package>/` | `sources/quest_dump.find_data_dir` finds a `<package>` folder with .obb files ≤3 levels below the APK's folder or ≤2 below its parent (skipping neighbouring folders with APKs: other games); an `apk`/`apks` folder counts as part of its game folder. Add the folder again (Analyze again doesn't look for data) |
|
||||
| A backup's game was added without its data (library `data_dir` null, `data_bytes` 0) although the folder has .obb files | The OBBs sit in a layout the scan didn't know: `<game>/obb/<package>/`, `Android/obb/<package>/`, or SideQuest-style `<game>/apk/x.apk` + `<game>/obb/<package>/` | `sources/quest_dump.find_data_dir` finds a `<package>` folder with .obb files ≤3 levels below the APK's folder or ≤2 below its parent (skipping neighboring folders with APKs: other games); an `apk`/`apks` folder counts as part of its game folder. Add the folder again (Analyze again doesn't look for data) |
|
||||
| Game hangs at start / never loads although its .obb files are right there: next to the APK, in an `obb` folder beside an `apk` folder inside a `<package>` folder, or a SideQuest backup (`<timestamp>_<versionCode>.apk`) (GitHub #85, #91) | No folder named after the package, so the folder-layout checks found nothing and no OBB was uploaded | `quest_dump.find_data` then looks for the files by name, `(main\|patch).<versionCode>.<package>.obb` (any case), in the APK's folder, its parent and up to 3 levels below each (folders with their own APKs are other games); prefers the folder and files of the APK's own versionCode, else the newest older, else any version. When that folder also holds other things (the APK itself, other games' OBBs), the library entry gets `data_files` and only those files are uploaded, counted and deleted with the game. Add the folder again |
|
||||
| Unreal game: `JNI_OnLoad` (OVRPlugin), then silence: no OpenXR instance, no crash, no frames (GitHub #85 TRIANGLE STRATEGY; launch-test finding `missing-obb`) | Installed without its OBB: the manifest says `com.epicgames.ue4.GameActivity.bHasOBBFiles` = true (UE5: `com.epicgames.unreal.…`) but the library has no data folder (`data_dir` null, `data_bytes` 0) | Put the .obb files in a `<package>` (or `obb/`) folder next to the APK, add the folder again, reinstall. Analysis `extra.expects_obb`; the game page, the install question and `frameport scan`/`install` warn; launch tests that sent no frames get the `missing-obb` finding from the library (the game logs nothing). Unity split-binary builds count too (`extra.unity_split`, `analysis/unity_split.py`): an XR-plugin build (Oculus XR Plugin / Unity OpenXR library) without `assets/bin/Data/UnitySubsystems/` in the APK, or BuildSettings listing more scenes than the APK has `levelN` files (globalgamemanagers loose or read from the head of data.unity3d); exact on the 48 Unity APKs of the dumps (13 split, 17 full games; OBBs of full builds are asset bundles or sound banks) |
|
||||
| `INSTALL_FAILED_NO_MATCHING_ABIS` | 32-bit-only APK; Frame has no AArch32 | None. PC/Rift version via Revive |
|
||||
@@ -55,59 +56,78 @@ version is `catalog/triage.yaml` (used by `frameport test` / the Job screen); ke
|
||||
| Nothing opens; `TWALauncherActivity: Using URL from Manifest (https://…)`, `Creating TwaLauncher for com.oculus.browser`, `NameNotFoundException: com.oculus.browser` (GitHub #86 Mahjong Table VR, triage `web-wrapper`) | The APK is a Trusted Web Activity (Bubblewrap / Meta's PWA packaging): a website that opens in Meta's browser, which Lepton doesn't have | None: open the URL in a browser. Analysis `extra.web_wrapper` (manifest meta-data `android.support.customtabs.trusted.DEFAULT_URL`, resolved through resources.arsc, or androidbrowserhelper's LauncherActivity) → a warning with the URL (not unsupported: the manifest alone never decides) |
|
||||
| `UnsatisfiedLinkError` / `cannot locate symbol "ovr_…"` | overport's platform loader lacks Meta platform functions | `frame.ovrstubs` (automatic, generated stubs) |
|
||||
| missing `ovrMessageType_ToString` | same, but the game needs a real string | `frame.ovrplatformcompat` (automatic) |
|
||||
| The game stays in its built-in language or waits at start although its OBB / files hold language packs (`<tag>.lang`, e.g. `de.lang`) | overport's platform loader answers `ovr_LanguagePack_GetCurrent/SetCurrent` with request id 0, so the game never gets the pack's path | `frame.langpacks` (opt-in, experimental, shown for games whose data has `*.lang`; `native/langpack`, build it with `python native/build.py --only langpack`). Default pack: the one the game applies, else env `FRAMEPORT_LANGPACK=<tag>`, else the only pack; search path override `FRAMEPORT_LANGPACK_DIRS`. Unreal games (Deadpool VR) grey out a pack whose asset `Metadata` differs from the game's version string: the patch writes the APK's versionName as Metadata (env `FRAMEPORT_LANGPACK_META` overrides) and reports the pack under the `/storage/emulated/0/Android/obb/<pkg>/` spelling of its path; with `/sdcard/…` the text switched but the dialogue stayed silent (verified in the headset with Deadpool VR) |
|
||||
| The game stays in its built-in language or waits at start although its OBB / files hold language packs (`<tag>.lang`, for example `de.lang`) | overport's platform loader answers `ovr_LanguagePack_GetCurrent/SetCurrent` with request id 0, so the game never gets the pack's path | `frame.langpacks` (opt-in, experimental, shown for games whose data has `*.lang`; `native/langpack`, build it with `python native/build.py --only langpack`). Default pack: the one the game applies, else env `FRAMEPORT_LANGPACK=<tag>`, else the only pack; search path override `FRAMEPORT_LANGPACK_DIRS`. Unreal games (Deadpool VR) gray out a pack whose asset `Metadata` differs from the game's version string: the patch writes the APK's versionName as Metadata (env `FRAMEPORT_LANGPACK_META` overrides) and reports the pack under the `/storage/emulated/0/Android/obb/<pkg>/` spelling of its path; with `/sdcard/…` the text switched but the dialogue stayed silent (verified in the headset with Deadpool VR) |
|
||||
| `ClassNotFoundException com.oculus.os.AnalyticsEvent` → abort | Quest telemetry lookup in Meta XR Audio (Unreal build) or native code | `frame.metaxr_telemetry` + `frame.oculusos` (automatic) |
|
||||
| `JNI DETECTED ERROR`, `GetStringUTFChars … NULL` | CheckJNI is on because overport marks the app debuggable | `frame.nodebug` |
|
||||
| Unreal game quits a few seconds after start (`System.exit`) | ForceQuit after a failed Quest platform check | alternate build with `patch_remove_unreal_force_quit` (`use_alt`) |
|
||||
| Unreal game crashes a few seconds after the logo with no backtrace (Unreal's own signal handler hides it: logcat-crash.log empty, Zygote `exited due to signal 11`); the crashing thread is `GameThread`, pc in `libaaudio.so`, lr `libovrplatformloader.so (ovr_Microphone_GetOutputBufferMaxSize+0x10)`; the last platform call is `ovr_Microphone_Create` (e.g. The Walking Dead: Saints & Sinners Ch. 2) | OVRPort's platform loader opens the microphone's AAudio stream only in `ovr_Microphone_Start`, but `GetOutputBufferMaxSize` reads that stream unchecked; Unreal's Oculus voice asks for the size right after `Create` | `frame.ovr_microphone` (NULL check rewritten in place; size 0 until the microphone starts). OVRPort runtime 3.4.3-aa54c3f has the check itself: builds made with it leave the patch out (log "not needed: frame.ovr_microphone", `patches/upstream.py`) |
|
||||
| Unreal game crashes a few seconds after the logo with no backtrace (Unreal's own signal handler hides it: logcat-crash.log empty, Zygote `exited due to signal 11`); the crashing thread is `GameThread`, pc in `libaaudio.so`, lr `libovrplatformloader.so (ovr_Microphone_GetOutputBufferMaxSize+0x10)`; the last platform call is `ovr_Microphone_Create` (for example The Walking Dead: Saints & Sinners Ch. 2) | OVRPort's platform loader opens the microphone's AAudio stream only in `ovr_Microphone_Start`, but `GetOutputBufferMaxSize` reads that stream unchecked; Unreal's Oculus voice asks for the size right after `Create` | `frame.ovr_microphone` (NULL check rewritten in place; size 0 until the microphone starts). OVRPort runtime 3.4.3-aa54c3f has the check itself: builds made with it leave the patch out (log "not needed: frame.ovr_microphone", `patches/upstream.py`) |
|
||||
| `xrCreateSwapchain` -26 / format unsupported (GLES) | Frame takes only sRGB formats, no MSAA | adapter `swapchain_fix` (default on) |
|
||||
| Frames rejected, "Waiting…" forever | a layer uses a failed swapchain or an extension that isn't enabled (e.g. equirect2) | adapter `layer_fix` (default on) |
|
||||
| Frames rejected, "Waiting…" forever | a layer uses a failed swapchain or an extension that isn't enabled (for example equirect2) | adapter `layer_fix` (default on) |
|
||||
| `xrConvert…TimeKHR` FUNCTION_UNSUPPORTED spam; VrApi bridge stalls before recenter | runtime lacks timespec conversion | current adapter emulates it |
|
||||
| Crash on the first frame, backtrace `libVkLayer_fossilize.so` ← `FVulkanRenderPass::FVulkanRenderPass` (crash logcat) | the engine leaves the pNext of unused Vulkan attachment references uninitialized; Lepton always loads Steam's Fossilize layer (guest is userdebug, so even a non-debuggable APK gets it), which follows the pointer | `frame.vk_sanitize` (default on for Unreal; Vulkan shim `libfp_vk.so`; triage `fossilize-renderpass`), e.g. Deadpool VR |
|
||||
| SIGABRT right after start, backtrace `libopenxr_loader.so (xrCreateSwapchain+…)` | overport's dispatcher aborts on swapchains > 4096 px ("Wrong createInfo size"); video players use 7680×3840 theatre textures | `frame.swapchain_limit` (default on; guard → 16384 px; triage `swapchain-size-abort`), e.g. 4XVR |
|
||||
| Video/menu panel missing, log `dropped N unusable layer(s)` with cylinder (1000017000) or equirect2 (1000091000) layers | the Frame runtime lacks XR_KHR_composition_layer_cylinder/equirect(2)/cube (its SteamVR runtime only composites quad + projection layers) | adapter shows cylinders as flat strips (setting `cylinder_strips`, default on); 360° equirect layers (theatres, 360° videos): `adapter.equirect_emul` (GLES only, per game) |
|
||||
| 360° theatre / 360° video black or missing (e.g. 4XVR) | equirect layers dropped | `adapter.equirect_emul=1`: a worker thread with a shared GLES context converts each 360° image to a cube map when it changes and draws one adapter projection layer from it for every frame with exactly that frame's views; it replaces the 360° layers in place, so the game's own projection layer (balcony, controllers, 360° videos it draws itself) stays on top. Quads can't be used: the Frame draws quad layers above every projection layer whatever the order. Log: `first 360 view ready`, `in 5 s: N 360 image update(s) … M view redraw(s)`. Upside down / mirrored / behind you: `equirect_flip` 1/2/4 (`frameport settings <pkg> equirect_flip=1`, no rebuild). Never Vulkan (a Vulkan renderer hung the Frame's GPU in AC Nexus) |
|
||||
| Unity game hangs right after its first frames, no `pacing:` lines; SIGQUIT dump shows UnityMain in a game library's `JNI_OnLoad` → `usleep` (e.g. SKYBOX: `libskybox.so`, `SignatureChecker`) | the game checks its APK signing certificate; every port is re-signed | can't be fixed without defeating anti-tamper (FramePort doesn't): mark "Can't run". Diagnose hangs: `podman exec <container> kill -3 <pid>` writes all thread stacks to launch.log |
|
||||
| Video player doesn't list sent videos (e.g. 4XVR "Internal Storage" only shows some) | the player lists its own /sdcard folder (4XVR: /sdcard/4XPlayer), not /sdcard/Movies; Android's media index doesn't work in Lepton | GUI game page "Add videos" / "Add videos & files…" (Videos + the app's own folder, hard links) or `frameport frame send <files> --app <pkg>` |
|
||||
| One eye grey in a stereo video, log `xrCreateSwapchain … result=-10` | the runtime refused a swapchain (XR_ERROR_LIMIT_REACHED) | fewer/smaller swapchains: lower `equirect_res`; unresolved |
|
||||
| Menu/screen jumps to where you look (e.g. 4XVR) | the app re-creates LOCAL spaces (4XVR: every 2–4 s) and the Frame places them at the current head yaw, or the app recentres after the Frame's brief focus dips | turn on `adapter.layer_debug`, check `that LOCAL space sits at … deg` vs `focus_hold: hid a … ms focus dip`; fixes: `adapter.stable_local` (new LOCAL spaces line up with the first) / `adapter.focus_hold` (hides dips < 600 ms after 3 s focused; never at start-up: a global debounce broke AC Nexus) |
|
||||
| Crash on the first frame, backtrace `libVkLayer_fossilize.so` ← `FVulkanRenderPass::FVulkanRenderPass` (crash logcat) | the engine leaves the pNext of unused Vulkan attachment references uninitialized; Lepton always loads Steam's Fossilize layer (guest is userdebug, so even a non-debuggable APK gets it), which follows the pointer | `frame.vk_sanitize` (default on for Unreal; Vulkan shim `libfp_vk.so`; triage `fossilize-renderpass`), for example Deadpool VR |
|
||||
| SIGABRT right after start, backtrace `libopenxr_loader.so (xrCreateSwapchain+…)` | overport's dispatcher aborts on swapchains > 4096 px ("Wrong createInfo size"); video players use 7680×3840 theater textures | `frame.swapchain_limit` (default on; guard → 16384 px; triage `swapchain-size-abort`), for example 4XVR |
|
||||
| Video/menu panel missing, log `dropped N unusable layer(s)` with cylinder (1000017000) or equirect2 (1000091000) layers | the Frame runtime lacks XR_KHR_composition_layer_cylinder/equirect(2)/cube (its SteamVR runtime only composites quad + projection layers) | adapter shows cylinders as flat strips (setting `cylinder_strips`, default on); 360° equirect layers (theaters, 360° videos): `adapter.equirect_emul` (GLES only, per game) |
|
||||
| 360° theater / 360° video black or missing (for example 4XVR) | equirect layers dropped | `adapter.equirect_emul=1`: a worker thread with a shared GLES context converts each 360° image to a cube map when it changes and draws one adapter projection layer from it for every frame with exactly that frame's views; it replaces the 360° layers in place, so the game's own projection layer (balcony, controllers, 360° videos it draws itself) stays on top. Quads can't be used: the Frame draws quad layers above every projection layer whatever the order. Log: `first 360 view ready`, `in 5 s: N 360 image update(s) … M view redraw(s)`. Upside down / mirrored / behind you: `equirect_flip` 1/2/4 (`frameport settings <pkg> equirect_flip=1`, no rebuild). Never Vulkan (a Vulkan renderer hung the Frame's GPU in AC Nexus) |
|
||||
| Unity game hangs right after its first frames, no `pacing:` lines; SIGQUIT dump shows UnityMain in a game library's `JNI_OnLoad` → `usleep` (for example SKYBOX: `libskybox.so`, `SignatureChecker`) | the game checks its APK signing certificate; every port is re-signed | can't be fixed without defeating anti-tamper (FramePort doesn't): mark "Can't run". Diagnose hangs: `podman exec <container> kill -3 <pid>` writes all thread stacks to launch.log |
|
||||
| Video player doesn't list sent videos (for example 4XVR "Internal Storage" only shows some) | the player lists its own /sdcard folder (4XVR: /sdcard/4XPlayer), not /sdcard/Movies; Android's media index doesn't work in Lepton | game page "Add videos" / game menu "Add videos and files" (Videos + the app's own folder, hard links) or `frameport frame send <files> --app <pkg>` |
|
||||
| One eye gray in a stereo video, log `xrCreateSwapchain … result=-10` | the runtime refused a swapchain (XR_ERROR_LIMIT_REACHED) | fewer/smaller swapchains: lower `equirect_res`; unresolved |
|
||||
| Menu/screen jumps to where you look (for example 4XVR) | the app re-creates LOCAL spaces (4XVR: every 2–4 s) and the Frame places them at the current head yaw, or the app recenters after the Frame's brief focus dips | turn on `adapter.layer_debug`, check `that LOCAL space sits at … deg` vs `focus_hold: hid a … ms focus dip`; patches: `adapter.stable_local` (new LOCAL spaces line up with the first) / `adapter.focus_hold` (on by default: hides dips up to `focus_hold_ms` once the game has been focused for a second; never at start-up: a global debounce broke AC Nexus) |
|
||||
| Pointer misses menu items | the Frame's aim pose differs from Touch's | `adapter.layer_debug` logs `aim in grip … pitch/yaw`; correct with `aim_pitch`/`aim_yaw`/`aim_forward` (`frameport settings`, no rebuild) |
|
||||
| Video stutters although fps is steady | video frame rate doesn't divide the refresh rate (30 fps at 72 Hz) | `adapter.refresh_rate` (e.g. 90 for 30 fps, 72 for 24 fps); `layer_debug` logs the offered rates and the app's own requests |
|
||||
| PC VR game judders/stutters although the GPU keeps up; vrcompositor.txt "Timed out. N total" high or frames dropped | the game misses the headset's refresh (e.g. 96 Hz = 10.4 ms; Stormland's slow frames take 10.7 ms) | `pcvr.steamvr_tuning` (default on): next Play sets SteamVR per-app `preferredRefreshRate` + `motionSmoothingOverride` via `fp_vrsettings.exe` |
|
||||
| Quest app keeps recentering / snapping the view when you turn your head; log shows session state 5→4→3→4→5 within a second | the Frame briefly takes focus; the app recenters on focus changes | unfixed: hiding the dips (debounce) made AC Nexus stay black, so it was removed |
|
||||
| Video stutters although fps is steady | video frame rate doesn't divide the refresh rate (30 fps at 72 Hz) | `adapter.refresh_rate` (for example 90 for 30 fps, 72 for 24 fps); `layer_debug` logs the offered rates and the app's own requests |
|
||||
| PC VR game judders/stutters although the GPU keeps up; vrcompositor.txt "Timed out. N total" high or frames dropped | the game misses the headset's refresh (for example 96 Hz = 10.4 ms; Stormland's slow frames take 10.7 ms) | `pcvr.steamvr_tuning` (default on): next Play sets SteamVR per-app `preferredRefreshRate` + `motionSmoothingOverride` via `fp_vrsettings.exe` |
|
||||
| Quest app keeps recentering / snapping the view when you turn your head; log shows session state 5→4→3→4→5 within a second | the Frame briefly takes focus; the app recenters on focus changes | adapter `focus_hold` (on by default; an earlier global debounce made AC Nexus stay black and was removed) |
|
||||
| Video player / app finds no local videos; MediaProvider "Requested path /home/steamos/... doesn't appear under ..." | Lepton's /sdcard is a symlink to a host path, so Android's media index rejects every file | upload in the Files tab (Videos = /sdcard/Movies) and browse folders in the app |
|
||||
| Batman: Arkham Shadow closes during smoke-bomb effects; later input-tree corruption | Meta XR Audio Wwise deletes queued metadata still referenced by the current audio frame, then writes through the stale pointer | FrameBridge automatically retires metadata after current-frame references disappear, for the verified AArch64 SDK build only; see [AUDIO_METADATA.md](AUDIO_METADATA.md) |
|
||||
| Game stays on a loading or "Waiting" box although it reached FOCUSED; log `FrameBridge: xrEndFrame failed -25` then no more `pacing:` lines (e.g. PowerWash Simulator on some Frames, GitHub #39) | The eye image rect ends a few pixels past its swapchain (Unity rounds the swapchain width, the runtime's recommended size differs per Frame); SteamVR rejects every frame with XR_ERROR_SWAPCHAIN_RECT_INVALID | FrameBridge clamps every projection/quad image rect to its swapchain (`rect_clamp`, default on since 0.11.0; log `rect_clamp: view N image rect clamped`): rebuild + reinstall the game |
|
||||
| Game stays on a loading or "Waiting" box although it reached FOCUSED; log `FrameBridge: xrEndFrame failed -25` then no more `pacing:` lines (for example PowerWash Simulator on some Frames, GitHub #39) | The eye image rect ends a few pixels past its swapchain (Unity rounds the swapchain width, the runtime's recommended size differs per Frame); SteamVR rejects every frame with XR_ERROR_SWAPCHAIN_RECT_INVALID | FrameBridge clamps every projection/quad image rect to its swapchain (`rect_clamp`, default on since 0.11.0; log `rect_clamp: view N image rect clamped`): rebuild + reinstall the game |
|
||||
| Unity game (OVRPlugin, GLES) crashes ~10 s in: `FrameBridge: xrCreateSwapchain … faces=6 … result=-2`, OVRPlugin `CreateSwapchain for eye 0: 0x0, 0 stages`, then render-thread SIGSEGV in memset ← libOVRPlugin ← `ovrp_EndFrame4` (libgallium/ANR follow; for example Budget Cuts Ultimate, GitHub #107); triage `cube-swapchain-refused` | The game shows a cube-map layer (OVROverlay cubemap); the Frame's runtime has no cube layers and refuses cube swapchains (XR_ERROR_RUNTIME_FAILURE); OVRPlugin doesn't check and writes into the image list it never got | FrameBridge `cube_standin` (default on): a refused cube swapchain is served as a GL cube map in the game's context and its layers are dropped (log `cube_standin: runtime refused …`): rebuild + reinstall. GLES only; a Vulkan game keeps the error |
|
||||
| Game (Unity, GLES) freezes, `zink: DEVICE LOST` | multisampled render-to-texture hangs the GPU | `frame.unity_no_msaa`; if it persists: unfixable → PC version |
|
||||
| Unreal GLES game crashes ~3 s after start: `Fatal signal 11 … fault addr 0x10000 in tid … (RHIThread)`, `#01 … libgallium_dri.so` (GitHub #83 Star Wars Pinball VR, triage `unreal-msrtt-crash`) | Unreal's mobile MSAA renders through multisampled render-to-texture; Zink's `find_rp_state` then indexes `rendering_state_cache[6]` one past its end (sample count ≥ 32) and calls a junk hash function (0x10000). Mesa bug (no bounds check) | `frame.unreal_gl_shim` (GL shim with `gl_hide_msrtt`, multiview kept for Unreal: Unreal 4.25 only enables multiview with GL_OVR_multiview, GL_OVR_multiview2 **and** GL_OVR_multiview_multisampled_render_to_texture, so the shim keeps the last one visible for Unreal and maps glFramebufferTextureMultisampleMultiviewOVR to the single-sampled glFramebufferTextureMultiviewOVR; log `multiview multisampled render-to-texture (N samples) drawn single-sampled`) |
|
||||
| Crash with `SIGILL (ILL_ILLOPN)` and `*pc=0xd50323bf` (autiasp), e.g. on Unreal's HttpManager thread (GitHub #83 Star Wars Pinball VR, triage `pac-unpaired`) | The engine's OpenSSL ARMv8 assembly has autiasp without a matching paciasp (libUE4.so: 38 paciasp, 40 autiasp; Poly1305 NEON). Quest CPUs treat PAC hints as NOPs, the Frame's CPU checks them | `frame.pac_hints`: in a library with unpaired counts every paciasp/autiasp becomes a NOP (in place) |
|
||||
| Unreal game (OVRPlugin) never starts VR: launch.log has `OVRPlugin: JNI_OnLoad` but never `CompositorOpenXR::PreInitialize`, no OpenXR session, then a crash a few seconds in (e.g. Star Wars Pinball VR, UE 4.25: null pointer in `FSceneRenderer::GetMultiViewSceneColor`, GitHub #83) | Unreal's Oculus module looks up every `ovrp_*` function of the OVRPlugin it was built against (`InitializeOculusPluginWrapper`, all ANDed); OVRPort's OpenXR OVRPlugin lacks a few old ones (UE 4.25 / OVRPlugin 1.44: `ovrp_GetPTWNear`), so the wrapper fails and OculusHMD is never pre-initialised | `frame.unreal_ovrp_entrypoints` (suggested when analysis `unreal_ovrp_lookups` name functions the shipped OVRPlugin lacks): generated `libfp_ovrpstubs.so` (DT_NEEDED of libOVRPlugin.so; dlsym on the plugin's handle searches its dependencies) with a stand-in per missing name returning ovrpFailure (-1000); build note lists the names |
|
||||
| Only the Android home screen shows; the log has Unity's VR device as `None` (e.g. Accounting+, Unity 2017) | Unity 2017–2018 built-in Oculus support starts VR only when `com.oculus.systemactivities` is installed; Lepton has no Meta system apps, so Unity falls back to non-VR | `frame.unity_oculus_check`: that package name in libunity.so → `android`, plus `native/ovrpshim` (libfp_ovrp.so): Unity 2017's legacy frame loop (`ovrp_Update2`/`ovrp_BeginFrame`) never calls `ovrp_WaitToBeginFrame`, so without the shim no `xrWaitFrame` happens, `CompositorOpenXR::Update … outside of frame bounds` floods the log and the dashboard freezes. With it: log `ovrp frame loop shim: waited for frame N`, ~71 fps. Accounting+ then stops at "press any button" although its OVRInput gets clean input (`INPUT_PROBE` in the patch logs connected controllers/buttons/input focus per call) — unresolved |
|
||||
| Black flat window, then a GPU hang: kernel `hangcheck detected gpu lockup` (offending task the game), `zink: DEVICE LOST`, Unity render-thread crash; `outside of frame bounds` thousands of times a second (e.g. BattleSisters, Unity 2019.4) | Unity 2019 on its built-in VR (no `libOculusXRPlugin.so`) uses the same legacy frame loop as Unity 2017: no `xrWaitFrame`, the render thread floods the GPU | `frame.unity_oculus_check` adds the ovrpshim frame wait for these too (revision 2) |
|
||||
| Unity built-in VR game (with `frame.unity_oculus_check`) freezes at a scene switch: the log stops after `Boot: Activating Scene: …`, the process stays alive, every thread sleeps (e.g. Sniper Elite VR, Unity 2019.4) | The shim's `xrWaitFrame` blocks until the previously waited frame is begun; Unity skipped beginning it at the scene switch and its render thread then waited for the main thread (gdb: UnityMain in vrclient `CSxrSession::StartNextFrame` ← `ovrp_WaitToBeginFrame` ← `fpov_Update2`). OVRPlugin also only begins the frame index it waited for | `frame.unity_oculus_check` revision 5: libunity.so's `ovrp_BeginFrame`/`ovrp_EndFrame` go through the shim, which waits ≤ 50 ms for the last waited frame to begin, else skips the wait (log `the last waited frame wasn't begun`), and gives a begin/end of another index the waited one |
|
||||
| Unity built-in VR game: the hands/weapons trail the controllers by centimetres when moving (headset fine, 72 fps), e.g. Sniper Elite VR | Unity's physics-step `ovrp_Update2` (prediction 0) makes OVRPlugin locate the nodes at the monotonic clock's "now", the XrTime base on a Quest but 0.05–0.9 s behind the Frame's XrTime; the runtime extrapolates backwards and the render-step reads after it get those poses too. A larger prediction is capped by OVRPlugin (~0.07 s) | `frame.unity_oculus_check` revision 5 holds the physics-step update back: both steps read the render update's display-time poses |
|
||||
| Unreal game stuck on a loading image after the intro, frames keep coming (72 fps), no crash (e.g. Vader Immortal) | suspect: a Meta Platform SDK request no message ever answers | diagnostics: `frame.ovr_trace` (opt-in) logs every `ovr_*` call, the answers `ovr_PopMessage` returns and every 10 s the unanswered requests (`fp_ovrtrace` in launch.log). Never fake an entitlement answer |
|
||||
| Own-engine game crashes in `libVkLayer_fossilize.so` (Fossilize's recording thread, e.g. Roblox) | same as Deadpool VR: uninitialised pointers in what Fossilize records | `frame.vk_sanitize` now also covers own-engine libraries that load `libvulkan.so` by name |
|
||||
| Crash right after the game gets focus, in `vrclient.so … UpdateActionStateInternal` / `sxr_xrSyncActions` (e.g. Myst) | a race in the Frame runtime's input code on the first sync after focus (not every launch) | adapter `sync_guard` (input syncs one at a time with event polling, paused 250 ms after FOCUSED) |
|
||||
| View jumps sideways / game pauses or freezes for a moment every few seconds (e.g. Blade & Sorcery, BattleGlide) | the Frame drops focus for ~0.5 s (FOCUSED→VISIBLE→SYNCHRONIZED); games pause or re-align the player (`OnVRPresence … Teleport`) | adapter `focus_hold` |
|
||||
| SDL / LÖVE app crashes at start: `NullPointerException … ClipboardManager.addPrimaryClipChangedListener` in `SDLClipboardHandler.<init>` (e.g. Dramatic Shape) | Lepton's Android has no clipboard service (`service check clipboard`: not found) | `frame.sdl_clipboard` (that call → nops in classes.dex, in place, `apk/dex.py`); reproduced and verified with LÖVE for Android 11.5 |
|
||||
| Controllers do nothing (e.g. stuck on a setup screen); log: `xrSuggestInteractionProfileBindings … XR_ERROR_PATH_UNSUPPORTED` | the game only suggests bindings for Meta's newer profiles (Touch Plus / Touch Pro); the Frame's Android runtime knows `oculus/touch_controller`, not those | adapter `profile_remap` (default on): the bindings are suggested again for Touch (log: `controller profile … -> oculus/touch_controller`) |
|
||||
| Some buttons do nothing or the wrong thing (e.g. a Quest game's X/Y on the Frame's left controller) | the game binds only Quest Touch and SteamVR maps Touch onto the Frame controllers with its own remap (Touch left X/Y land on the d-pad, right X and Y repeat B), or the runtime rejected a profile or an input call | turn on adapter `input_diag` (diagnostics, off by default; `frameport settings <pkg> input_diag=1`) and look for `input_diag:` lines: `bindings: <profile> accepted` or `unsupported: interaction profile <profile> -> <result>` with the rejected paths, `bindings: /user/hand/<hand> uses <profile>`, `unsupported: function <name>`, `unsupported: xrCreateAction -> <result> (<action>)` |
|
||||
| Unity game hangs or the whole Frame restarts (e.g. in a menu); log: `The current MSAA level is 0, but the recommended MSAA level is 4. Switching to the recommended level.` (e.g. Lucky's Tale) | Meta's OVRManager (`useRecommendedMSAALevel`) turns 4x MSAA on at runtime, past QualitySettings; multisampled render-to-texture on GLES/Zink hangs the GPU | `frame.unity_runtime_msaa_off` (Cpp2IL: `OVRDisplay.get_recommendedMSAALevel` → 0) |
|
||||
| Unity game: one eye shows only effects or grey, the other is fine (e.g. I Am Cat, Oculus XR Plugin on GLES) | the game's single-pass multiview rendering goes wrong for array slice 1 (the adapter submits both slices correctly) | `frame.unity_multipass` (Cpp2IL: `OculusSettings.GetStereoRenderingMode` → MultiPass); `swap_eyes=1` tells whether the game or the adapter is at fault |
|
||||
| Crash with `SIGILL (ILL_ILLOPN)` and `*pc=0xd50323bf` (autiasp), for example on Unreal's HttpManager thread (GitHub #83 Star Wars Pinball VR, triage `pac-unpaired`) | The engine's OpenSSL ARMv8 assembly has autiasp without a matching paciasp (libUE4.so: 38 paciasp, 40 autiasp; Poly1305 NEON). Quest CPUs treat PAC hints as NOPs, the Frame's CPU checks them | `frame.pac_hints`: in a library with unpaired counts every paciasp/autiasp becomes a NOP (in place) |
|
||||
| launch.log ends with `logcat: Unexpected EOF!` right after `Waiting for app …`; the game runs, but Steam's "Resume game" menu isn't closed and the launch test shows nothing (Vader Immortal on Lepton 3.0.5, Under Cover on 2.8.14; about 1 launch in 50) | Lepton's logcat mirror died | Agent v67 `_logcat_keeper` (started by launch.sh, added to older launchers by `upgrade_launchers`) reads the container's logcat itself (`podman exec lepton-steamlaunch-<appid> logcat -v threadtime -T 2000`) and appends it to launch.log; log `<base>/logcat-keeper.log` |
|
||||
| A game no longer starts after a reinstall that was launch-tested right away: logcat `Zip: EOCD not found, …/base.apk is not zip` / `Failed to parse …base.apk`, no `Start proc` for the game (VR HOT, 2026-10-09) | The launch test's 45 s ran from the launcher, but the first start after an APK change spends ~1–2 min booting Lepton and installing the app: stopping the container mid-install left a broken installed copy | Agent v68: the test window counts from Lepton's `Waiting for app` (at most 240 s extra for boot + install). Repair a broken one: `touch <base>/lepton-app/game.apk` (Lepton re-installs it on the next start) |
|
||||
| Unreal game (OVRPlugin) never starts VR: launch.log has `OVRPlugin: JNI_OnLoad` but never `CompositorOpenXR::PreInitialize`, no OpenXR session, then a crash a few seconds in (for example Star Wars Pinball VR, UE 4.25: null pointer in `FSceneRenderer::GetMultiViewSceneColor`, GitHub #83) | Unreal's Oculus module looks up every `ovrp_*` function of the OVRPlugin it was built against (`InitializeOculusPluginWrapper`, all ANDed); OVRPort's OpenXR OVRPlugin lacks a few old ones (UE 4.25 / OVRPlugin 1.44: `ovrp_GetPTWNear`), so the wrapper fails and OculusHMD is never pre-initialized | `frame.unreal_ovrp_entrypoints` (suggested when analysis `unreal_ovrp_lookups` name functions the shipped OVRPlugin lacks): generated `libfp_ovrpstubs.so` (DT_NEEDED of libOVRPlugin.so; dlsym on the plugin's handle searches its dependencies) with a stand-in per missing name returning ovrpFailure (-1000); build note lists the names |
|
||||
| Only the Android home screen shows; the log has Unity's VR device as `None` (for example Accounting+, Unity 2017) | Unity 2017–2018 built-in Oculus support starts VR only when `com.oculus.systemactivities` is installed; Lepton has no Meta system apps, so Unity falls back to non-VR | `frame.unity_oculus_check`: that package name in libunity.so → `android`, plus `native/ovrpshim` (libfp_ovrp.so): Unity 2017's legacy frame loop (`ovrp_Update2`/`ovrp_BeginFrame`) never calls `ovrp_WaitToBeginFrame`, so without the shim no `xrWaitFrame` happens, `CompositorOpenXR::Update … outside of frame bounds` floods the log and the dashboard freezes. With it: log `ovrp frame loop shim: waited for frame N`, ~71 fps. Accounting+ then stops at "press any button" although its OVRInput gets clean input (`INPUT_PROBE` in the patch logs connected controllers/buttons/input focus per call) — unresolved |
|
||||
| Stuck on the loading screen or quits at start; `Unable to open archive file`, `is corrupted! Remove it and launch unity again` or `Failed to read data for the AssetBundle` in launch.log (for example Batman, GitHub #155) | The game's data folder (OBB) is incomplete or from another version than the APK | Copy the whole data folder again from the same install as the APK, add the game again, reinstall (triage `unity-data-missing`) |
|
||||
| Black flat window, then a GPU hang: kernel `hangcheck detected gpu lockup` (offending task the game), `zink: DEVICE LOST`, Unity render-thread crash; `outside of frame bounds` thousands of times a second (for example BattleSisters, Unity 2019.4) | Unity 2019 on its built-in VR (no `libOculusXRPlugin.so`) uses the same legacy frame loop as Unity 2017: no `xrWaitFrame`, the render thread floods the GPU | `frame.unity_oculus_check` adds the ovrpshim frame wait for these too (revision 2) |
|
||||
| Unity built-in VR game (with `frame.unity_oculus_check`) freezes at a scene switch: the log stops after `Boot: Activating Scene: …`, the process stays alive, every thread sleeps (for example Sniper Elite VR, Unity 2019.4) | The shim's `xrWaitFrame` blocks until the previously waited frame is begun; Unity skipped beginning it at the scene switch and its render thread then waited for the main thread (gdb: UnityMain in vrclient `CSxrSession::StartNextFrame` ← `ovrp_WaitToBeginFrame` ← `fpov_Update2`). OVRPlugin also only begins the frame index it waited for | `frame.unity_oculus_check` revision 5: libunity.so's `ovrp_BeginFrame`/`ovrp_EndFrame` go through the shim, which waits ≤ 50 ms for the last waited frame to begin, else skips the wait (log `the last waited frame wasn't begun`), and gives a begin/end of another index the waited one |
|
||||
| Unity built-in VR game: the hands/weapons trail the controllers by centimetres when moving (headset fine, 72 fps), for example Sniper Elite VR | Unity's physics-step `ovrp_Update2` (prediction 0) makes OVRPlugin locate the nodes at the monotonic clock's "now", the XrTime base on a Quest but 0.05–0.9 s behind the Frame's XrTime; the runtime extrapolates backwards and the render-step reads after it get those poses too. A larger prediction is capped by OVRPlugin (~0.07 s) | `frame.unity_oculus_check` revision 5 holds the physics-step update back: both steps read the render update's display-time poses |
|
||||
| OVRPlugin game: the hands lag behind the controllers (also with `ovrp_hold_physics` on or off; rendering fine), for example BattleSisters | OVRPlugin passes its monotonic-clock "now" on as the OpenXR time (OVRPort's dispatcher converts XR_KHR_convert_timespec_time 1:1: the Frame's runtime lacks it, and FrameBridge's emulation is never asked), but the Frame's XrTime runs ahead of CLOCK_MONOTONIC (2.56 s on SteamOS 0.4.5): with `pose_debug=1` the hand spaces show `time - predicted display time -2564 ms`; BattleSisters also asks for its head at XrTime 0.1 s every frame | `adapter.pose_time_fix` (FrameBridge, suggested for Unity built-in OVRPlugin games): a located time nearer the monotonic clock than XrTime's "now" is moved by the clock offset measured at xrWaitFrame, one more than 0.5 s before the display time goes to "now" (log `pose_time_fix: …`; `pose_debug=1` counts both per 5 s). Once a build has this FrameBridge it is toggled in settings.conf (no rebuild) The offset is the largest of the last ~2 s of xrWaitFrame samples (hitches made single samples dip by up to 2.5 s and pushed fixed times into the future); far-past requests get the frame's display time. Headless survey of 54 games (2026-10-09): no head/view request on the monotonic clock in any other game; UE4 OVRPlugin 1.89 games (Robo Recall, Vader, Phantom, Time Stall) and The Room VR ask for head/views at XrTime ≈ 0 every frame, which works today; hands only show in the headset. Suggested for Unity built-in Oculus games only. A time equal (±1 ms) to one of the last 6 predicted display times is never moved, and monotonic times are only told apart when the clocks are more than 4 display periods apart and the time is clearly nearer the monotonic "now" (GitHub #49: on a Frame with XrTime only ~68 ms ahead, a display-time request after a hitch was moved +67.7 ms) |
|
||||
| Unreal game stuck on a loading image after the intro, frames keep coming (72 fps), no crash (for example Vader Immortal) | suspect: a Meta Platform SDK request no message ever answers | diagnostics: `frame.ovr_trace` (opt-in) logs every `ovr_*` call, the answers `ovr_PopMessage` returns and every 10 s the unanswered requests (`fp_ovrtrace` in launch.log). Never fake an entitlement answer |
|
||||
| Own-engine game crashes in `libVkLayer_fossilize.so` (Fossilize's recording thread, for example Roblox) | same as Deadpool VR: uninitialised pointers in what Fossilize records | `frame.vk_sanitize` now also covers own-engine libraries that load `libvulkan.so` by name |
|
||||
| Crash right after the game gets focus, in `vrclient.so … UpdateActionStateInternal` / `sxr_xrSyncActions` (for example Myst) | a race in the Frame runtime's input code on the first sync after focus (not every launch) | adapter `sync_guard` (input syncs one at a time with event polling, paused 250 ms after FOCUSED) |
|
||||
| View jumps sideways / game pauses or freezes for a moment every few seconds (for example Blade & Sorcery, BattleGlide) | the Frame drops focus for ~0.5 s (FOCUSED→VISIBLE→SYNCHRONIZED); games pause or re-align the player (`OnVRPresence … Teleport`) | adapter `focus_hold` |
|
||||
| SDL / LÖVE app crashes at start: `NullPointerException … ClipboardManager.addPrimaryClipChangedListener` in `SDLClipboardHandler.<init>` (for example Dramatic Shape) | Lepton's Android has no clipboard service (`service check clipboard`: not found) | `frame.sdl_clipboard` (that call → nops in classes.dex, in place, `apk/dex.py`); reproduced and verified with LÖVE for Android 11.5 |
|
||||
| Game crashes at start: `java.lang.NoSuchMethodError: No virtual method getAvailableCommunicationDevices()… in class Landroid/media/AudioManager` at `com.vivox.sdk.AudioChangeListener.checkAudioRouteAndApplyChanges` (for example Green Hell VR, GitHub #101); triage `vivox-api31` | Newer Vivox (voice chat) builds call Android 12 audio-routing methods without a version check; Lepton is Android 11. Older Vivox builds (Eleven Table Tennis, BattleSisters) don't have that code | `frame.vivox_audio_route` (suggested by analysis `vivox_api31`): every AudioChangeListener method that calls one of them returns at once (`Dex.return_early`: return-void / `const/4 v0, 0; return v0`, in place); voice chat keeps the default audio route |
|
||||
| Controllers do nothing (for example stuck on a setup screen); log: `xrSuggestInteractionProfileBindings … XR_ERROR_PATH_UNSUPPORTED` | the game only suggests bindings for Meta's newer profiles (Touch Plus / Touch Pro); the Frame's Android runtime knows `oculus/touch_controller`, not those | adapter `profile_remap` (default on): the bindings are suggested again for Touch (log: `controller profile … -> oculus/touch_controller`) |
|
||||
| Some buttons do nothing or the wrong thing (for example a Quest game's X/Y on the Frame's left controller) | the game binds only Quest Touch and SteamVR maps Touch onto the Frame controllers with its own remap (Touch left X/Y land on the d-pad, right X and Y repeat B), or the runtime rejected a profile or an input call | turn on adapter `input_diag` (diagnostics, off by default; `frameport settings <pkg> input_diag=1`) and look for `input_diag:` lines: `bindings: <profile> accepted` or `unsupported: interaction profile <profile> -> <result>` with the rejected paths, `bindings: /user/hand/<hand> uses <profile>`, `unsupported: function <name>`, `unsupported: xrCreateAction -> <result> (<action>)` |
|
||||
| Unity game hangs or the whole Frame restarts (for example in a menu); log: `The current MSAA level is 0, but the recommended MSAA level is 4. Switching to the recommended level.` (for example Lucky's Tale) | Meta's OVRManager (`useRecommendedMSAALevel`) turns 4x MSAA on at runtime, past QualitySettings; multisampled render-to-texture on GLES/Zink hangs the GPU | `frame.unity_runtime_msaa_off` (Cpp2IL: `OVRDisplay.get_recommendedMSAALevel` → 0) |
|
||||
| Unity game: one eye shows only effects or gray, the other is fine (for example I Am Cat, Oculus XR Plugin on GLES) | the game's single-pass multiview rendering goes wrong for array slice 1 (the adapter submits both slices correctly) | `frame.unity_multipass` (Cpp2IL: `OculusSettings.GetStereoRenderingMode` → MultiPass); `swap_eyes=1` tells whether the game or the adapter is at fault |
|
||||
| Setup/intro loops every launch (Espire 2) | save folders created without write permission | launcher repairs permissions every 2 s (built in) |
|
||||
| VrApi bridge: never enters VR | Frame reaches FOCUSED later than Quest; tracking only when worn | bridge waits 30 s; test in the headset |
|
||||
| Unreal game (ILMxLAB, for example Vader Immortal) plays its intro, then stays on its loading card (portrait + progress bar) at 72 fps and ignores input (GitHub #49) | the menu waits for `UVRUtils::GetQuestShaderPrecompilePercent()` to reach 100 %; the precompile only starts when `IsRunningOnSantaCruz()` (a Quest), the other branch returns 0.0 | `frame.unreal_quest_precompile` (non-Quest branch returns 1.0; found by Klownicle); suggested when the engine exports that function (analysis `unreal_quest_gates`) |
|
||||
| Video in a game or player stutters, falls behind or drops to a few fps (4K/8K, for example a video player's 360° video, Batman's cutscenes); `OMX.google.*` / `c2.android.*` decoders in the log | Lepton's Android has only software decoders | `frame.hw_video_decode` (suggested when the APK uses MediaCodec/ExoPlayer/VLC; no APK change, reinstall): `OMX.frameport.{avc,hevc,vp9}.decoder` on the Frame's Iris hardware (H.264 High, HEVC Main, VP9 profile 0 up to 4096x2304; 8-bit; up to 8192 px), mounted into this game's container only (log `Iris hardware video/… decoder active`; launch.log `FramePort video: loading the Iris hardware codec plugin`). `Iris … unavailable` / `initialization failed (-12)` (triage `hw-video-decoder-busy`): another decoder holds the hardware, usually Steam's own hardware video decoding: turn it off in Steam, restart Steam. Video broken with it: Settings → Installing → Hardware video decoding off (all games) or `FRAMEPORT_NO_HW_VIDEO=1 %command%` (one game) |
|
||||
|
||||
## Picture problems (headset on)
|
||||
| Symptom | Cause | Fix |
|
||||
|---|---|---|
|
||||
| Found after playing: the game page's "Last session" (or `frameport session <pkg>`) lists a finding (agent v70 `session_log`: the newest `plays.log` session's launch.log, ≤4 MB, + its crash logcat + kernel GPU lines) | launch tests never reach FOCUSED or gameplay; the same `catalog/triage.yaml` signatures (sync_guard, pac_hints, unreal_gl_shim, vk_spec_fixes, …) now also run on real sessions, plus the frame-rate and focus-dip findings below | "Try this setting" (FrameBridge settings: written on the Frame at once via `set_settings`, used from the next start) / "Rebuild with this patch" (APK patches); launch-test sessions (`test <unix>` in plays.log) are skipped |
|
||||
| Textures flicker, jump or smear while moving in an OVRPlugin game that renders space-warp swapchains (`xrCreateSwapchain 376x376 format=97` / `format=129`; triage `space-warp-used`, info + question) | Application SpaceWarp: half the frames plus motion vectors; the Frame's reprojection of them misbehaves (Into The Radius 2, Metro Awakening) | adapter `hide_space_warp=1`; offered as "Did textures flicker…?" after a play session, never applied on its own |
|
||||
| The game froze or closed and the kernel log has `hangcheck` / GPU fault / `msm_drm … recover` lines during the session (triage `gpu-hang`, play sessions only) | a shader or effect hangs the Frame's GPU (for example Vader Immortal's lightspeed jump) | capture the shaders (`adapter.vk_shader_dump=1` Vulkan, `adapter.zink_shader_dump=1` OpenGL ES: triage keeps the one matching the session's swapchain formats), play to the hang again and send a problem report (diagnostics carry the newest dumped modules); the maintainer adds a `vk_shader_fix` / `zink_shader_fix` catalog entry. `zink-device-lost` keeps its MSAA suggestions |
|
||||
| The game keeps pausing or recentring for a moment while worn (session finding `focus-dips`: ≥3 `focus: back after N ms` lines longer than the game's focus_hold_ms, up to 5 s) | the Frame's wear sensor flickers "HMD off"; FrameBridge logs every runtime focus loss/return (always, before focus_hold) | `adapter.focus_hold_ms=<longest dip + 250 ms, in 500 ms steps, ≤5000>` (or `adapter.focus_hold=1` when off) |
|
||||
| Judder or smearing on head turns; FrameBridge pacing below the display rate (session finding `slow-frames`: >30 % of the 5 s windows under 90 % of the nearest refresh rate ≥ the session's 90th-percentile fps, after the first two windows, ≥1 min) | the game renders below the refresh rate; the runtime reprojects | `adapter.scale=<current × 0.85>` first, then `frame.unity_runtime_msaa_off` (Unity) / `adapter.hide_space_warp` (Unreal 5 + OVRPlugin) |
|
||||
| Unreal game (ILMxLAB, for example Vader Immortal): controllers track but grip/trigger do nothing, grabbing never works (Unreal's own input values move, the game's stay 0) | `URPOCKeyMapManagerComponent` picks the Quest or the Gear VR key set by `IsRunningOnSantaCruz()`; on the Frame it takes Gear VR, empty in a Quest build | `frame.unreal_quest_keymap` (the Oculus case keeps the Quest set, for action and axis mappings; found by Klownicle, GitHub #49) |
|
||||
| The hands' thumbs never move when you touch the thumbstick or buttons (Unreal `ThumbUp` stays 1, for example Vader Immortal) | OVRPlugin reports thumb proximity from XR_FB_touch_controller_proximity, which the Frame's runtime lacks; OVRPort's loader offers it anyway and the proximity actions never get a binding | adapter `proximity_emul=1` (thumb proximity from the touch inputs: thumbstick, face buttons, thumb rest; 2 = also the index finger from trigger touch); log `proximity_emul: finger proximity bound to touch`. **For UE4 Oculus games this didn't animate the thumbs** (Vader, GitHub #49): use `frame.unreal_thumb_touch` (found by Klownicle): `OculusInput::FOculusInput::SendControllerEvents` computes ThumbUp from NearTouches (masks 0x2/0x8); the patch makes it read Touches (the slot 4 bytes before) with masks 0x0f00 (X/Y/stick/thumb rest) / 0x000f (A/B/stick/thumb rest), keeping the inversion; three instructions, matched exactly (build note `OculusInput ThumbUp: from the capacitive touches`). Matches Vader Immortal Ep. I, Robo Recall, Phantom: Covert Ops, Time Stall, Star Wars: Tales from the Galaxy's Edge; newer UE4 builds (for example Asgard's Wrath 2, RE4, In Death) compile it differently (shared mask registers) and aren't matched |
|
||||
| Vulkan game (Unreal / own engine with the Vulkan shim): the GPU hangs at one effect or cutscene (kernel `hangcheck detected gpu lockup`, freeze/exit; for example a VR4 cutscene, GitHub #140) | a SPIR-V shader reads a loop counter/accumulator before setting it (VR4's campaign shader, GitHub #10) | adapter `vk_shader_dump=1` (`frame.vk_sanitize`'s shim; log `vk shim: dumping SPIR-V modules to …`) writes every distinct module once to `files/fp_vk_shaders/<size>_<sha256>.spv` + `index.txt` (`<seq> <ms> <unix ms> <name> new\|known\|again`); play to the hang, collect diagnostics (`target/shaders/fp_vk_shaders/`, newest 4 MB) and take the modules first created (`new`) shortly before the kernel's hangcheck time; disassemble (`spirv-dis`), find the variable read before its first store, write a `vk_shader_fix` (`<size>:<sha256>:<byte offset>:<words>` = inserted OpStores; log `vk shim: fixed shader module`); switch the dump off again |
|
||||
| OpenGL ES game: the GPU hangs at one effect (freeze/exit, compositor watchdog, for example Vader Immortal's lightspeed jump) | a shader (as Zink compiles it) reads loop counters/accumulators before setting them | capture the SPIR-V (adapter `zink_shader_dump=1` writes every module to `files/fp_spirv/`, or a GPU capture), then a `zink_shader_fix` entry (same format as `vk_shader_fix`) + `frame.zink_shader_fix` (Vulkan layer under Zink, activated through GraphicsEnv's debug layer list); log `shader fix layer: fixed shader module N`; triage `zink-shader-fix-mismatch` when a Frame update changed the driver's output |
|
||||
| 2D Android app: Steam says it's running but nothing shows | Lepton runs apps headless unless the app folder has `lepton-show-flatscreen` | FramePort adds it for apps without VR (agent v28+); reinstall apps installed before |
|
||||
| A phone/tablet app shows nothing in the headset, or a VR app opens as a flat window | FramePort's VR/2D guess (`vr_kind`) is wrong for this app | patch `device.display_mode` → **Flat window** or **VR** (Customize → "Show as VR or as a flat window"), then Update on Frame |
|
||||
| "Install with FrameDrop" button opens FrameDrop (or nothing) instead of FramePort | another program owns `framedrop://`, or the switch is off, or macOS (Flet can't receive links there) | Settings → Install links → **Use FramePort for these links**; else Add games → Add from a link… (paste the button's address) |
|
||||
| "Install with FrameDrop" button opens FrameDrop (or nothing) instead of FramePort | another program owns `framedrop://`, or the switch is off, or macOS (Flet can't receive links there) | Settings → Install links → **Use FramePort for these links**; else Add games → Install from a link… (paste the button's address) |
|
||||
| 2D Android game ignores the controllers: they only move a pointer, an SDL game keeps its touch controls ("no controller attached"); Android's log lists only `wayland_touch`/`wayland_keyboard`/`wayland_pointer` (GitHub #162, Skate 3) | Lepton's Android gets keyboard, pointer and touch from the Wayland seat only: no gamepad device | patch `device.steam_gamepad` (2D apps; suggested when the manifest declares `android.hardware.gamepad` or `LEANBACK_LAUNCHER`; no APK change, reinstall): the launcher puts FramePort's Podman wrapper (`~/.local/share/frameport/agent/bin/podman`) first on PATH, which bind-mounts Steam Input's virtual pads (uinput, 28de, "Microsoft X-Box 360 pad N") at `/dev/input/eventN` plus an Xbox 360 key layout, and exports `LEPTON_ENV_SDL_GAMECONTROLLER_ALLOW_STEAM_VIRTUAL_GAMEPAD=1`. Check: launch.log `FramePort gamepad: Steam Input virtual gamepads for this container: event5 (…)` ("none" = Steam had no pad when the game started: Steam only makes it while the controllers are on), `podman exec lepton-steamlaunch-<appid> dumpsys input` lists the pad. Steam Input must be on for the shortcut. A pad Steam makes after the start (controllers woke later, reconnect) isn't seen until the next start. Off for one start: `FRAMEPORT_NO_GAMEPAD=1 %command%` |
|
||||
| 2D Android app: back/home/recents buttons cover the app's own buttons | Android's navigation bar | patch `device.hide_navbar` (on by default for apps without VR) sets `qemu.hw.mainkeys=1`; reinstall to apply |
|
||||
| Black screen, audio works, GLES engine with direct VrApi | Mesa rejects Quest-style GLSL | `frame.gl_shim` (logs `GLShim: SHADER COMPILE FAILED` + source lines) |
|
||||
| Black screen, audio works, log `Unsupported VrApi layer type N` | bridge drops frames containing that layer | extend the bridge (cylinder=3 is converted to a quad already) |
|
||||
| Only some draws visible (e.g. controllers) + `glGetError 0x502` | multiview shaders used on single-view FBOs | GL shim `gl_hide_multiview=1` (default) |
|
||||
| Only some draws visible (for example controllers) + `glGetError 0x502` | multiview shaders used on single-view FBOs | GL shim `gl_hide_multiview=1` (default) |
|
||||
| Own GLES engine (OpenXR, not VrApi): eye view fine, but HUD / menu / PDA panels black (for example Doom3Quest, GitHub #77; no error in the log) | every shader declares `layout(num_views=2) in;`, also the ones drawn into the engine's single-layer offscreen framebuffers (2D textures/renderbuffers); OVR_multiview makes such draws INVALID_OPERATION and Mesa drops them (`draw_validate.c`), Quest's driver doesn't | `frame.gl_multiview_fbo` (opt-in, experimental: `libfpglmv.so` interposes GLES and draws those cases with a single-view twin of the program; logs `GLMV: twin built: program N -> M`, per-5-s `single-view draws` counters; `gl_mv_debug=1` adds glGetError checks; triage `gl-multiview-twin-failed`). Alternative: the game's own fix (two-layer multiview pool, Xandrix's patch in #77) |
|
||||
| Upside-down image in a GL bridge game | GL images start at the bottom row | fixed in the bridge (swap angleUp/Down for GL chains) |
|
||||
| UI panels upside down (AC Nexus) | XrCompositionLayerImageLayoutFB VERTICAL_FLIP unsupported | adapter `flip_emul=1` (default); rotating quads makes them vanish |
|
||||
| Passthrough black (BAM) | XR_FB_passthrough missing | adapter `passthrough_emul=1` (default) + `patch_force_passthrough` for MR-only games |
|
||||
@@ -116,9 +136,9 @@ version is `catalog/triage.yaml` (used by `frameport test` / the Job screen); ke
|
||||
| MR game stuck waiting for room data (Demeter) | no Meta scene API | adapter `scene_emul=1` (+ `frame.meta_permissions`) |
|
||||
| Hand-tracking game janky (Silhouette) | Frame synthesizes hands from controllers | `controller_fix=0` passes hands through; not really fixable |
|
||||
| Eye distortion while moving (Arcsmith, Time Stall) | unknown (not eye swap, tracking, Valve layers, depth or pacing) | unresolved |
|
||||
| One eye grey / only effects (I Am Cat, Unity Oculus XR Plugin on GLES) | the game's multiview pass draws array slice 1 wrong on Zink | `frame.unity_multipass` (also rewrites the getter's inlined read in `OculusLoader.Initialize`; check for two `array=1` eye swapchains) |
|
||||
| One eye gray / only effects (I Am Cat, Unity Oculus XR Plugin on GLES) | the game's multiview pass draws array slice 1 wrong on Zink | `frame.unity_multipass` (also rewrites the getter's inlined read in `OculusLoader.Initialize`; check for two `array=1` eye swapchains) |
|
||||
| View vibrates even when holding still after `frame.unity_multipass` (I Am Cat) | poses/times are consistent, but two passes on Zink make every frame one period late, and the game clamps its physics step to 10 ms | not fixed (scale 0.8 didn't help); next ideas: fix multiview instead, or the game's fixed timestep |
|
||||
| Game freezes / pauses for 0.5-2 s now and then, no flicker (e.g. Blade & Sorcery, Lucky's Tale) | the headset's wear sensor flickers off while worn (`logs/eyetracking.txt` `HMD off, stopping eye tracking` … `HMD on`), the Frame turns it into a focus loss and Quest games that pause on focus loss pause | adapter `focus_hold` (on by default since 2026-10-05, dips up to `focus_hold_ms` = 5000 ms are hidden; longer ones still pause) |
|
||||
| Game freezes / pauses for 0.5-2 s now and then, no flicker (for example Blade & Sorcery, Lucky's Tale) | the headset's wear sensor flickers off while worn (`logs/eyetracking.txt` `HMD off, stopping eye tracking` … `HMD on`), the Frame turns it into a focus loss and Quest games that pause on focus loss pause | adapter `focus_hold` (on by default since 2026-10-05, dips up to `focus_hold_ms` = 5000 ms are hidden; longer ones still pause) |
|
||||
| Minor glitches on some objects (Myst, Unreal Vulkan) | unknown; not application space warp (turning it off changed nothing and ran worse) | unresolved |
|
||||
| Unity game crashes or hangs right as Vulkan starts, after `SLZ Graphics plugin loading!` and OVRPlugin's pre-init `xrDestroyInstance`: SIGSEGV with pc 0 (or pc == fault address in an unloaded library), x16/x23 in `libSLZQuestNative.so` (BONELAB 1.2974) | Stress Level Zero's graphics plugin hooks Unity's Vulkan start-up (IUnityGraphicsVulkanV2 interception: vkCreateInstance/vkCreateDevice) and vkCreateSampler; its vkCreateInstance wrapper calls an invalid pointer on the Frame | `frame.slz_vulkan_hooks` (its two registrations become no-ops; Unity starts Vulkan itself; ~35 s of shader prewarming without its pipeline cache) |
|
||||
| Unity game shows a picture but the player body is frozen: no head tracking, the controllers stay on the model, no buttons, although OpenXR input works (BONELAB 1.2068, Oculus XR Plugin) | OVRPlugin reports the headset as not worn (`ovrp_GetUserPresent2` → 0) a few seconds after start, and the game's rig only follows a present user (Marrow `XRHMD.IsUserPresent` = Unity's HMD `UserPresence`) | `frame.unity_user_presence` (the Oculus XR Plugin's lookup → `libfp_ovrp.so`, reports present; log `user presence: OVRPlugin 0 …`) |
|
||||
@@ -187,16 +207,16 @@ or the Rift version through Revive (Journey of the Gods, Shadow Point). The cata
|
||||
|
||||
## Oculus Rift (PC VR) games
|
||||
Scan a folder with Rift game dumps (Windows game folders) like Quest dumps; they get ids `rift.<slug>` and the
|
||||
"PC VR (Revive / Proton)" patch group. Two ways to run them:
|
||||
"PC VR (Proton and Revive)" patch group. Two ways to run them:
|
||||
- **This PC** (`--to pc`, GUI "Install on this PC"): a non-Steam shortcut in the local Windows Steam runs
|
||||
`ReviveInjector.exe /openxr "<game.exe>"` (FramePort's portable Revive; on WSL copied to
|
||||
`%LOCALAPPDATA%\FramePort`). Play on the Frame by streaming from SteamVR.
|
||||
- **The Frame** (GUI "Install on Frame (Proton)"): game + Revive are uploaded to `~/Applications/quest-frame/rift.*`,
|
||||
and launch.sh runs them with the Frame's ARM64 Proton (Frame → Install Proton first). Experimental.
|
||||
- **The Frame** (GUI "Install on Frame"): game + Revive are uploaded to `~/Applications/quest-frame/rift.*`,
|
||||
and launch.sh runs them with the Frame's ARM64 Proton (install it first: Frame page → PC VR games (Proton) → Install…). Experimental.
|
||||
|
||||
| Symptom | Cause | Fix |
|
||||
|---|---|---|
|
||||
| "Proton isn't installed on the Frame yet" | ARM64 Proton / Steam Linux Runtime 4 (arm64) not downloaded | Frame → Install Proton (confirm in the headset) or "Install without confirming" (`frameport frame proton --install --unattended`) |
|
||||
| "Proton isn't installed on the Frame yet" | ARM64 Proton / Steam Linux Runtime 4 (arm64) not downloaded | Frame page → PC VR games (Proton) → Install… (`frameport frame proton --install`; `--in-headset` only asks Steam, confirm in the headset) |
|
||||
| Game quits at once; `ovrPlatformInitialize_NotEntitled` / entitlement failed | Oculus Platform SDK entitlement check (FramePort flags these: "Uses the Oculus Platform SDK") | PC mode with the Oculus app installed and a license you own. FramePort doesn't bypass entitlement checks |
|
||||
| `Failed to create process` in ReviveInjector.txt | wrong exe, or 32/64-bit mismatch | check the detected exe on the game page; rescan |
|
||||
| `XR_ERROR_RUNTIME_UNAVAILABLE` / no OpenXR runtime (PC) | SteamVR not running / not the OpenXR runtime | start SteamVR, set it as OpenXR runtime; or `pcvr.revive_openvr` |
|
||||
|
||||
+25
-8
@@ -1,26 +1,43 @@
|
||||
# Writing style for FramePort's interface
|
||||
# Writing style for FramePort
|
||||
|
||||
Short rules so every screen, help text and doc sounds the same. Code style is enforced by `ruff`.
|
||||
Short rules so every screen, help text, doc and web page sounds the same. Code style is enforced by `ruff`.
|
||||
|
||||
## Words
|
||||
- **Steam Frame** on first mention in a screen or document, **the Frame** after that. **Headset** only for the
|
||||
physical device you wear ("put the headset on").
|
||||
- **Quest game** for Meta Quest apps, **Android app** for ordinary Android apps, **PC VR game** for Windows VR games.
|
||||
Say Oculus or Rift only for games that use Oculus's own SDK.
|
||||
physical device you wear ("put the headset on"). Buttons say "… on Frame" ("Install on Frame").
|
||||
- **Quest game** for Meta Quest apps, **Android app** for ordinary Android apps, **Linux app** for Linux programs,
|
||||
**PC VR game** for Windows VR games (never "PCVR"). Say Oculus or Rift only for games that use Oculus's own SDK.
|
||||
**Game** when the kind doesn't matter; **APK** only when the file itself matters.
|
||||
- **Patch** for anything in a game's patch list (never "fix" for the same thing). **Recipe** for a game's chosen
|
||||
patches and settings.
|
||||
patches and settings (never "config"); say what it is the first time a page uses it.
|
||||
- Tools by their names: OVRPort, Revive, Proton, Lepton, SteamVR.
|
||||
- **Install** (first time), **Update** (a newer build), **Reinstall** (the same build again); **Play** starts a game.
|
||||
- **Set up** = the one-time setup of a Frame; **connect** = linking FramePort to it. **Pair** only in Valve's own
|
||||
**Pair new host**. The **setup line** is the fixed `curl -sL frameport.app/s | bash`; the
|
||||
**setup command** is the one with this PC's address and a one-time code. FramePort's button is **Allow**.
|
||||
- **Konsole** is the Frame's terminal. The way there is "SteamVR dashboard → Launch a program → Desktop, then app
|
||||
menu → System → Konsole": say it in full once per page, then just "Konsole".
|
||||
- **This PC** / **your PC**, not "computer". **Unpack** a download (zip and tar.gz alike), not "unzip".
|
||||
- One label per thing everywhere: **Docs**, **Report a problem**, **Download FramePort**.
|
||||
|
||||
## Form
|
||||
- Buttons and headings in sentence case ("Add games", "Report a problem…"); one label per action everywhere.
|
||||
- "…" at the end of a label when the action asks for more input (a dialog, a file picker).
|
||||
- Sentences end with a period, including tooltips and help texts; labels don't.
|
||||
- Sentences end with a period, including tooltips and help texts; labels and headings don't (also on the website).
|
||||
- "and", not "&", in text. An em dash (—) for asides, a middle dot (·) between short facts.
|
||||
- No Oxford comma ("Windows, macOS and Linux"). Straight apostrophes and quotes in source.
|
||||
- Sizes in GiB/MiB (`i18n.fmt_size`), dates as YYYY-MM-DD HH:MM (`i18n.fmt_datetime`).
|
||||
- US spelling (customize, analyze, color).
|
||||
- US spelling (customize, analyze, color, license).
|
||||
- Plain, technical wording: say what happens ("Steam restarts once"), no marketing adjectives.
|
||||
|
||||
## Length
|
||||
Short beats complete: say what the user does or gets; leave out how it works unless they need it to act.
|
||||
- Buttons: four words at most. Tooltips: one short sentence.
|
||||
- Dialog text: two short sentences. Help texts: three sentences at most (about 200 characters).
|
||||
- Doc paragraphs: three sentences at most; steps as numbered lists.
|
||||
- Explain a technical term in a few words where a reader first meets it, or leave it out.
|
||||
- Say a thing once and link to it elsewhere.
|
||||
|
||||
## Translations
|
||||
- Every text the GUI shows goes through `tr("…")` or `tr_n("…", "…", n)` (see `src/frameport/i18n.py`); use
|
||||
templates with `.format()`, never f-strings inside `tr()`, and never decide anything from a displayed text.
|
||||
|
||||
@@ -0,0 +1,140 @@
|
||||
# Batman cutscene playback on Steam Frame
|
||||
|
||||
Batman: Arkham Shadow (`com.camouflaj.manta`) submits its prerecorded cutscenes
|
||||
through Android video surfaces and stereoscopic 180-degree OpenXR equirectangular
|
||||
layers. Lepton/SteamVR's missing surface/layer support leaves those layers black,
|
||||
while the separately played audio continues. Uploading software-decoded panorama
|
||||
pixels also does not provide practical playback of the original 8192x4096 HEVC
|
||||
assets.
|
||||
|
||||
## Scope and installation
|
||||
|
||||
FrameBridge enables the native-video path through the recipe-only adapter
|
||||
setting `surface_native` (Batman's catalog recipe; a one-time library migration,
|
||||
`batman_video_patches`, adds it and `frame.hw_video_decode` to existing Batman
|
||||
recipes). Hardware decoding is deployed independently into FramePort's shared,
|
||||
versioned codec store, without embedding decoder assets; games that have
|
||||
`frame.hw_video_decode` in their recipe get the launcher line that places the
|
||||
shared wrapper on the launcher's child PATH. Matching containers
|
||||
receive read-only plugin/XML mounts and the Iris decoder device. Shared Lepton
|
||||
files and original MP4/OBB assets are
|
||||
never replaced, transcoded, resized, or rewritten.
|
||||
|
||||
The native projection, view recording and Vulkan-enable hooks are gated by
|
||||
`surface_native`. With it off, Vulkan function lookup and directly exported
|
||||
entry points pass through to the original loader; default `surface_emul`
|
||||
alone does not enable the new Vulkan projection path. The fixture
|
||||
`tests/fixtures/src/surface_hooks_test.c` checks function identity with the
|
||||
setting off/on and direct-export forwarding with it off. Compile it with
|
||||
`FRAMEPORT_FAKE_RUNTIME` as `libopenxr_loader_original.so`, then without that
|
||||
define as the client; run each setting in a separate process next to the
|
||||
production adapter and fake loader.
|
||||
|
||||
The wrapper verifies the tested Android 11 SoftOMX ABI. An existing runtime
|
||||
hardware plugin takes precedence; incompatible runtimes keep their stock codecs.
|
||||
Hardware decoder capacity is probed before the private component is advertised.
|
||||
If the driver's session limit is exhausted, Android can fall back to software
|
||||
decoding; that preserves functionality but not full-resolution performance.
|
||||
FramePort does not change Steam's global hardware-decoding settings.
|
||||
|
||||
Other games don't get `surface_native`. The decoder is separate from that
|
||||
setting, and runs in Lepton's arm64 media service. Rebuilding an older APK
|
||||
removes the previously bundled codec files; launcher migration replaces
|
||||
Batman's old per-game wrapper with the shared one. MP4 presence alone is not
|
||||
evidence of compatible surface/overlay semantics.
|
||||
|
||||
The recipe change marks Batman's installed build "Update on Frame"; the shared
|
||||
adapter revision is unchanged, so other games stay installed as they are.
|
||||
|
||||
## Decode and render path
|
||||
|
||||
`native/hevc/frameport_hevc.cpp` exposes `OMX.frameport.hevc.decoder` through the
|
||||
tested SoftOMX ABI, using FFmpeg's LGPL Iris V4L2 hardware decoder wrapper.
|
||||
Native surface clients receive full-resolution YUV hardware buffers with fences.
|
||||
Compatible large native surfaces use fenced Vulkan transfers between imported
|
||||
decoder and Android DMA buffers, retaining the decoded frame until GPU completion.
|
||||
Other surfaces retain parallel NV12 row copies without CPU color conversion.
|
||||
Input timestamps, EOS, dynamic dimensions, seek and flush
|
||||
are preserved.
|
||||
|
||||
An AImageReader retains the decoder's actual image. The surface worker samples
|
||||
that original YUV buffer and fuses conversion with visible-view projection on
|
||||
the GPU. Vulkan imports the finished shared view with explicit foreign ownership
|
||||
transfers. There is no full-panorama RGB intermediate or CPU picture readback.
|
||||
The default native output is 2560x2560 per eye with a 12% tangent-space guard;
|
||||
an explicit `equirect_res` takes precedence.
|
||||
|
||||
Every finished view carries the camera that actually generated its pixels.
|
||||
Submitted game projection views are preferred over another tracking query.
|
||||
The worker coalesces video/view arrivals and reuses held pixels only while the
|
||||
visible frustum remains covered. Color/source changes redraw content without
|
||||
unnecessarily changing the covered panorama-local sampling camera. Infinite
|
||||
panoramas retain their layer rotation and have no translational parallax.
|
||||
|
||||
## Stable composition
|
||||
|
||||
A separately submitted projected video layer can alternate with the main game
|
||||
projection as opaque coverage changes during head movement. That presentation
|
||||
path exhibited snap-back/doubled video in headset tests even when rendering
|
||||
and submitted camera metadata agreed.
|
||||
|
||||
The native path instead snapshots the game's successfully waited stereo color
|
||||
image **before forwarding its release**, restoring its color-attachment layout
|
||||
after the copy. Acquisition indices are tracked in FIFO order. The application
|
||||
image is never sampled or modified after its OpenXR release, and release is not
|
||||
deferred. Snapshot generations must match the last successful release.
|
||||
|
||||
The final GPU pass reprojects the cached video into the current game camera,
|
||||
blends it with the scene in linear light, and draws directly into a runtime sRGB
|
||||
attachment. One primary projection contains both scene and video, including
|
||||
fades and uncovered hemisphere edges. Later subtitles/menu layers keep their
|
||||
order. Once this output is ready, movie updates copy only to its private cache,
|
||||
avoiding the additional standalone-output copy.
|
||||
|
||||
Batman attaches color-scale/bias and image-layout structures even when their
|
||||
transforms are identity. The compositor applies RGB/alpha scale and bias using
|
||||
OpenXR's straight-color transform and restored premultiplication, and respects
|
||||
vertical orientation. Unknown scene/view chains, unsupported layout flags, and
|
||||
intervening layers keep the ordinary fallback; settings are not silently lost.
|
||||
The push constants fit Vulkan's guaranteed 128-byte minimum.
|
||||
|
||||
Each output image has separate commands, descriptors and fences. Positive wait
|
||||
timeouts retain acquisition for retry. Missing snapshots retain the previous
|
||||
combined output with the exact camera that produced it; old pixels are never
|
||||
relabelled with a newer pose. Teardown retires snapshot writers and compositor
|
||||
readers. Depth/motion-vector images from another render are not attached.
|
||||
|
||||
## Building and validation
|
||||
|
||||
Rebuild FrameBridge with Android NDK r27c:
|
||||
|
||||
```sh
|
||||
python native/build.py --only adapter --ndk /path/to/android-ndk-r27c
|
||||
```
|
||||
|
||||
The hardware plugin builder and its pinned source/runtime requirements are in
|
||||
`native/hevc/README.md`. Shader sources and their generated SPIR-V are included.
|
||||
Compile them for Vulkan 1.0 and validate with `spirv-val` when changing them.
|
||||
|
||||
The host tests cover package-scoped settings/assets/freshness, existing-wrapper
|
||||
updates, codec extraction checksums, runtime/container isolation, and preservation
|
||||
of original video assets. Android fixtures in `tests/fixtures/src/` exercise the
|
||||
production Vulkan shaders, hardware worker, camera/coverage helpers and YUV copies.
|
||||
The original-8K worker test requires a lawfully supplied cutscene file and the
|
||||
private codec in an isolated Android container; no game assets are distributed.
|
||||
|
||||
Validation on Steam Frame included stereo/fade/transparent/uncovered pixels,
|
||||
asymmetric vertical orientation, color/alpha transforms, unsupported-chain
|
||||
fallback, timeout retry, held camera metadata, reader teardown, hardware playback,
|
||||
pause/resume and seek. One isolated run presented 594/600 and 118/120 distinct
|
||||
scheduled original pictures, none early; 120 moving-head composition frames
|
||||
averaged 1.16 ms for submission plus GPU completion. These are isolated fixture
|
||||
results, not a guarantee of full-game frame rate.
|
||||
|
||||
The final build was also tested in Batman in-headset: cutscenes displayed and
|
||||
head-movement snap-back was reported resolved. Logs confirmed the combined path,
|
||||
full-resolution hardware decoding, over 12,500 scene frames with only two startup
|
||||
holds, and no subsequent old promotion messages or composition setup failures.
|
||||
Some frame-rate dips and existing Unity render-pass warnings remain. The patch
|
||||
does not claim universal game compatibility, exact Quest 3 pixel equivalence,
|
||||
or perfect frame timing.
|
||||
+7
-7
@@ -1,6 +1,6 @@
|
||||
# Themes
|
||||
|
||||
FramePort comes with three colour themes, all dark:
|
||||
FramePort comes with three color themes, all dark:
|
||||
|
||||
| Theme | Look |
|
||||
|---|---|
|
||||
@@ -16,7 +16,7 @@ A theme is a small JSON file. To make one:
|
||||
|
||||
1. In **Settings → Appearance**, pick the theme closest to what you want and click **Copy this theme as a file**.
|
||||
2. Paste it into a text editor and save it as `something.json`.
|
||||
3. Change the name and the colours you want different. You can delete every colour you keep: missing colours come
|
||||
3. Change the name and the colors you want different. You can delete every color you keep: missing colors come
|
||||
from the `base` theme.
|
||||
4. Back in **Settings → Appearance**, click **Install theme file…** and choose the file. FramePort checks it,
|
||||
switches to it and keeps a copy in its data folder (`themes/`), so you can delete the original.
|
||||
@@ -40,11 +40,11 @@ To remove an installed theme, click the bin icon on its card.
|
||||
| Field | Meaning |
|
||||
|---|---|
|
||||
| `name` | Shown on the theme's card (up to 40 characters). |
|
||||
| `base` | The built-in theme that fills in every colour the file leaves out: `portal` (default), `portal_oled` or `original`. |
|
||||
| `dual` | `true`: two-colour touches like Portal's (blue-to-orange sidebar edge, two-colour "FramePort", the selected tab's fade, blue secondary buttons). `false`: one accent, like Original. Default: the base's. |
|
||||
| `colors` | Any of the colours below, as `#RRGGBB` or `#RGB`. Names may be upper or lower case. |
|
||||
| `base` | The built-in theme that fills in every color the file leaves out: `portal` (default), `portal_oled` or `original`. |
|
||||
| `dual` | `true`: two-color touches like Portal's (blue-to-orange sidebar edge, two-color "FramePort", the selected tab's fade, blue secondary buttons). `false`: one accent, like Original. Default: the base's. |
|
||||
| `colors` | Any of the colors below, as `#RRGGBB` or `#RGB`. Names may be upper or lower case. |
|
||||
|
||||
| Colour | Used for |
|
||||
| Color | Used for |
|
||||
|---|---|
|
||||
| `BG` | Window background |
|
||||
| `SIDEBAR` | Sidebar and activity panel |
|
||||
@@ -57,5 +57,5 @@ To remove an installed theme, click the bin icon on its card.
|
||||
| `PC` | PC VR games and "on this PC" |
|
||||
|
||||
FramePort refuses a theme file it can't show well, and says why: a light window background (FramePort is dark only),
|
||||
text that's hard to read on cards, an unknown colour name or a value that isn't a colour. An example is in
|
||||
text that's hard to read on cards, an unknown color name or a value that isn't a color. An example is in
|
||||
[`themes/example-theme.json`](themes/example-theme.json).
|
||||
Binary file not shown.
@@ -53,7 +53,7 @@ shots:
|
||||
- wait_for: "Ready to play"
|
||||
|
||||
- name: files
|
||||
docs: [docs/COMPATIBILITY.md]
|
||||
docs: [docs/INSTALL.md]
|
||||
steps:
|
||||
- go: files
|
||||
- wait_for: "Upload files…"
|
||||
@@ -76,7 +76,7 @@ shots:
|
||||
- wait_for: "Close"
|
||||
|
||||
- name: type-on-frame
|
||||
docs: [README.md]
|
||||
docs: [docs/INSTALL.md]
|
||||
steps:
|
||||
- hook: type_tab
|
||||
- wait_for: "Keyboard connected"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# The install tutorial: from the download to the first game on the Steam Frame (docs/INSTALL.md links it; every
|
||||
# release attaches it as FramePort-install.mp4). FramePort starts as on a new computer (the "fresh" demo profile:
|
||||
# empty library, welcome screen, no Frame set up); what happens outside FramePort (the download, a command typed
|
||||
# on the Frame) is told on instruction cards. Recorded by scripts/showcase/record_video.py; the format is in
|
||||
# empty library, welcome screen, no Frame set up); what happens outside FramePort (the download, the setup line
|
||||
# run on the Frame) is told on instruction cards. Recorded by scripts/showcase/record_video.py; the format is in
|
||||
# docs/SHOWCASE.md ("Videos").
|
||||
|
||||
output: docs/media/frameport-install.mp4
|
||||
@@ -23,7 +23,7 @@ title:
|
||||
seconds: 3.4
|
||||
end:
|
||||
heading: You're set
|
||||
line: Your game is in the Frame's Steam library. More help in docs/INSTALL.md
|
||||
line: Your game is in the Frame's Steam library. More help at frameport.app/docs/install/
|
||||
footer: github.com/spoopyghosty0/frameport
|
||||
seconds: 4.0
|
||||
|
||||
@@ -31,12 +31,12 @@ scenes:
|
||||
- name: download
|
||||
seconds: 7.5
|
||||
card:
|
||||
eyebrow: "Step 1 · On your computer"
|
||||
eyebrow: "Step 1 · On your PC"
|
||||
heading: Download FramePort
|
||||
steps:
|
||||
- "Open **github.com/spoopyghosty0/frameport** → **Releases** → the latest one"
|
||||
- "Download the archive for your computer: **FramePort-windows-x64.zip**, **FramePort-macos-arm64.zip** or **FramePort-linux-x64.tar.gz**"
|
||||
- "Extract it anywhere. There's no installer and no admin rights are needed"
|
||||
- "Download the file for your PC: **FramePort-windows-x64.zip**, **FramePort-macos-arm64.zip** or **FramePort-linux-x64.tar.gz**"
|
||||
- "Unpack it anywhere. No installer or admin rights needed"
|
||||
|
||||
- name: first-start
|
||||
seconds: 7.5
|
||||
@@ -47,10 +47,10 @@ scenes:
|
||||
- "**Windows:** open **FramePort.exe**. At “Windows protected your PC” choose **More info** → **Run anyway**"
|
||||
- "**macOS:** right-click **FramePort.app** → **Open** → **Open**"
|
||||
- "**Linux:** run **FramePort/FramePort**"
|
||||
note: "FramePort is signed with a free certificate, so your system asks once."
|
||||
note: "FramePort isn't signed with a paid certificate, so your system asks once."
|
||||
|
||||
- name: welcome
|
||||
caption: ["FramePort gets itself ready", "It downloads the tools it uses (Java, OVRPort, apksigner) by itself"]
|
||||
caption: ["FramePort gets ready", "It downloads the tools it uses"]
|
||||
hold: 1.0
|
||||
steps:
|
||||
- wait: 1.0
|
||||
@@ -59,28 +59,50 @@ scenes:
|
||||
- wait: 1.0
|
||||
|
||||
- name: connect
|
||||
caption: ["Connect your Steam Frame", "Once: FramePort shows a command to run on the Frame"]
|
||||
caption: ["Connect your Steam Frame", "Once: one line on the Frame"]
|
||||
hold: 1.5
|
||||
steps:
|
||||
- click: "Set up the Frame"
|
||||
- wait: 1.6
|
||||
- click: "Show setup command"
|
||||
- wait_for: "Waiting for your Frame"
|
||||
- click: "Start setup"
|
||||
- wait_for: "Waiting for your Frame to ask"
|
||||
- wait: 1.0
|
||||
- hover: "Copy"
|
||||
- wait: 1.4
|
||||
|
||||
- name: on-the-frame
|
||||
seconds: 10
|
||||
seconds: 11
|
||||
card:
|
||||
eyebrow: "Step 3 · On the Frame, first time only"
|
||||
heading: Run the setup command
|
||||
heading: Run the setup line
|
||||
steps:
|
||||
- "In the SteamVR dashboard: **Launch a program** → **Desktop**"
|
||||
- "Open the app menu (bottom left) → **System** → **Konsole**"
|
||||
- "Type the command FramePort shows and press **Enter**"
|
||||
code: "curl -fsS <your-PC-address>:8765/<one-time-code> | bash"
|
||||
note: "FramePort shows your PC's address and a one-time code in place of **<…>**. The desktop closes by itself after a few seconds (Steam restarts once); if Steam asks to install **Lepton**, confirm it. No password is needed."
|
||||
- "Type the line and press **Enter** (or copy it from **frameport.app/setup** in Chromium)"
|
||||
code: "curl -sL frameport.app/s | bash"
|
||||
note: "Nothing changes on the Frame until you allow it on the PC."
|
||||
|
||||
- name: allow
|
||||
caption: ["Allow it on your PC", "FramePort shows the same code as the Frame"]
|
||||
hold: 1.2
|
||||
steps:
|
||||
- hook: {name: frame_asks, args: ["4831"]}
|
||||
- wait_for: "steamframe wants to be set up"
|
||||
- wait: 1.4
|
||||
- hover: "Allow"
|
||||
- wait: 0.8
|
||||
- click: "Allow"
|
||||
- wait: 0.8
|
||||
|
||||
- name: frame-setup
|
||||
seconds: 7
|
||||
card:
|
||||
eyebrow: "On the Frame, by itself"
|
||||
heading: The setup finishes on its own
|
||||
steps:
|
||||
- "**Developer Mode** turns on (no password)"
|
||||
- "Steam restarts once and the desktop closes"
|
||||
- "If Steam asks to install **Lepton**, confirm it"
|
||||
|
||||
- name: connected
|
||||
caption: ["Your Frame is connected", "From now on FramePort finds it by itself"]
|
||||
@@ -105,7 +127,7 @@ scenes:
|
||||
- wait: 1.0
|
||||
|
||||
- name: install
|
||||
caption: ["Install a game", "FramePort patches it, installs it and adds it to the Frame's Steam library"]
|
||||
caption: ["Install a game", "FramePort patches it and adds it to the Frame's Steam library"]
|
||||
hold: 1.2
|
||||
steps:
|
||||
- click: {name: "Lucky's Tale", dy: 0.35} # (the title: the card's middle is its Install button)
|
||||
|
||||
@@ -42,7 +42,7 @@ scenes:
|
||||
- wait: 1.6
|
||||
|
||||
- name: game
|
||||
caption: ["Every game gets its own recipe", "Known-good fixes from the catalog, or suggested from the game itself"]
|
||||
caption: ["Every game gets its own recipe", "Tested patches, or patches suggested for the game"]
|
||||
steps:
|
||||
- click: {name: "Riven", dy: 0.35} # (the title: the card's middle is its Install button)
|
||||
- wait: 1.8
|
||||
@@ -54,7 +54,7 @@ scenes:
|
||||
- wait: 0.5
|
||||
|
||||
- name: install
|
||||
caption: ["One click to install", "Patched, signed, uploaded, added to Steam and launch-tested"]
|
||||
caption: ["One click to install", "Patched, uploaded, added to Steam and tested"]
|
||||
teaser: [0.6, 4.0]
|
||||
hold: 1.2
|
||||
steps:
|
||||
@@ -108,7 +108,7 @@ scenes:
|
||||
- wait: 0.4
|
||||
|
||||
- name: files
|
||||
caption: ["Files on the Frame", "Videos, mods and saves: upload, download, select with a drag"]
|
||||
caption: ["Files on the Frame", "Upload and download videos, mods and saves"]
|
||||
steps:
|
||||
- nav: "Files"
|
||||
- wait: 1.6
|
||||
|
||||
+3
-1
@@ -11,11 +11,13 @@ embeds debug paths (`-g`) and the dex depends on the d8 version, so those differ
|
||||
|
||||
| Dir | Artifact | What / why |
|
||||
|---|---|---|
|
||||
| `adapter/` | `{arm64-v8a,armeabi-v7a}/libopenxr_loader_generic.so` | **FrameBridge**: replaces overport's generic loader (which is renamed `libopenxr_loader_original.so`) and fixes Steam Frame runtime gaps. Hooks xrCreateInstance, swapchains, xrEndFrame, spaces, xrPollEvent, … everything else is forwarded by `gen_forwarders.py`-generated tail calls. `scene_emu.c` = Meta scene/spatial-entity emulation; `flip_vk.c` = Vulkan blit for VERTICAL_FLIP quads. `session_fixes.c` = per-game session fixes, all off by default and hooked only when on (`layer_debug` diagnostics, `stable_local`, `focus_hold`, aim correction `aim_pitch/aim_yaw/aim_forward`, `refresh_rate`); `input_diag.c` = controller-input diagnostics (setting `input_diag`, off by default and hooked only when on; logs suggested interaction profiles and the runtime's answers, each hand's current profile, functions the runtime lacks and failing input/haptics/perf calls, each line once; tested on the host by `tests/test_input_diag.py`); `layer_emul_gl.c` = `equirect_emul` (GLES sessions only): 360° equirect/equirect2 layers become one adapter projection layer, drawn by a worker thread with its own EGL context shared with the app's: each 360° image is converted to a cube map only when it changes, and the view is redrawn only after a 4° head turn (GL/EGL resolved with dlopen, so Vulkan games never load them); `layer_math.h` = their pose/face math, tested on the host by `tests/test_layer_emul.py`. `render_model.c` = XR_FB_render_model emulation (setting `controller_models`, off by default): serves `files/framebridge/controller_{left,right}.glb`, which the agent converts on the Frame from SteamVR's own Frame controller render models (never shipped by FramePort); tested on the host by `tests/test_render_model.py`. Settings: `libframe_settings.so` in the APK + `settings.conf`/`framebridge.conf` on the Frame. |
|
||||
| `adapter/` | `{arm64-v8a,armeabi-v7a}/libopenxr_loader_generic.so` | **FrameBridge**: replaces overport's generic loader (which is renamed `libopenxr_loader_original.so`) and fixes Steam Frame runtime gaps. Hooks xrCreateInstance, swapchains, xrEndFrame, spaces, xrPollEvent, … everything else is forwarded by `gen_forwarders.py`-generated tail calls. `scene_emu.c` = Meta scene/spatial-entity emulation; `flip_vk.c` = Vulkan blit for VERTICAL_FLIP quads. `session_fixes.c` = per-game session fixes, all off by default and hooked only when on (`layer_debug` diagnostics, `stable_local`, `focus_hold`, aim correction `aim_pitch/aim_yaw/aim_forward`, `refresh_rate`, `proximity_emul` = finger proximity (XR_FB_touch_controller_proximity, which the Frame lacks) from the capacitive touch inputs: OVRPlugin's `hand_thumb_proximity`/`hand_trigger_proximity` actions get extra Touch bindings); `input_diag.c` = controller-input diagnostics (setting `input_diag`, off by default and hooked only when on; logs suggested interaction profiles and the runtime's answers, each hand's current profile, functions the runtime lacks and failing input/haptics/perf calls, each line once; tested on the host by `tests/test_input_diag.py`); `layer_emul_gl.c` = `equirect_emul` (GLES sessions only): 360° equirect/equirect2 layers become one adapter projection layer, drawn by a worker thread with its own EGL context shared with the app's: each 360° image is converted to a cube map only when it changes, and the view is redrawn only after a 4° head turn (GL/EGL resolved with dlopen, so Vulkan games never load them); `layer_math.h` = their pose/face math, tested on the host by `tests/test_layer_emul.py`. `render_model.c` = XR_FB_render_model emulation (setting `controller_models`, off by default): serves `files/framebridge/controller_{left,right}.glb`, which the agent converts on the Frame from SteamVR's own Frame controller render models (never shipped by FramePort); tested on the host by `tests/test_render_model.py`. Settings: `libframe_settings.so` in the APK + `settings.conf`/`framebridge.conf` on the Frame. |
|
||||
| `vrapi-bridge/` | `arm64-v8a/libvrapi.so` | VrApi → OpenXR bridge from [Android-XR-Bridge/OVRPort](https://github.com/Android-XR-Bridge/OVRPort) `native/vrapi` at 5e7df52 (GPL-3.0, `LICENSE.upstream`; unchanged upstream as of OVRPort v1.2.5, which ships the unpatched code as its opt-in `patch_vrapi_openxr` in experimental CLI builds), with our changes in `upstream-patches/`: GLES sessions + GL texture swapchains, cylinder→quad layers, GL vertical flip, UNORM↔sRGB format twins, 30 s VR-mode deadline, VALID-only recenter, loading-icon layers skipped, `vrapi_PollEvent`/`RecenterPose`/`SetDisplayRefreshRate`/`GetSystemPropertyFloatArray` (BlazeRush imports them, GitHub #57), diagnostics behind `-DOVP_GL_DIAG`. `upstream-patches/` reproduces these sources from the fork's `native/vrapi` (checked 2026-10-06 against its latest commit); upstream PRs Android-XR-Bridge/OVRPort#3-#8, tracked in GitHub #75. |
|
||||
| `platformcompat/` | `arm64-v8a/libovrplatformcompat.so` | Real `ovrMessageType_ToString` (same fork, `native/platform`). |
|
||||
| `langpack/` | `arm64-v8a/libfp_langpack.so` | Language packs for the Meta Platform SDK (patch `frame.langpacks`, opt-in). overport's platform loader is a dispatcher in front of Meta's own loader and answers `ovr_LanguagePack_GetCurrent/SetCurrent` with `return 0` (no reply ever). This library becomes the loader's first DT_NEEDED; the loader's own exports of the 31 functions it defines are made STB_LOCAL in `.dynsym` (`elf.hide_exports`, nothing moves), so symbol lookups reach the library first. It serves `<tag>.lang` files found in the game's OBB / app files (`$FRAMEPORT_LANGPACK_DIRS` overrides the search path) through `ovr_LanguagePack_*`, `ovr_AssetFile_GetList` (the loader's list + the packs) and `ovr_AssetFile_StatusById`; its own message queue is merged into `ovr_PopMessage`, and every handle that is not ours (an address-range check) goes to the loader's original function, whose address is read at run time from the loader's in-memory `.dynsym`. With patch `frame.asset_files` (marker byte `@FPASSETS@`, or env `FRAMEPORT_ASSET_FILES=1`) it also lists the data's `*.pak` content files as installed `default` asset files and answers `ovr_AssetFile_DownloadById` for them at once (a completed `DownloadUpdate`, then the result with the path). Host-tested against a stand-in loader (`tests/test_langpack.py`, plain `cc`, no NDK); the bionic/headset side is unverified. |
|
||||
| `glshim/` | `arm64-v8a/libglshim.so` | Mesa GLSL compatibility for GLAD engines (hooks eglGetProcAddress): comments out `#pragma` before `#extension`, enables `GL_EXT_shader_implicit_conversions`, hides GL_OVR_multiview (`gl_hide_multiview`, default 1) and logs failed shaders. `-DGLSHIM_TRACE` adds per-FBO draw/error tracing. |
|
||||
| `glmv/` | `arm64-v8a/libfpglmv.so` | Single-view draws of OVR_multiview programs (patch `frame.gl_multiview_fbo`, opt-in, GitHub #77). Mesa enforces OVR_multiview's rule that a draw's program declares as many views as the draw framebuffer has; engines that compile every shader with `num_views=2` and also draw into ordinary 2D framebuffers (Doom3Quest's HUD/PDA pool) lose those draws. The engine library gets it as first DT_NEEDED (direct `gl*` imports) and its `dlopen("libGLESv3.so")` string is rewritten to `libfpglmv.so` (same length; its `qgl*` dlsym table); linked `--no-as-needed` to libGLESv3 so dlsym on its handle finds everything it doesn't wrap. It records stage sources at glLinkProgram, caches the draw framebuffer's color-attachment view count per bind, and when a multiview program draws into a 0-view framebuffer it binds a lazily built twin (`glmv_rewrite.h`: num_views layout blanked, `gl_ViewID_OVR` -> `(0u)`; attribute locations + uniform block bindings copied, default-block uniforms copied before every such draw with a shadow to skip unchanged ones), draws, rebinds the original. Logcat tag `GLMV`; `gl_mv_debug=1`. The rewriter is host-tested on Doom3Quest's 19 shaders (`tests/test_gl_multiview_fbo.py`); untested on the device. |
|
||||
| `zinkfix/` | `arm64-v8a/libVkLayer_fp_shaderfix.so` | Shader-fix Vulkan layer `VK_LAYER_FP_shader_fix` for OpenGL ES games (patch `frame.zink_shader_fix`): sits between Zink (Mesa's GL on Vulkan) and the driver and inserts the words of `zink_shader_fix` (same format as the Vulkan shim's `vk_shader_fix`: size + SHA-256 match) into SPIR-V modules; `zink_shader_dump=1` writes every distinct module to `files/fp_spirv/`. The engine library loads it first (DT_NEEDED); its constructor puts the layer in front of Android's GraphicsEnv debug layer list (private Android 11 `getDebugLayers`/`setDebugLayers`, found through libvulkan.so's dependencies) before EGL starts, so the loader picks it up from the app's lib dir. Exports only the enumeration functions and `VK_LAYER_FP_shader_fixGet*ProcAddr` (never plain `vk*` entry points). Vader Immortal's lightspeed shaders (Klownicle, GitHub #49). |
|
||||
| `xrlayer/` | `linux-arm64/libxr_frameport_timefix.so` + `XR_APILAYER_FRAMEPORT_timefix.json` | OpenXR API layer for Windows PC VR games under Proton on the Frame (glibc aarch64, built freestanding with the NDK's clang), on by default (patch `pcvr.xr_timefix`). Retries `xrCreateInstance` as an OpenXR 1.0 app when the runtime rejects 1.1 (the Frame's SteamVR runtime does, and Proton 11's VR helper asks for 1.1). Also emulates `xrConvertTimespecTimeToTimeKHR`/`xrConvertTimeToTimespecTimeKHR` if the runtime refuses them (the Frame's Android runtime does; its Linux runtime, used by Proton, supports them as of 2026-09-29 — so this part is only a fallback; Proton's wineopenxr needs them for `XR_KHR_win32_convert_performance_counter_time`, which Revive requires) with the adapter's xrWaitFrame-calibrated offset, and drops the extension from xrCreateInstance if the runtime rejects it. Enabled per game by the Proton launch.sh (`XR_API_LAYER_PATH`, `XR_ENABLE_API_LAYERS`). `tests/test_xrlayer.py` builds it for x86_64 and drives it via ctypes. |
|
||||
| `oculushmd/` | `win-x64/fp_oculushmd.exe` | PC VR counterpart of overport's `patch_oculus_unreal` (patch `pcvr.oculus_unreal`, default for Unreal Rift games on the Frame). Unreal's OculusHMD and LibOVR's `ovr_Detect` only start when the Windows named event `OculusHMDConnected` exists and is signalled (the Oculus service creates it). `fp_oculushmd.exe <command line>` creates it (manual reset, signalled), runs the command (Revive's injector) in a job object and keeps the event until every process in the job — the game and its children — has exited (fallback without job support: 3 minutes); returns the command's exit code and logs `FramePort oculushmd: …` to stderr (launch.log). Freestanding Windows x64 console exe (no CRT, no Windows SDK): the NDK's clang + `lld-link /Brepro` with a kernel32 import library generated by `llvm-dlltool`, so it's byte-reproducible. Tested on Windows from WSL with a build whose event name is `-DEVENT_NAME=L"…"` (the Oculus service owns the real event on a PC with the Oculus app). |
|
||||
| `xrshim/` | `arm64-v8a/libframe_xrshim.so` | FrameBridge extension shim, only in builds with `controller_models=1`. overport's dispatcher (`libopenxr_loader.so`) answers `xrGetInstanceProcAddr` from a fixed table and refuses everything else (`overportOXR: Unknown proc addr: xrLoadRenderModelFB`), so the adapter never sees XR_FB_render_model lookups. Meta's OVRPlugin gets the function with `dlopen("libopenxr_loader.so")` + `dlsym`, so FramePort rewrites that `.rodata` string in `libOVRPlugin.so` (same length, in place) to `libframe_xrshim.so`. The shim returns the adapter's emulated functions (`framebridge_extension_proc`) and forwards every other name to overport. A DT_NEEDED interposer does not work here (dlsym on a handle searches that library first); tried and dropped. |
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Included by frame_adapter.c (after layer_emul_gl.c, whose GL entry points it shares). cube_standin (default on):
|
||||
// the Frame's runtime has no cube layers (XR_KHR_composition_layer_cube) and refuses cube swapchains (faceCount 6)
|
||||
// with XR_ERROR_RUNTIME_FAILURE. OVRPlugin doesn't check: it goes on with "CreateSwapchain for eye 0: 0x0, 0 stages"
|
||||
// and writes past its empty image list in the next ovrp_EndFrame4 (Unity's render thread SIGSEGV in memset, e.g.
|
||||
// Budget Cuts Ultimate's cube-map overlay, GitHub #107). Only when the runtime refused one, a cube swapchain is served
|
||||
// by the adapter instead: one GL cube-map texture (the format, size and mip levels asked for) in the app's current
|
||||
// GLES context, acquire/wait/release succeed at once. The app renders or copies into it as usual; layers that use it
|
||||
// are dropped in xrEndFrame (the runtime couldn't show them anyway). Vulkan sessions (no current EGL context) keep
|
||||
// the runtime's error.
|
||||
#define STANDIN_MAX 8
|
||||
static struct { XrSwapchain handle; GLuint tex; } standins[STANDIN_MAX];
|
||||
static pthread_mutex_t standin_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
static int standin_find(XrSwapchain handle) {
|
||||
if (!handle) return -1;
|
||||
int slot = -1;
|
||||
pthread_mutex_lock(&standin_lock);
|
||||
for (int i = 0; i < STANDIN_MAX && slot < 0; ++i)
|
||||
if (standins[i].handle == handle) slot = i;
|
||||
pthread_mutex_unlock(&standin_lock);
|
||||
return slot;
|
||||
}
|
||||
|
||||
static int is_standin(XrSwapchain handle) { return cube_standin && standin_find(handle) >= 0; }
|
||||
|
||||
// After the runtime refused a swapchain: serve a cube stand-in if it was a cube swapchain in a GLES context.
|
||||
static XrResult standin_after_failure(const XrSwapchainCreateInfo *info, XrSwapchain *out, XrResult result) {
|
||||
if (XR_SUCCEEDED(result) || !cube_standin || !info || !out || info->faceCount != 6) return result;
|
||||
if (info->width != info->height || !info->width || info->arraySize > 1) return result;
|
||||
if (!p_eglCreateContext && !emul_load_gl()) { LOG("cube_standin: no GLES, the runtime's error stays"); return result; }
|
||||
if (p_eglGetCurrentContext() == EGL_NO_CONTEXT) {
|
||||
LOG("cube_standin: no current GLES context (Vulkan?), the runtime's error stays");
|
||||
return result;
|
||||
}
|
||||
int slot = -1;
|
||||
pthread_mutex_lock(&standin_lock);
|
||||
for (int i = 0; i < STANDIN_MAX && slot < 0; ++i)
|
||||
if (!standins[i].handle) slot = i;
|
||||
if (slot >= 0) standins[slot].handle = (XrSwapchain)1; // reserved
|
||||
pthread_mutex_unlock(&standin_lock);
|
||||
if (slot < 0) { LOG("cube_standin: too many cube swapchains, the runtime's error stays"); return result; }
|
||||
GLsizei levels = info->mipCount > 1 ? (GLsizei)info->mipCount : 1;
|
||||
for (int i = 0; i < 8 && p_glGetError() != GL_NO_ERROR; ++i) {}
|
||||
GLint previous = 0;
|
||||
p_glGetIntegerv(GL_TEXTURE_BINDING_CUBE_MAP, &previous);
|
||||
GLuint tex = 0;
|
||||
p_glGenTextures(1, &tex);
|
||||
p_glBindTexture(GL_TEXTURE_CUBE_MAP, tex);
|
||||
p_glTexStorage2D(GL_TEXTURE_CUBE_MAP, levels, (GLenum)info->format, (GLsizei)info->width, (GLsizei)info->height);
|
||||
GLenum err = p_glGetError();
|
||||
p_glBindTexture(GL_TEXTURE_CUBE_MAP, (GLuint)previous); // the app's binding, untouched
|
||||
if (err != GL_NO_ERROR) {
|
||||
p_glDeleteTextures(1, &tex);
|
||||
pthread_mutex_lock(&standin_lock);
|
||||
standins[slot].handle = XR_NULL_HANDLE;
|
||||
pthread_mutex_unlock(&standin_lock);
|
||||
LOG("cube_standin: couldn't make a %ux%u cube map (GL 0x%x), the runtime's error stays", info->width,
|
||||
info->height, err);
|
||||
return result;
|
||||
}
|
||||
XrSwapchain handle = FAKE_HANDLE(XrSwapchain);
|
||||
pthread_mutex_lock(&standin_lock);
|
||||
standins[slot].handle = handle;
|
||||
standins[slot].tex = tex;
|
||||
pthread_mutex_unlock(&standin_lock);
|
||||
*out = handle;
|
||||
LOG("cube_standin: runtime refused a %ux%u cube swapchain (result=%d): served by FrameBridge (GL cube map %u, "
|
||||
"%d levels); its cube layers are dropped", info->width, info->height, result, tex, (int)levels);
|
||||
return XR_SUCCESS;
|
||||
}
|
||||
|
||||
static XrResult standin_enumerate(XrSwapchain handle, uint32_t capacity, uint32_t *count, XrSwapchainImageBaseHeader *images) {
|
||||
if (!count) return XR_ERROR_VALIDATION_FAILURE;
|
||||
*count = 1;
|
||||
if (!capacity) return XR_SUCCESS;
|
||||
if (!images) return XR_ERROR_VALIDATION_FAILURE;
|
||||
if (images->type != XR_TYPE_SWAPCHAIN_IMAGE_OPENGL_ES_KHR) return XR_ERROR_VALIDATION_FAILURE;
|
||||
int slot = standin_find(handle);
|
||||
((emul_gles_image *)images)[0].image = slot >= 0 ? standins[slot].tex : 0;
|
||||
return XR_SUCCESS;
|
||||
}
|
||||
|
||||
static void standin_destroy(XrSwapchain handle) {
|
||||
pthread_mutex_lock(&standin_lock);
|
||||
for (int i = 0; i < STANDIN_MAX; ++i)
|
||||
if (standins[i].handle == handle) {
|
||||
if (p_eglGetCurrentContext && p_eglGetCurrentContext() != EGL_NO_CONTEXT) p_glDeleteTextures(1, &standins[i].tex);
|
||||
standins[i].handle = XR_NULL_HANDLE;
|
||||
standins[i].tex = 0;
|
||||
}
|
||||
pthread_mutex_unlock(&standin_lock);
|
||||
}
|
||||
|
||||
// A layer that shows a stand-in: never passed to the runtime (whatever layer_fix says).
|
||||
static int layer_uses_standin(const XrCompositionLayerBaseHeader *layer) {
|
||||
if (!cube_standin || !layer) return 0;
|
||||
switch (layer->type) {
|
||||
case XR_TYPE_COMPOSITION_LAYER_CUBE_KHR:
|
||||
return is_standin(((const XrCompositionLayerCubeKHR *)layer)->swapchain);
|
||||
case XR_TYPE_COMPOSITION_LAYER_QUAD:
|
||||
return is_standin(((const XrCompositionLayerQuad *)layer)->subImage.swapchain);
|
||||
case XR_TYPE_COMPOSITION_LAYER_CYLINDER_KHR:
|
||||
return is_standin(((const XrCompositionLayerCylinderKHR *)layer)->subImage.swapchain);
|
||||
case XR_TYPE_COMPOSITION_LAYER_EQUIRECT_KHR:
|
||||
return is_standin(((const XrCompositionLayerEquirectKHR *)layer)->subImage.swapchain);
|
||||
case XR_TYPE_COMPOSITION_LAYER_EQUIRECT2_KHR:
|
||||
return is_standin(((const XrCompositionLayerEquirect2KHR *)layer)->subImage.swapchain);
|
||||
case XR_TYPE_COMPOSITION_LAYER_PROJECTION: {
|
||||
const XrCompositionLayerProjection *p = (const XrCompositionLayerProjection *)layer;
|
||||
for (uint32_t v = 0; v < p->viewCount; ++v)
|
||||
if (is_standin(p->views[v].subImage.swapchain)) return 1;
|
||||
return 0;
|
||||
}
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// XR_FB_swapchain_update_state on a stand-in: nothing to update (only hooked when the runtime has the function).
|
||||
static PFN_xrUpdateSwapchainFB real_update_swapchain;
|
||||
static PFN_xrGetSwapchainStateFB real_get_swapchain_state;
|
||||
static XRAPI_ATTR XrResult XRAPI_CALL standin_update_swapchain(XrSwapchain swapchain, const XrSwapchainStateBaseHeaderFB *state) {
|
||||
if (is_standin(swapchain)) return XR_SUCCESS;
|
||||
return real_update_swapchain ? real_update_swapchain(swapchain, state) : XR_ERROR_FUNCTION_UNSUPPORTED;
|
||||
}
|
||||
static XRAPI_ATTR XrResult XRAPI_CALL standin_get_swapchain_state(XrSwapchain swapchain, XrSwapchainStateBaseHeaderFB *state) {
|
||||
if (is_standin(swapchain)) return XR_ERROR_VALIDATION_FAILURE; // no state to report (apps treat it as "unsupported")
|
||||
return real_get_swapchain_state ? real_get_swapchain_state(swapchain, state) : XR_ERROR_FUNCTION_UNSUPPORTED;
|
||||
}
|
||||
@@ -40,6 +40,7 @@ static XRAPI_ATTR XrResult XRAPI_CALL eye_hook_xrReleaseSwapchainImage(XrSwapcha
|
||||
const XrSwapchainImageReleaseInfo *info) {
|
||||
PFN_xrReleaseSwapchainImage fn = (PFN_xrReleaseSwapchainImage)lookup(active_instance, "xrReleaseSwapchainImage");
|
||||
if (!fn) return XR_ERROR_FUNCTION_UNSUPPORTED;
|
||||
if (is_standin(swapchain)) return XR_SUCCESS;
|
||||
if (release_wait_active()) eye_wait_for_gpu();
|
||||
XrResult result = fn(swapchain, info);
|
||||
if (eye_debug) {
|
||||
|
||||
@@ -47,6 +47,7 @@ typedef struct {
|
||||
VkImage images[MAX_IMAGES];
|
||||
uint32_t image_count;
|
||||
uint32_t last_acquired;
|
||||
uint32_t acquired[MAX_IMAGES], acquired_count, waited_count;
|
||||
XrSwapchain shadow;
|
||||
XrRect2Di shadow_rect;
|
||||
VkImage shadow_images[MAX_IMAGES];
|
||||
@@ -105,7 +106,10 @@ static void flip_on_enumerate_images(XrSwapchain handle, uint32_t count, const X
|
||||
static void flip_on_acquire(XrSwapchain handle, uint32_t index) {
|
||||
pthread_mutex_lock(&flip_lock);
|
||||
tracked_swapchain *t = find_tracked(handle, 0);
|
||||
if (t) t->last_acquired = index;
|
||||
if (t) {
|
||||
t->last_acquired = index;
|
||||
if(t->acquired_count<MAX_IMAGES)t->acquired[t->acquired_count++]=index;
|
||||
}
|
||||
pthread_mutex_unlock(&flip_lock);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
// * drops requested instance extensions the runtime lacks (e.g. XR_FB_passthrough);
|
||||
// * retries rejected swapchains with 1 sample / a supported format (swapchain_fix, overport #71);
|
||||
// * drops composition layers that reference swapchains that failed to create (layer_fix);
|
||||
// * serves cube swapchains the runtime refuses as GL cube maps and drops their layers (cube_standin, cube_standin.c);
|
||||
// * optionally requests mutable-format swapchain images (mutable_fix, off by default);
|
||||
// * optionally swaps left/right images of stereo projection layers (swap_eyes, off by default);
|
||||
// * emulates XR_FB_passthrough with XR_ENVIRONMENT_BLEND_MODE_ALPHA_BLEND when the runtime lacks it
|
||||
@@ -37,6 +38,7 @@
|
||||
// /sdcard/Android/data/<package>/files/framebridge.conf
|
||||
// $FRAMEBRIDGE_CONFIG
|
||||
#define _GNU_SOURCE
|
||||
#define VK_USE_PLATFORM_ANDROID_KHR
|
||||
#define XR_EXTENSION_PROTOTYPES
|
||||
#include <openxr/openxr.h>
|
||||
#include <android/log.h>
|
||||
@@ -73,6 +75,7 @@ static void fb_log(const char *fmt, ...) {
|
||||
}
|
||||
#define LOG(...) fb_log(__VA_ARGS__)
|
||||
#include "audio_metadata.h"
|
||||
#include "surface_views.h"
|
||||
|
||||
static void *loader;
|
||||
static PFN_xrGetInstanceProcAddr next_gipa;
|
||||
@@ -80,8 +83,10 @@ static pthread_once_t init_once = PTHREAD_ONCE_INIT;
|
||||
static XrInstance active_instance = XR_NULL_HANDLE;
|
||||
static void *android_vm; // JavaVM from XrInstanceCreateInfoAndroidKHR (surface_swapchain.c)
|
||||
static int surface_emul = 1; // setting: emulate Android surface swapchains
|
||||
static int surface_native; // internal: GPU shared video buffers (panoramic video clients)
|
||||
static int eye_debug; // setting: per-eye diagnostics + file log (eye_debug.c)
|
||||
static int release_wait; // setting: wait for the app's GPU work before releasing images (2 = after 60 s: A/B)
|
||||
static void surf_scene_destroy(XrSwapchain handle);
|
||||
static void surf_on_destroy(XrSwapchain handle);
|
||||
|
||||
static float scale = 1.0f;
|
||||
@@ -103,8 +108,11 @@ static int frame_open;
|
||||
static int sc_acquires, sc_waits, sc_releases, sc_wait_fails; // per pacing period (layer_debug) // drop XrCompositionLayerColorScaleBiasKHR (the runtime's color pass)
|
||||
static int controller_fix = 1;
|
||||
static int swapchain_fix = 1;
|
||||
static int cube_standin = 1; // cube swapchains the runtime refuses: served by the adapter (cube_standin.c)
|
||||
static int rect_clamp = 1;
|
||||
static int pose_consistency = 0; // repeat xrLocateViews queries for one display time get the same poses (GitHub #8) // clamp submitted image rects to their swapchain (SteamVR rejects a 1 px overrun)
|
||||
static int pose_time_fix; // poses asked for at CLOCK_MONOTONIC "now" or far in the past: at XrTime "now" (pose_time.c)
|
||||
static int pose_debug; // diagnostics: requested pose times vs the predicted display time (pose_time.c)
|
||||
static int layer_fix = 1;
|
||||
static int mutable_fix = 0;
|
||||
static int swap_eyes = 0;
|
||||
@@ -127,6 +135,8 @@ static int controller_models; // serve Frame controller models via XR_FB_render
|
||||
// Per-game settings, all off by default (session_fixes.c, layer_emul_gl.c).
|
||||
static int sync_guard; // xrSyncActions one at a time with xrPollEvent, paused briefly after focus returns
|
||||
static int profile_remap = 1; // Meta's newer controller profiles (rejected by the Frame) -> oculus/touch_controller
|
||||
static int proximity_emul; // finger proximity from capacitive touch: 1 thumb, 2 thumb + index (session_fixes.c)
|
||||
static int runtime_has_proximity; // the runtime has XR_FB_touch_controller_proximity itself
|
||||
static int layer_debug; // diagnostics: layers, swapchains, session states, spaces, aim/grip, refresh rates
|
||||
static int input_diag; // diagnostics: controller profiles, bindings, missing functions, failing input calls
|
||||
static int stable_local; // keep every LOCAL space the app creates on the session-start origin
|
||||
@@ -137,7 +147,7 @@ static float aim_pitch, aim_yaw, aim_forward; // aim pose correction (degrees,
|
||||
static float refresh_rate; // requested display refresh rate (Hz), 0 = the app's choice
|
||||
static int equirect_emul; // show 360 layers as cube faces (GLES)
|
||||
static int equirect_face = 1536; // max cube map face size (px)
|
||||
static int equirect_res = 1536; // projection image size per eye (px)
|
||||
static int equirect_res = 1536, equirect_res_set; // projection image size per eye (px)
|
||||
static int equirect_flip; // source orientation fix: 1 upside down, 2 mirrored, 4 turned 180 degrees
|
||||
static float equirect_fps = 60; // max redraws per second per 360 layer (0 = no limit)
|
||||
static int equirect_stereo; // 0 auto (mono if the layer limit can't hold both eyes), 1 stereo, 2 mono
|
||||
@@ -158,8 +168,11 @@ static void read_settings(const char *path) {
|
||||
if (sscanf(line, "snapshot=%f", &value) == 1) snapshot = value > 0 ? (int)value : 0;
|
||||
if (sscanf(line, "controller_fix=%f", &value) == 1) controller_fix = value != 0;
|
||||
if (sscanf(line, "swapchain_fix=%f", &value) == 1) swapchain_fix = value != 0;
|
||||
if (sscanf(line, "cube_standin=%f", &value) == 1) cube_standin = value != 0;
|
||||
if (sscanf(line, "rect_clamp=%f", &value) == 1) rect_clamp = value != 0;
|
||||
if (sscanf(line, "pose_consistency=%f", &value) == 1) pose_consistency = value != 0;
|
||||
if (sscanf(line, "pose_debug=%f", &value) == 1) pose_debug = value != 0;
|
||||
if (sscanf(line, "pose_time_fix=%f", &value) == 1) pose_time_fix = value != 0;
|
||||
if (sscanf(line, "layer_fix=%f", &value) == 1) layer_fix = value != 0;
|
||||
if (sscanf(line, "mutable_fix=%f", &value) == 1) mutable_fix = value != 0;
|
||||
if (sscanf(line, "swap_eyes=%f", &value) == 1) swap_eyes = value != 0;
|
||||
@@ -177,9 +190,11 @@ static void read_settings(const char *path) {
|
||||
if (sscanf(line, "layer_debug=%f", &value) == 1) layer_debug = value != 0;
|
||||
if (sscanf(line, "input_diag=%f", &value) == 1) input_diag = value != 0;
|
||||
if (sscanf(line, "surface_emul=%f", &value) == 1) surface_emul = value != 0;
|
||||
if (sscanf(line, "surface_native=%f", &value) == 1) surface_native = value != 0;
|
||||
if (sscanf(line, "eye_debug=%f", &value) == 1) eye_debug = value != 0;
|
||||
if (sscanf(line, "release_wait=%f", &value) == 1) release_wait = (int)value;
|
||||
if (sscanf(line, "profile_remap=%f", &value) == 1) profile_remap = value != 0;
|
||||
if (sscanf(line, "proximity_emul=%f", &value) == 1 && value >= 0 && value <= 2) proximity_emul = (int)value;
|
||||
if (sscanf(line, "sync_guard=%f", &value) == 1) sync_guard = value != 0;
|
||||
if (sscanf(line, "stable_local=%f", &value) == 1) stable_local = value != 0;
|
||||
if (sscanf(line, "focus_hold=%f", &value) == 1) focus_hold = value != 0;
|
||||
@@ -191,7 +206,7 @@ static void read_settings(const char *path) {
|
||||
if (sscanf(line, "refresh_rate=%f", &value) == 1 && (value == 0 || (value >= 60 && value <= 144))) refresh_rate = value;
|
||||
if (sscanf(line, "equirect_emul=%f", &value) == 1) equirect_emul = value != 0;
|
||||
if (sscanf(line, "equirect_face=%f", &value) == 1 && value >= 256 && value <= 2730) equirect_face = (int)value;
|
||||
if (sscanf(line, "equirect_res=%f", &value) == 1 && value >= 512 && value <= 4096) equirect_res = (int)value;
|
||||
if (sscanf(line, "equirect_res=%f", &value) == 1 && value >= 512 && value <= 4096) {equirect_res = (int)value;equirect_res_set=1;}
|
||||
if (sscanf(line, "equirect_flip=%f", &value) == 1 && value >= 0 && value <= 7) equirect_flip = (int)value;
|
||||
if (sscanf(line, "equirect_fps=%f", &value) == 1 && value >= 0 && value <= 144) equirect_fps = value;
|
||||
if (sscanf(line, "equirect_stereo=%f", &value) == 1 && value >= 0 && value <= 2) equirect_stereo = (int)value;
|
||||
@@ -240,6 +255,8 @@ static void initialize(void) {
|
||||
log_file = fopen(path, "a");
|
||||
}
|
||||
if (input_diag) LOG("per-game: input_diag=1 (controller-input diagnostics)");
|
||||
if (proximity_emul) LOG("per-game: proximity_emul=%d (finger proximity from capacitive touch: %s)", proximity_emul,
|
||||
proximity_emul > 1 ? "thumb + index" : "thumb");
|
||||
if (hide_space_warp) LOG("per-game: hide_space_warp=1 (XR_FB_space_warp hidden, space warp info removed)");
|
||||
if (strip_color_bias) LOG("per-game: strip_color_bias=%d (layer color scale/bias removed)", strip_color_bias);
|
||||
if (frame_balance) LOG("per-game: frame_balance=1 (an open frame is ended before the next one begins)");
|
||||
@@ -359,6 +376,7 @@ XRAPI_ATTR XrResult XRAPI_CALL xrCreateInstance(const XrInstanceCreateInfo *info
|
||||
}
|
||||
for (uint32_t j = 0; available && j < available_count; ++j)
|
||||
if (!strcmp(available[j].extensionName, "XR_FB_composition_layer_image_layout")) runtime_has_image_layout = 1;
|
||||
else if (!strcmp(available[j].extensionName, "XR_FB_touch_controller_proximity")) runtime_has_proximity = 1;
|
||||
// Layer types are only valid if their extension ends up enabled; some apps submit them regardless.
|
||||
int has_equirect = 0, has_equirect2 = 0, has_cylinder = 0, has_cube = 0;
|
||||
for (uint32_t i = 0; i < kept; ++i) {
|
||||
@@ -499,6 +517,10 @@ static int emul_is_virtual(XrSwapchain handle);
|
||||
static void emul_virtual_destroy(XrSwapchain handle);
|
||||
static XrResult emul_virtual_enumerate(XrSwapchain handle, uint32_t capacity, uint32_t *count, XrSwapchainImageBaseHeader *images);
|
||||
static void emul_on_acquire(XrSwapchain handle, uint32_t index);
|
||||
static XrResult standin_after_failure(const XrSwapchainCreateInfo *info, XrSwapchain *out, XrResult result);
|
||||
static int is_standin(XrSwapchain handle);
|
||||
static void standin_destroy(XrSwapchain handle);
|
||||
static XrResult standin_enumerate(XrSwapchain handle, uint32_t capacity, uint32_t *count, XrSwapchainImageBaseHeader *images);
|
||||
|
||||
static int known_swapchain(XrSwapchain handle) {
|
||||
int found = 0;
|
||||
@@ -521,6 +543,11 @@ XRAPI_ATTR XrResult XRAPI_CALL xrCreateSwapchain(XrSession session, const XrSwap
|
||||
fixed.next = p;
|
||||
}
|
||||
if (mutable_fix) fixed.usageFlags |= XR_SWAPCHAIN_USAGE_MUTABLE_FORMAT_BIT;
|
||||
// Internal native-video composition snapshots the owned stereo scene before
|
||||
// release. Other games and UI/depth/MSAA swapchains keep their original usage.
|
||||
if(surface_native && fixed.arraySize==2 && fixed.sampleCount==1 &&
|
||||
(fixed.usageFlags&XR_SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT))
|
||||
fixed.usageFlags |= XR_SWAPCHAIN_USAGE_TRANSFER_SRC_BIT;
|
||||
if (equirect_emul && swapchain && emul_virtual_create(session, &fixed, swapchain)) {
|
||||
remember_swapchain(*swapchain);
|
||||
emul_on_create_swapchain(*swapchain, &fixed);
|
||||
@@ -539,7 +566,7 @@ XRAPI_ATTR XrResult XRAPI_CALL xrCreateSwapchain(XrSession session, const XrSwap
|
||||
snap_on_create(*swapchain, &fixed);
|
||||
return result;
|
||||
}
|
||||
if (!swapchain_fix) return result;
|
||||
if (!swapchain_fix) return standin_after_failure(&fixed, swapchain, result);
|
||||
|
||||
// Frame's runtime rejects some GLES formats (GL_RGBA8) and MSAA swapchains (overport #71).
|
||||
if (fixed.sampleCount > 1) {
|
||||
@@ -562,7 +589,7 @@ XRAPI_ATTR XrResult XRAPI_CALL xrCreateSwapchain(XrSession session, const XrSwap
|
||||
emul_on_create_swapchain(*swapchain, &fixed);
|
||||
snap_on_create(*swapchain, &fixed);
|
||||
}
|
||||
return result;
|
||||
return standin_after_failure(&fixed, swapchain, result);
|
||||
}
|
||||
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrDestroySwapchain(XrSwapchain swapchain) {
|
||||
@@ -572,6 +599,8 @@ XRAPI_ATTR XrResult XRAPI_CALL xrDestroySwapchain(XrSwapchain swapchain) {
|
||||
static int logged;
|
||||
if (logged++ < 200) LOG("layer_debug: xrDestroySwapchain %p", (void *)swapchain);
|
||||
}
|
||||
if (is_standin(swapchain)) { standin_destroy(swapchain); return XR_SUCCESS; }
|
||||
surf_scene_destroy(swapchain);
|
||||
forget_swapchain(swapchain);
|
||||
surf_on_destroy(swapchain);
|
||||
flip_on_destroy(swapchain);
|
||||
@@ -753,6 +782,7 @@ XRAPI_ATTR XrResult XRAPI_CALL xrGetSystemProperties(XrInstance instance, XrSyst
|
||||
}
|
||||
|
||||
#include "flip_vk.c"
|
||||
#include "pose_time.c"
|
||||
|
||||
// XR_KHR_convert_timespec_time for runtimes that lack it (Frame): XrTime is derived from the monotonic clock
|
||||
// using the offset measured at the last xrWaitFrame. The runtime's own implementation is preferred.
|
||||
@@ -762,10 +792,14 @@ static PFN_xrConvertTimeToTimespecTimeKHR runtime_time_to_timespec;
|
||||
static XRAPI_ATTR XrResult XRAPI_CALL emu_timespec_to_time(XrInstance instance, const struct timespec *ts, XrTime *time) {
|
||||
if (runtime_timespec_to_time) {
|
||||
XrResult r = runtime_timespec_to_time(instance, ts, time);
|
||||
if (r != XR_ERROR_FUNCTION_UNSUPPORTED) return r;
|
||||
if (r != XR_ERROR_FUNCTION_UNSUPPORTED) {
|
||||
if (XR_SUCCEEDED(r) && time) pose_time_note("xrConvertTimespecTimeToTimeKHR (runtime)", 0, 0, *time);
|
||||
return r;
|
||||
}
|
||||
}
|
||||
if (!ts || !time) return XR_ERROR_VALIDATION_FAILURE;
|
||||
*time = (XrTime)((int64_t)ts->tv_sec * 1000000000ll + ts->tv_nsec + (xr_time_calibrated ? xr_time_offset : 0));
|
||||
pose_time_note("xrConvertTimespecTimeToTimeKHR", 0, 0, *time);
|
||||
return XR_SUCCESS;
|
||||
}
|
||||
static XRAPI_ATTR XrResult XRAPI_CALL emu_time_to_timespec(XrInstance instance, XrTime time, struct timespec *ts) {
|
||||
@@ -781,6 +815,8 @@ static XRAPI_ATTR XrResult XRAPI_CALL emu_time_to_timespec(XrInstance instance,
|
||||
}
|
||||
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrLocateSpace(XrSpace space, XrSpace baseSpace, XrTime time, XrSpaceLocation *location) {
|
||||
time = pose_time_fixed(time);
|
||||
pose_time_note("xrLocateSpace", (uint64_t)(uintptr_t)space, (uint64_t)(uintptr_t)baseSpace, time);
|
||||
if (emulate_scene && location) {
|
||||
XrPosef pose; XrSpaceLocationFlags flags;
|
||||
if (locate_fake(space, baseSpace, time, &pose, &flags)) {
|
||||
@@ -796,6 +832,14 @@ XRAPI_ATTR XrResult XRAPI_CALL xrLocateSpace(XrSpace space, XrSpace baseSpace, X
|
||||
static XrResult locate_spaces_common(const char *name, XrSession session, const XrSpacesLocateInfo *info,
|
||||
XrSpaceLocations *locations) {
|
||||
int any_fake = 0;
|
||||
XrSpacesLocateInfo moved;
|
||||
if (info && pose_time_fix) {
|
||||
moved = *info;
|
||||
moved.time = pose_time_fixed(info->time);
|
||||
info = &moved;
|
||||
}
|
||||
if (info) pose_time_note(name, info->spaceCount ? (uint64_t)(uintptr_t)info->spaces[0] : 0,
|
||||
(uint64_t)(uintptr_t)info->baseSpace, info->time);
|
||||
if (emulate_scene && info && locations) {
|
||||
any_fake = fake_space_index(info->baseSpace) >= 0;
|
||||
for (uint32_t i = 0; i < info->spaceCount && !any_fake; ++i) any_fake = fake_space_index(info->spaces[i]) >= 0;
|
||||
@@ -829,8 +873,108 @@ XRAPI_ATTR XrResult XRAPI_CALL xrDestroySpace(XrSpace space) {
|
||||
#include "input_diag.c"
|
||||
#include "session_fixes.c"
|
||||
#include "layer_emul_gl.c"
|
||||
#include "cube_standin.c"
|
||||
#include "snapshot_gl.c"
|
||||
#include "surface_swapchain.c"
|
||||
|
||||
// GPU video buffers need explicit external-memory support on the app's device.
|
||||
// Preserve the runtime's extension list and both Vulkan-enable entry points.
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrCreateVulkanInstanceKHR(XrInstance instance,const XrVulkanInstanceCreateInfoKHR *info,
|
||||
VkInstance *created,VkResult *vulkanResult) {
|
||||
PFN_xrCreateVulkanInstanceKHR fn=(PFN_xrCreateVulkanInstanceKHR)lookup(instance,"xrCreateVulkanInstanceKHR");
|
||||
if(!fn)return XR_ERROR_FUNCTION_UNSUPPORTED;
|
||||
if(!surface_native)return fn(instance,info,created,vulkanResult);
|
||||
XrResult result=fn(instance,info,created,vulkanResult);
|
||||
if(XR_SUCCEEDED(result) && created && vulkanResult && *vulkanResult==VK_SUCCESS)vk.instance=*created;
|
||||
return result;
|
||||
}
|
||||
static const char *surf_device_exts[] = {"VK_ANDROID_external_memory_android_hardware_buffer",
|
||||
"VK_KHR_external_memory", "VK_KHR_get_memory_requirements2", "VK_KHR_dedicated_allocation",
|
||||
"VK_EXT_queue_family_foreign", "VK_KHR_sampler_ycbcr_conversion", "VK_KHR_bind_memory2", "VK_KHR_maintenance1"};
|
||||
static int surf_extension_present(const char *text,const char *name) {
|
||||
size_t length=strlen(name);
|
||||
for(const char *p=text;(p=strstr(p,name));p++)
|
||||
if((p==text || p[-1]==' ') && (p[length]==' ' || p[length]=='\0'))return 1;
|
||||
return 0;
|
||||
}
|
||||
static int surf_device_supported(PFN_vkGetInstanceProcAddr gipa, VkInstance instance, VkPhysicalDevice physical) {
|
||||
if (!surface_native || !gipa) return 0;
|
||||
if(!physical){
|
||||
// Unity can ask for extension strings before it creates its instance.
|
||||
// Query a temporary instance instead of depending on that call order.
|
||||
PFN_vkCreateInstance create=(PFN_vkCreateInstance)gipa(VK_NULL_HANDLE,"vkCreateInstance");
|
||||
VkApplicationInfo app={VK_STRUCTURE_TYPE_APPLICATION_INFO,NULL,"FrameBridge video capabilities",0,NULL,0,VK_API_VERSION_1_1};
|
||||
VkInstanceCreateInfo ci={VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO,NULL,0,&app};
|
||||
VkInstance probe=VK_NULL_HANDLE;if(!create || create(&ci,NULL,&probe)!=VK_SUCCESS)return 0;
|
||||
PFN_vkEnumeratePhysicalDevices devices=(PFN_vkEnumeratePhysicalDevices)gipa(probe,"vkEnumeratePhysicalDevices");
|
||||
PFN_vkDestroyInstance destroy=(PFN_vkDestroyInstance)gipa(probe,"vkDestroyInstance");
|
||||
uint32_t count=0;VkPhysicalDevice gpu=VK_NULL_HANDLE;
|
||||
int ok=devices && devices(probe,&count,NULL)==VK_SUCCESS && count==1 &&
|
||||
devices(probe,&count,&gpu)==VK_SUCCESS && surf_device_supported(gipa,probe,gpu);
|
||||
if(destroy)destroy(probe,NULL);return ok;
|
||||
}
|
||||
PFN_vkEnumerateDeviceExtensionProperties enumerate=(PFN_vkEnumerateDeviceExtensionProperties)
|
||||
gipa(instance,"vkEnumerateDeviceExtensionProperties");
|
||||
uint32_t count=0;
|
||||
if(!enumerate || enumerate(physical,NULL,&count,NULL)!=VK_SUCCESS || count>2048)return 0;
|
||||
VkExtensionProperties *exts=calloc(count,sizeof(*exts));
|
||||
if(!exts)return 0;
|
||||
int ok=enumerate(physical,NULL,&count,exts)==VK_SUCCESS;
|
||||
for(unsigned j=0;j<sizeof(surf_device_exts)/sizeof(*surf_device_exts);j++){
|
||||
int found=0;for(uint32_t i=0;i<count;i++)found|=!strcmp(exts[i].extensionName,surf_device_exts[j]);
|
||||
ok &= found;
|
||||
}
|
||||
free(exts);return ok;
|
||||
}
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrGetVulkanGraphicsDeviceKHR(XrInstance instance,XrSystemId system,
|
||||
VkInstance vulkanInstance,VkPhysicalDevice *physical) {
|
||||
PFN_xrGetVulkanGraphicsDeviceKHR fn=(PFN_xrGetVulkanGraphicsDeviceKHR)lookup(instance,"xrGetVulkanGraphicsDeviceKHR");
|
||||
if(!surface_native)return fn?fn(instance,system,vulkanInstance,physical):XR_ERROR_FUNCTION_UNSUPPORTED;
|
||||
XrResult result=fn?fn(instance,system,vulkanInstance,physical):XR_ERROR_FUNCTION_UNSUPPORTED;
|
||||
if(XR_SUCCEEDED(result) && physical){vk.instance=vulkanInstance;vk.physical=*physical;}
|
||||
return result;
|
||||
}
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrGetVulkanDeviceExtensionsKHR(XrInstance instance,XrSystemId system,
|
||||
uint32_t capacity,uint32_t *count,char *buffer) {
|
||||
PFN_xrGetVulkanDeviceExtensionsKHR fn=(PFN_xrGetVulkanDeviceExtensionsKHR)lookup(instance,"xrGetVulkanDeviceExtensionsKHR");
|
||||
if(!fn)return XR_ERROR_FUNCTION_UNSUPPORTED;
|
||||
if(!surface_native)return fn(instance,system,capacity,count,buffer);
|
||||
void *lib=dlopen("libvulkan.so",RTLD_NOW|RTLD_LOCAL);
|
||||
PFN_vkGetInstanceProcAddr gipa=lib?(PFN_vkGetInstanceProcAddr)dlsym(lib,"vkGetInstanceProcAddr"):NULL;
|
||||
if(!surf_device_supported(gipa,vk.instance,vk.physical))return fn(instance,system,capacity,count,buffer);
|
||||
uint32_t original=0;XrResult result=fn(instance,system,0,&original,NULL);
|
||||
if(XR_FAILED(result) || !count || original>65536)return result;
|
||||
char *text=calloc(original+1024,1);if(!text)return XR_ERROR_OUT_OF_MEMORY;
|
||||
result=fn(instance,system,original,&original,text);
|
||||
if(XR_SUCCEEDED(result)){
|
||||
for(unsigned i=0;i<sizeof(surf_device_exts)/sizeof(*surf_device_exts);i++){
|
||||
if(!surf_extension_present(text,surf_device_exts[i])){if(*text)strcat(text," ");strcat(text,surf_device_exts[i]);}
|
||||
}
|
||||
*count=(uint32_t)strlen(text)+1;
|
||||
if(capacity && (capacity<*count || !buffer))result=XR_ERROR_SIZE_INSUFFICIENT;
|
||||
else if(capacity)memcpy(buffer,text,*count);
|
||||
}
|
||||
free(text);return result;
|
||||
}
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrCreateVulkanDeviceKHR(XrInstance instance,const XrVulkanDeviceCreateInfoKHR *info,
|
||||
VkDevice *device,VkResult *vulkanResult) {
|
||||
PFN_xrCreateVulkanDeviceKHR fn=(PFN_xrCreateVulkanDeviceKHR)lookup(instance,"xrCreateVulkanDeviceKHR");
|
||||
if(!fn)return XR_ERROR_FUNCTION_UNSUPPORTED;
|
||||
if(!surface_native)return fn(instance,info,device,vulkanResult);
|
||||
if(!info || !info->vulkanCreateInfo || !surf_device_supported(info->pfnGetInstanceProcAddr,
|
||||
vk.instance,info->vulkanPhysicalDevice))return fn(instance,info,device,vulkanResult);
|
||||
VkDeviceCreateInfo ci=*info->vulkanCreateInfo;
|
||||
const char **names=calloc(ci.enabledExtensionCount+8,sizeof(*names));
|
||||
if(!names)return XR_ERROR_OUT_OF_MEMORY;
|
||||
for(uint32_t i=0;i<ci.enabledExtensionCount;i++)names[i]=ci.ppEnabledExtensionNames[i];
|
||||
for(unsigned j=0;j<8;j++){
|
||||
int found=0;for(uint32_t i=0;i<ci.enabledExtensionCount;i++)found|=!strcmp(names[i],surf_device_exts[j]);
|
||||
if(!found)names[ci.enabledExtensionCount++]=surf_device_exts[j];
|
||||
}
|
||||
ci.ppEnabledExtensionNames=names;
|
||||
XrVulkanDeviceCreateInfoKHR fixed=*info;fixed.vulkanCreateInfo=&ci;
|
||||
XrResult result=fn(instance,&fixed,device,vulkanResult);free(names);return result;
|
||||
}
|
||||
#include "eye_debug.c"
|
||||
|
||||
// OpenXR requires xrGet*GraphicsRequirementsKHR before xrCreateSession; Meta's runtime doesn't enforce it, the Frame's
|
||||
@@ -938,6 +1082,7 @@ XRAPI_ATTR XrResult XRAPI_CALL xrEnumerateSwapchainImages(XrSwapchain swapchain,
|
||||
XrSwapchainImageBaseHeader *images) {
|
||||
PFN_xrEnumerateSwapchainImages fn = (PFN_xrEnumerateSwapchainImages)lookup(active_instance, "xrEnumerateSwapchainImages");
|
||||
if (!fn) return XR_ERROR_FUNCTION_UNSUPPORTED;
|
||||
if (is_standin(swapchain)) return standin_enumerate(swapchain, capacity, count, images);
|
||||
XrResult result = equirect_emul && emul_is_virtual(swapchain) ? emul_virtual_enumerate(swapchain, capacity, count, images)
|
||||
: fn(swapchain, capacity, count, images);
|
||||
if (XR_SUCCEEDED(result) && images && capacity && count) {
|
||||
@@ -952,6 +1097,7 @@ XRAPI_ATTR XrResult XRAPI_CALL xrEnumerateSwapchainImages(XrSwapchain swapchain,
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrWaitSwapchainImage(XrSwapchain swapchain, const XrSwapchainImageWaitInfo *info) {
|
||||
PFN_xrWaitSwapchainImage fn = (PFN_xrWaitSwapchainImage)lookup(active_instance, "xrWaitSwapchainImage");
|
||||
if (!fn) return XR_ERROR_FUNCTION_UNSUPPORTED;
|
||||
if (is_standin(swapchain)) return XR_SUCCESS;
|
||||
XrResult result = fn(swapchain, info);
|
||||
__atomic_add_fetch(&sc_waits, 1, __ATOMIC_RELAXED);
|
||||
if (result != XR_SUCCESS) __atomic_add_fetch(&sc_wait_fails, 1, __ATOMIC_RELAXED);
|
||||
@@ -961,6 +1107,7 @@ XRAPI_ATTR XrResult XRAPI_CALL xrWaitSwapchainImage(XrSwapchain swapchain, const
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrReleaseSwapchainImage(XrSwapchain swapchain, const XrSwapchainImageReleaseInfo *info) {
|
||||
PFN_xrReleaseSwapchainImage fn = (PFN_xrReleaseSwapchainImage)lookup(active_instance, "xrReleaseSwapchainImage");
|
||||
if (!fn) return XR_ERROR_FUNCTION_UNSUPPORTED;
|
||||
if (is_standin(swapchain)) return XR_SUCCESS;
|
||||
__atomic_add_fetch(&sc_releases, 1, __ATOMIC_RELAXED);
|
||||
return fn(swapchain, info);
|
||||
}
|
||||
@@ -969,6 +1116,11 @@ XRAPI_ATTR XrResult XRAPI_CALL xrAcquireSwapchainImage(XrSwapchain swapchain, co
|
||||
uint32_t *index) {
|
||||
PFN_xrAcquireSwapchainImage fn = (PFN_xrAcquireSwapchainImage)lookup(active_instance, "xrAcquireSwapchainImage");
|
||||
if (!fn) return XR_ERROR_FUNCTION_UNSUPPORTED;
|
||||
if (is_standin(swapchain)) { // adapter-served cube stand-in: one image
|
||||
if (!index) return XR_ERROR_VALIDATION_FAILURE;
|
||||
*index = 0;
|
||||
return XR_SUCCESS;
|
||||
}
|
||||
if (equirect_emul && emul_is_virtual(swapchain)) { // adapter-served write-once picture: one image
|
||||
if (!index) return XR_ERROR_VALIDATION_FAILURE;
|
||||
*index = 0;
|
||||
@@ -985,6 +1137,37 @@ XRAPI_ATTR XrResult XRAPI_CALL xrAcquireSwapchainImage(XrSwapchain swapchain, co
|
||||
return result;
|
||||
}
|
||||
|
||||
// Copy scene content only while the oldest acquired image is successfully waited
|
||||
// and still application-owned. Release itself is forwarded immediately.
|
||||
static XRAPI_ATTR XrResult XRAPI_CALL surf_composite_release(XrSwapchain handle,const XrSwapchainImageReleaseInfo *info) {
|
||||
pthread_mutex_lock(&flip_lock);
|
||||
tracked_swapchain *t=find_tracked(handle,0);
|
||||
if(t && t->acquired_count && t->waited_count)surf_scene_capture(t,t->acquired[0]);
|
||||
pthread_mutex_unlock(&flip_lock);
|
||||
XrResult result=equirect_emul?hook_xrReleaseSwapchainImage(handle,info):
|
||||
((PFN_xrReleaseSwapchainImage)lookup(active_instance,"xrReleaseSwapchainImage"))(handle,info);
|
||||
if(XR_SUCCEEDED(result)) {
|
||||
surf_scene_release_commit(handle);
|
||||
pthread_mutex_lock(&flip_lock);t=find_tracked(handle,0);
|
||||
if(t && t->acquired_count) {
|
||||
memmove(t->acquired,t->acquired+1,(--t->acquired_count)*sizeof(t->acquired[0]));
|
||||
if(t->waited_count)t->waited_count--;
|
||||
}
|
||||
pthread_mutex_unlock(&flip_lock);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
static XRAPI_ATTR XrResult XRAPI_CALL surf_composite_wait(XrSwapchain handle,const XrSwapchainImageWaitInfo *info) {
|
||||
XrResult result=equirect_emul?hook_xrWaitSwapchainImage(handle,info):
|
||||
((PFN_xrWaitSwapchainImage)lookup(active_instance,"xrWaitSwapchainImage"))(handle,info);
|
||||
if(result==XR_SUCCESS) {
|
||||
pthread_mutex_lock(&flip_lock);tracked_swapchain *t=find_tracked(handle,0);
|
||||
if(t && t->waited_count<t->acquired_count)t->waited_count++;
|
||||
pthread_mutex_unlock(&flip_lock);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------- tracking diagnostics
|
||||
static XrSpace view_space_handle = XR_NULL_HANDLE;
|
||||
|
||||
@@ -1005,7 +1188,9 @@ XRAPI_ATTR XrResult XRAPI_CALL xrPollEvent(XrInstance instance, XrEventDataBuffe
|
||||
if (got) return XR_SUCCESS;
|
||||
}
|
||||
if (sync_guard) pthread_mutex_lock(&sync_lock);
|
||||
XrResult result = focus_hold && event ? focus_hold_poll(fn, instance, event) : fn(instance, event);
|
||||
focus_log_next = fn; // the runtime's own focus changes are logged, before focus_hold hides any
|
||||
XrResult result = focus_hold && event ? focus_hold_poll(focus_log_poll, instance, event)
|
||||
: focus_log_poll(instance, event);
|
||||
if (sync_guard) {
|
||||
if (result == XR_SUCCESS && event && session_state_of(event) == XR_SESSION_STATE_FOCUSED)
|
||||
sync_resume_at = monotonic_ns() + SYNC_GUARD_PAUSE_NS;
|
||||
@@ -1079,6 +1264,10 @@ XRAPI_ATTR XrResult XRAPI_CALL xrWaitFrame(XrSession session, const XrFrameWaitI
|
||||
// predictedDisplayTime is about one display period ahead of "now".
|
||||
xr_time_offset = (int64_t)(state->predictedDisplayTime - state->predictedDisplayPeriod) - mono;
|
||||
xr_time_calibrated = 1;
|
||||
last_display_period = state->predictedDisplayPeriod;
|
||||
pose_time_sample(xr_time_offset);
|
||||
pose_time_display(state->predictedDisplayTime);
|
||||
pose_time_note_offset((long long)(state->predictedDisplayTime - mono));
|
||||
if (layer_debug) debug_aim_vs_grip(state->predictedDisplayTime);
|
||||
}
|
||||
return result;
|
||||
@@ -1143,10 +1332,19 @@ XRAPI_ATTR XrResult XRAPI_CALL xrLocateViews(XrSession session, const XrViewLoca
|
||||
uint32_t capacity, uint32_t *count, XrView *views) {
|
||||
PFN_xrLocateViews fn = (PFN_xrLocateViews)lookup(active_instance, "xrLocateViews");
|
||||
if (!fn) return XR_ERROR_FUNCTION_UNSUPPORTED;
|
||||
XrViewLocateInfo moved;
|
||||
if (info && pose_time_fix) {
|
||||
moved = *info;
|
||||
moved.displayTime = pose_time_fixed(info->displayTime);
|
||||
info = &moved;
|
||||
}
|
||||
if (info) pose_time_note("xrLocateViews", (uint64_t)(uintptr_t)info->space, 0, info->displayTime);
|
||||
int cacheable = pose_consistency && info && state && count && views && capacity > 0;
|
||||
if (cacheable && pose_cache_lookup(session, info, state, capacity, count, views)) return XR_SUCCESS;
|
||||
XrResult result = fn(session, info, state, capacity, count, views);
|
||||
if (cacheable && result == XR_SUCCESS) pose_cache_store(session, info, state, *count, views);
|
||||
if(surface_native && surface_emul && XR_SUCCEEDED(result) && count)
|
||||
surf_views_record(session,info,state,*count<capacity?*count:capacity,views);
|
||||
if (equirect_emul && XR_SUCCEEDED(result) && info && count && views && state &&
|
||||
(state->viewStateFlags & XR_VIEW_STATE_ORIENTATION_VALID_BIT))
|
||||
emul_on_locate_views(info->space, info->displayTime, *count < capacity ? *count : capacity, views);
|
||||
@@ -1223,6 +1421,7 @@ XRAPI_ATTR XrResult XRAPI_CALL xrEndFrame(XrSession session, const XrFrameEndInf
|
||||
frame_open = 0;
|
||||
__atomic_add_fetch(&frame_ends, 1, __ATOMIC_RELAXED);
|
||||
snap_end_frame(info);
|
||||
if(surface_native)++sc_serial;
|
||||
if (eye_debug) eye_debug_end_frame(session, info);
|
||||
{ // frame pacing statistics every ~5 s: fps and submitted-vs-predicted display time
|
||||
static struct timespec start;
|
||||
@@ -1257,6 +1456,7 @@ XRAPI_ATTR XrResult XRAPI_CALL xrEndFrame(XrSession session, const XrFrameEndInf
|
||||
__atomic_exchange_n(&input_sync_ok, 0, __ATOMIC_RELAXED), input_last_sync_result,
|
||||
__atomic_exchange_n(&input_bool_reads, 0, __ATOMIC_RELAXED),
|
||||
__atomic_exchange_n(&input_bool_true, 0, __ATOMIC_RELAXED));
|
||||
pose_time_report();
|
||||
frames = 0; drift_sum = drift_max = 0;
|
||||
}
|
||||
}
|
||||
@@ -1300,9 +1500,38 @@ XRAPI_ATTR XrResult XRAPI_CALL xrEndFrame(XrSession session, const XrFrameEndInf
|
||||
XrCompositionLayerProjectionView views[64][2];
|
||||
XrCompositionLayerQuad quads[64];
|
||||
uint32_t count = 0, dropped = 0, swapped = 0, passthrough = 0;
|
||||
const XrCompositionLayerBaseHeader *surface_projections[SURF_MAX];
|
||||
int surface_projection_count = 0;
|
||||
for (uint32_t i = 0; i < info->layerCount; ++i) {
|
||||
const XrCompositionLayerBaseHeader *layer = info->layers[i];
|
||||
if (!layer) { ++dropped; continue; }
|
||||
if (emul_is_equirect(layer)) {
|
||||
const XrCompositionLayerBaseHeader *replacement = surface_native ? surf_projection_frame(session, info, layer) : NULL;
|
||||
if (replacement) {
|
||||
int already = 0;
|
||||
for (int k = 0; k < surface_projection_count; ++k) already |= surface_projections[k] == replacement;
|
||||
if (!already && surface_projection_count < SURF_MAX) {
|
||||
surface_projections[surface_projection_count++] = replacement;
|
||||
// An opaque native hemisphere covering the guarded stereo
|
||||
// view hides every earlier layer. Cull only that hidden
|
||||
// prefix: video becomes the primary projection, while
|
||||
// later subtitles/menus keep their original order. Fades
|
||||
// and uncovered views use the ordinary layered path.
|
||||
const XrCompositionLayerBaseHeader *combined=NULL;
|
||||
if(surface_native && count==1 && kept[0]->type==XR_TYPE_COMPOSITION_LAYER_PROJECTION && surf_composite_candidate(info,layer))
|
||||
combined=surf_composite_frame(session,info,(const void*)kept[0],replacement);
|
||||
if(combined) {kept[0]=combined;++swapped;}
|
||||
else if (surf_projection_occludes(replacement)) {
|
||||
dropped += count;
|
||||
count = 0;
|
||||
passthrough = 0;
|
||||
}
|
||||
if(!combined)kept[count++] = replacement;
|
||||
}
|
||||
++swapped;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (emulate_passthrough && layer->type == XR_TYPE_COMPOSITION_LAYER_PASSTHROUGH_FB) {
|
||||
++passthrough; // replaced by the runtime's camera environment below
|
||||
continue;
|
||||
@@ -1348,6 +1577,12 @@ XRAPI_ATTR XrResult XRAPI_CALL xrEndFrame(XrSession session, const XrFrameEndInf
|
||||
++dropped; // an emulated video surface without a frame yet
|
||||
continue;
|
||||
}
|
||||
if (layer_uses_standin(layer)) { // a cube layer whose swapchain the runtime refused (cube_standin.c)
|
||||
static int logged;
|
||||
if (logged++ < 3) LOG("cube_standin: dropped a layer (type=%d) that shows a stand-in swapchain", layer->type);
|
||||
++dropped;
|
||||
continue;
|
||||
}
|
||||
if (!layer || (layer_fix && !layer_usable(layer))) { ++dropped; continue; }
|
||||
if (layer->type == XR_TYPE_COMPOSITION_LAYER_QUAD) {
|
||||
const XrCompositionLayerQuad *flipped = flip_quad(session, (const XrCompositionLayerQuad *)layer, &quads[count]);
|
||||
@@ -1678,6 +1913,14 @@ XRAPI_ATTR XrResult XRAPI_CALL xrEnumerateApiLayerProperties(uint32_t capacity,
|
||||
// For native/xrshim: emulated functions that overport's dispatcher doesn't know (it never asks us for them).
|
||||
__attribute__((visibility("default"))) PFN_xrVoidFunction framebridge_extension_proc(const char *name) {
|
||||
pthread_once(&init_once, initialize);
|
||||
if(surface_native && name){
|
||||
#define NATIVE_PROC(fn) if(!strcmp(name,#fn))return (PFN_xrVoidFunction)fn;
|
||||
NATIVE_PROC(xrGetVulkanGraphicsDeviceKHR)
|
||||
NATIVE_PROC(xrGetVulkanDeviceExtensionsKHR)
|
||||
NATIVE_PROC(xrCreateVulkanDeviceKHR)
|
||||
NATIVE_PROC(xrCreateVulkanInstanceKHR)
|
||||
#undef NATIVE_PROC
|
||||
}
|
||||
return name ? render_model_emulation(name) : NULL;
|
||||
}
|
||||
|
||||
@@ -1727,6 +1970,14 @@ XRAPI_ATTR XrResult XRAPI_CALL xrGetInstanceProcAddr(XrInstance instance, const
|
||||
HOOK(xrEnumerateInstanceExtensionProperties)
|
||||
// Per-game hooks: only installed when their setting is on, so other games run through exactly the same calls.
|
||||
#define HOOK_AS(fn, impl) if (!strcmp(name, #fn)) { *function = (PFN_xrVoidFunction)impl; return XR_SUCCESS; }
|
||||
if (surface_native) {
|
||||
HOOK(xrGetVulkanGraphicsDeviceKHR)
|
||||
HOOK(xrGetVulkanDeviceExtensionsKHR)
|
||||
HOOK(xrCreateVulkanDeviceKHR)
|
||||
HOOK(xrCreateVulkanInstanceKHR)
|
||||
HOOK_AS(xrReleaseSwapchainImage, surf_composite_release)
|
||||
HOOK_AS(xrWaitSwapchainImage, surf_composite_wait)
|
||||
}
|
||||
if (equirect_emul) {
|
||||
HOOK_AS(xrReleaseSwapchainImage, hook_xrReleaseSwapchainImage)
|
||||
HOOK_AS(xrWaitSwapchainImage, hook_xrWaitSwapchainImage)
|
||||
@@ -1738,14 +1989,27 @@ XRAPI_ATTR XrResult XRAPI_CALL xrGetInstanceProcAddr(XrInstance instance, const
|
||||
}
|
||||
if (surface_emul) HOOK_AS(xrCreateSwapchainAndroidSurfaceKHR, hook_xrCreateSwapchainAndroidSurfaceKHR)
|
||||
if (eye_debug || release_wait) HOOK_AS(xrReleaseSwapchainImage, eye_hook_xrReleaseSwapchainImage)
|
||||
if (layer_debug) { // counters only; every other wait/release hook above takes precedence
|
||||
if (layer_debug || cube_standin) { // counters + cube stand-ins; every other wait/release hook above takes precedence
|
||||
HOOK(xrWaitSwapchainImage)
|
||||
HOOK(xrReleaseSwapchainImage)
|
||||
}
|
||||
if (cube_standin && (!strcmp(name, "xrUpdateSwapchainFB") || !strcmp(name, "xrGetSwapchainStateFB"))) {
|
||||
XrResult result = next_gipa(instance, name, function); // only wrapped where the runtime has it
|
||||
if (XR_FAILED(result) || !*function) return result;
|
||||
if (!strcmp(name, "xrUpdateSwapchainFB")) {
|
||||
real_update_swapchain = (PFN_xrUpdateSwapchainFB)*function;
|
||||
*function = (PFN_xrVoidFunction)standin_update_swapchain;
|
||||
} else {
|
||||
real_get_swapchain_state = (PFN_xrGetSwapchainStateFB)*function;
|
||||
*function = (PFN_xrVoidFunction)standin_get_swapchain_state;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
if (sync_guard || layer_debug || input_diag) HOOK_AS(xrSyncActions, hook_xrSyncActions)
|
||||
if (layer_debug) HOOK_AS(xrGetActionStateBoolean, hook_xrGetActionStateBoolean)
|
||||
if (layer_debug || aim_correction_on() || profile_remap || input_diag)
|
||||
if (layer_debug || aim_correction_on() || profile_remap || input_diag || proximity_emul)
|
||||
HOOK_AS(xrSuggestInteractionProfileBindings, hook_xrSuggestInteractionProfileBindings)
|
||||
if (proximity_emul) HOOK_AS(xrCreateAction, hook_xrCreateAction)
|
||||
if (layer_debug || aim_correction_on()) {
|
||||
HOOK_AS(xrCreateActionSpace, hook_xrCreateActionSpace)
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ typedef struct { XrStructureType type; void *next; uint32_t image; } emul_gles_i
|
||||
X(eglChooseConfig) X(eglCreatePbufferSurface) X(eglDestroySurface) X(eglGetCurrentContext) X(eglGetError) \
|
||||
X(eglQueryString)
|
||||
#define EMUL_GL_FUNCS(X) X(glFenceSync) X(glDeleteSync) X(glWaitSync) X(glClientWaitSync) X(glFlush) \
|
||||
X(glGenFramebuffers) X(glBindFramebuffer) X(glFramebufferTexture2D) X(glCheckFramebufferStatus) X(glViewport) \
|
||||
X(glGenFramebuffers) X(glDeleteFramebuffers) X(glBindFramebuffer) X(glFramebufferTexture2D) X(glCheckFramebufferStatus) X(glViewport) \
|
||||
X(glUseProgram) X(glCreateShader) X(glShaderSource) X(glCompileShader) X(glGetShaderiv) X(glGetShaderInfoLog) \
|
||||
X(glDeleteShader) X(glCreateProgram) X(glAttachShader) X(glLinkProgram) X(glGetProgramiv) X(glGetProgramInfoLog) \
|
||||
X(glGetUniformLocation) X(glUniform1i) X(glUniform1f) X(glUniform3f) X(glUniform4f) X(glUniformMatrix3fv) \
|
||||
@@ -304,6 +304,7 @@ static void emul_on_destroy_swapchain(XrSwapchain handle) {
|
||||
static XRAPI_ATTR XrResult XRAPI_CALL hook_xrReleaseSwapchainImage(XrSwapchain swapchain, const XrSwapchainImageReleaseInfo *info) {
|
||||
PFN_xrReleaseSwapchainImage fn = (PFN_xrReleaseSwapchainImage)lookup(active_instance, "xrReleaseSwapchainImage");
|
||||
if (!fn) return XR_ERROR_FUNCTION_UNSUPPORTED;
|
||||
if (is_standin(swapchain)) return XR_SUCCESS;
|
||||
pthread_mutex_lock(&emul_lock);
|
||||
emul_source *s = emul_active() ? emul_find_source(swapchain, 0) : NULL;
|
||||
int index = s && s->acquired_count ? (int)s->acquired[0] : -1;
|
||||
@@ -335,6 +336,7 @@ static XRAPI_ATTR XrResult XRAPI_CALL hook_xrReleaseSwapchainImage(XrSwapchain s
|
||||
static XRAPI_ATTR XrResult XRAPI_CALL hook_xrWaitSwapchainImage(XrSwapchain swapchain, const XrSwapchainImageWaitInfo *info) {
|
||||
PFN_xrWaitSwapchainImage fn = (PFN_xrWaitSwapchainImage)lookup(active_instance, "xrWaitSwapchainImage");
|
||||
if (!fn) return XR_ERROR_FUNCTION_UNSUPPORTED;
|
||||
if (is_standin(swapchain)) return XR_SUCCESS;
|
||||
XrResult result = emul_is_virtual(swapchain) ? XR_SUCCESS : fn(swapchain, info);
|
||||
pthread_mutex_lock(&emul_lock);
|
||||
emul_source *s = emul_active() ? emul_find_source(swapchain, 0) : NULL;
|
||||
|
||||
@@ -0,0 +1,174 @@
|
||||
// Included by frame_adapter.c: the times games locate poses at (pose_time_fix, pose_debug).
|
||||
//
|
||||
// pose_debug (diagnostics): every ~5 s, per located space (xrLocateSpace/xrLocateSpaces) and for xrLocateViews, the
|
||||
// number of calls and the min/max of (requested time - the last xrWaitFrame's predictedDisplayTime); for
|
||||
// xrConvertTimespecTimeToTimeKHR the same for its answers, plus the spread of the XrTime-vs-CLOCK_MONOTONIC offset
|
||||
// measured at xrWaitFrame.
|
||||
|
||||
static XrDuration last_display_period;
|
||||
|
||||
#define PT_SLOTS 12
|
||||
typedef struct {
|
||||
const char *kind;
|
||||
uint64_t space, base;
|
||||
int count;
|
||||
long long min, max; // ns relative to the last predicted display time
|
||||
} pt_stat;
|
||||
static pt_stat pt_stats[PT_SLOTS];
|
||||
static int pt_overflow;
|
||||
static long long pt_offset_min, pt_offset_max;
|
||||
static int pt_offset_count;
|
||||
static pthread_mutex_t pt_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
static void pose_time_note(const char *kind, uint64_t space, uint64_t base, XrTime time) {
|
||||
if (!pose_debug || !last_predicted_time) return;
|
||||
long long d = (long long)(time - last_predicted_time);
|
||||
pthread_mutex_lock(&pt_lock);
|
||||
int i = 0;
|
||||
while (i < PT_SLOTS && pt_stats[i].count &&
|
||||
!(pt_stats[i].kind == kind && pt_stats[i].space == space && pt_stats[i].base == base))
|
||||
++i;
|
||||
if (i == PT_SLOTS) {
|
||||
++pt_overflow;
|
||||
} else {
|
||||
pt_stat *s = &pt_stats[i];
|
||||
if (!s->count) s->kind = kind, s->space = space, s->base = base, s->min = s->max = d;
|
||||
if (d < s->min) s->min = d;
|
||||
if (d > s->max) s->max = d;
|
||||
++s->count;
|
||||
}
|
||||
pthread_mutex_unlock(&pt_lock);
|
||||
}
|
||||
|
||||
// The offset sampled at xrWaitFrame dips (by up to 2.5 s) whenever xrWaitFrame returns late after a hitch, which put
|
||||
// corrected times up to 2 s in the future (headless survey, 2026-10-09). The steady value is the largest recent sample:
|
||||
// pose_time_fix uses the maximum of the last PT_RING samples (~2 s at 72 Hz; the offset drifts only ~0.14 s per hour).
|
||||
#define PT_RING 144
|
||||
static int64_t pt_ring[PT_RING];
|
||||
static int pt_ring_n, pt_ring_i;
|
||||
|
||||
static void pose_time_sample(int64_t offset) { // XrTime "now" minus CLOCK_MONOTONIC, from xrWaitFrame
|
||||
pthread_mutex_lock(&pt_lock);
|
||||
pt_ring[pt_ring_i] = offset;
|
||||
pt_ring_i = (pt_ring_i + 1) % PT_RING;
|
||||
if (pt_ring_n < PT_RING) ++pt_ring_n;
|
||||
pthread_mutex_unlock(&pt_lock);
|
||||
}
|
||||
|
||||
// The last few predicted display times (xrWaitFrame): a pose asked for at one of them is the game rendering a frame
|
||||
// and is never moved. On a Frame whose XrTime runs only ~70 ms ahead of the monotonic clock (GitHub #49), such a
|
||||
// request could look nearer the monotonic "now" than XrTime's and was moved 68 ms into the future.
|
||||
#define PT_DISPLAY_RING 6
|
||||
#define PT_DISPLAY_MATCH 1000000ll // 1 ms
|
||||
static XrTime pt_display[PT_DISPLAY_RING];
|
||||
static int pt_display_i;
|
||||
|
||||
static void pose_time_display(XrTime predicted) { // from xrWaitFrame
|
||||
pthread_mutex_lock(&pt_lock);
|
||||
pt_display[pt_display_i] = predicted;
|
||||
pt_display_i = (pt_display_i + 1) % PT_DISPLAY_RING;
|
||||
pthread_mutex_unlock(&pt_lock);
|
||||
}
|
||||
|
||||
static int pose_time_is_display(XrTime time) {
|
||||
int found = 0;
|
||||
pthread_mutex_lock(&pt_lock);
|
||||
for (int i = 0; i < PT_DISPLAY_RING && !found; i++) {
|
||||
long long d = (long long)(time - pt_display[i]);
|
||||
found = pt_display[i] && d <= PT_DISPLAY_MATCH && d >= -PT_DISPLAY_MATCH;
|
||||
}
|
||||
pthread_mutex_unlock(&pt_lock);
|
||||
return found;
|
||||
}
|
||||
|
||||
static int64_t pose_time_offset(void) {
|
||||
pthread_mutex_lock(&pt_lock);
|
||||
int64_t best = pt_ring_n ? pt_ring[0] : 0;
|
||||
for (int i = 1; i < pt_ring_n; i++)
|
||||
if (pt_ring[i] > best) best = pt_ring[i];
|
||||
pthread_mutex_unlock(&pt_lock);
|
||||
return best;
|
||||
}
|
||||
|
||||
static void pose_time_note_offset(long long offset) {
|
||||
if (!pose_debug) return;
|
||||
pthread_mutex_lock(&pt_lock);
|
||||
if (!pt_offset_count || offset < pt_offset_min) pt_offset_min = offset;
|
||||
if (!pt_offset_count || offset > pt_offset_max) pt_offset_max = offset;
|
||||
++pt_offset_count;
|
||||
pthread_mutex_unlock(&pt_lock);
|
||||
}
|
||||
|
||||
// pose_time_fix: Meta's OVRPlugin takes "now" from CLOCK_MONOTONIC and passes it on as an XrTime unchanged (no
|
||||
// conversion reaches FrameBridge: OVRPort's dispatcher answers XR_KHR_convert_timespec_time itself, 1:1, since the
|
||||
// Frame's runtime lacks it). On a Quest XrTime is the monotonic clock; on the Frame it runs ahead (2.56 s measured on
|
||||
// SteamOS 0.4.5, 0.05-0.9 s seen on older builds), so every "now" pose (Unity's physics step, OVRInput's controller
|
||||
// poses) was located that far in the past and the hands trailed the controllers (BattleSisters, Sniper Elite VR).
|
||||
// A located time nearer the monotonic clock than XrTime's "now" is taken as a monotonic timestamp and moved to the
|
||||
// same moment in XrTime (offset measured at xrWaitFrame); a time more than PT_PAST_LIMIT before the predicted display
|
||||
// time that isn't one (BattleSisters asks for its head at XrTime 0.1 s; Robo Recall, Phantom, Vader, Time Stall and
|
||||
// The Room VR at ~0 every frame) is located at the predicted display time, the time the game renders with.
|
||||
// A monotonic timestamp is only told apart when the clocks are more than PT_MONO_PERIODS display periods apart, and the
|
||||
// time must be clearly nearer the monotonic "now" (at most a third of its distance to XrTime's "now"); a time equal to
|
||||
// a recent predicted display time is never moved (GitHub #49: XrTime only ~68 ms ahead, display-time requests moved).
|
||||
#define PT_PAST_LIMIT 500000000ll // 0.5 s: no runtime keeps a longer pose history; real past queries are far shorter
|
||||
#define PT_MIN_OFFSET 5000000ll // XrTime and the monotonic clock this close: nothing to tell apart or to fix
|
||||
#define PT_MONO_PERIODS 4
|
||||
#define PT_DEFAULT_PERIOD 13888889ll // 72 Hz, before xrWaitFrame reported a period
|
||||
static int pt_fixed_mono, pt_fixed_past;
|
||||
static long long pt_fixed_min;
|
||||
|
||||
static XrTime pose_time_fixed(XrTime time) {
|
||||
if (!pose_time_fix || !last_predicted_time || pt_ring_n < 8) return time; // a few frames of offset samples first
|
||||
int64_t offset = pose_time_offset(); // XrTime "now" minus the monotonic clock (robust, see above)
|
||||
if (offset < PT_MIN_OFFSET && offset > -PT_MIN_OFFSET) return time;
|
||||
if (pose_time_is_display(time)) return time; // the frame (or a recent one) the game renders
|
||||
long long period = last_display_period > 0 ? (long long)last_display_period : PT_DEFAULT_PERIOD;
|
||||
long long abs_offset = offset < 0 ? -offset : offset;
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
long long mono = (long long)ts.tv_sec * 1000000000ll + ts.tv_nsec;
|
||||
long long d_mono = (long long)time - mono, d_xr = (long long)time - (mono + offset);
|
||||
long long abs_mono = d_mono < 0 ? -d_mono : d_mono, abs_xr = d_xr < 0 ? -d_xr : d_xr;
|
||||
XrTime fixed;
|
||||
int kind;
|
||||
if (abs_offset > PT_MONO_PERIODS * period && abs_mono < PT_PAST_LIMIT && 3 * abs_mono < abs_xr) {
|
||||
fixed = (XrTime)(time + offset), kind = 0; // a monotonic timestamp
|
||||
} else if ((long long)(time - last_predicted_time) < -PT_PAST_LIMIT) {
|
||||
fixed = last_predicted_time, kind = 1; // far in the past: the frame's display time
|
||||
} else {
|
||||
return time;
|
||||
}
|
||||
if (pose_debug) {
|
||||
long long d = (long long)(time - last_predicted_time);
|
||||
pthread_mutex_lock(&pt_lock);
|
||||
if (!(pt_fixed_mono + pt_fixed_past) || d < pt_fixed_min) pt_fixed_min = d;
|
||||
++*(kind ? &pt_fixed_past : &pt_fixed_mono);
|
||||
pthread_mutex_unlock(&pt_lock);
|
||||
}
|
||||
static int logged[2];
|
||||
if (logged[kind]++ < 3)
|
||||
LOG("pose_time_fix: pose asked for at %.1f ms from the predicted display time (%s) located at %.1f ms",
|
||||
(long long)(time - last_predicted_time) / 1e6, kind ? "far in the past" : "a monotonic-clock time",
|
||||
(long long)(fixed - last_predicted_time) / 1e6);
|
||||
return fixed;
|
||||
}
|
||||
|
||||
// called from the pacing statistics in xrEndFrame
|
||||
static void pose_time_report(void) {
|
||||
if (!pose_debug) return;
|
||||
pthread_mutex_lock(&pt_lock);
|
||||
LOG("pose_debug: period %.2f ms; XrTime - monotonic at xrWaitFrame (%d): %.2f..%.2f ms", last_display_period / 1e6,
|
||||
pt_offset_count, pt_offset_min / 1e6, pt_offset_max / 1e6);
|
||||
for (int i = 0; i < PT_SLOTS && pt_stats[i].count; ++i)
|
||||
LOG("pose_debug: %s space=0x%llx base=0x%llx: %d calls, time - predicted display time %.2f..%.2f ms",
|
||||
pt_stats[i].kind, (unsigned long long)pt_stats[i].space, (unsigned long long)pt_stats[i].base,
|
||||
pt_stats[i].count, pt_stats[i].min / 1e6, pt_stats[i].max / 1e6);
|
||||
if (pt_overflow) LOG("pose_debug: %d calls not counted (more than %d spaces)", pt_overflow, PT_SLOTS);
|
||||
if (pt_fixed_mono + pt_fixed_past)
|
||||
LOG("pose_debug: pose_time_fix moved %d monotonic-clock times and %d far-past times (earliest asked %.2f ms)",
|
||||
pt_fixed_mono, pt_fixed_past, pt_fixed_min / 1e6);
|
||||
memset(pt_stats, 0, sizeof(pt_stats));
|
||||
pt_overflow = pt_offset_count = pt_fixed_mono = pt_fixed_past = 0;
|
||||
pthread_mutex_unlock(&pt_lock);
|
||||
}
|
||||
@@ -163,6 +163,39 @@ static void focus_hold_note(int state) {
|
||||
else if (state >= 0 && state != XR_SESSION_STATE_FOCUSED) is_focused = 0;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------- focus log (always on: rare events, cheap)
|
||||
// Every time the runtime takes focus away and gives it back, as the runtime reports it (before focus_hold hides a dip
|
||||
// from the app): FramePort's session triage counts these dips after a play session and suggests a longer
|
||||
// focus_hold_ms when they keep reaching the game.
|
||||
static PFN_xrPollEvent focus_log_next;
|
||||
static int focus_log_focused;
|
||||
static int64_t focus_log_lost_at;
|
||||
static int focus_log_lost_state;
|
||||
|
||||
static XRAPI_ATTR XrResult XRAPI_CALL focus_log_poll(XrInstance instance, XrEventDataBuffer *event) {
|
||||
XrResult r = focus_log_next(instance, event);
|
||||
if (r != XR_SUCCESS || !event) return r;
|
||||
int state = session_state_of(event);
|
||||
if (state < 0) return r;
|
||||
if (state == XR_SESSION_STATE_FOCUSED) {
|
||||
if (focus_log_lost_at)
|
||||
LOG("focus: back after %.0f ms (lost to state %d)", (monotonic_ns() - focus_log_lost_at) / 1e6,
|
||||
focus_log_lost_state);
|
||||
focus_log_focused = 1;
|
||||
focus_log_lost_at = 0;
|
||||
} else if (focus_log_focused && (state == XR_SESSION_STATE_VISIBLE || state == XR_SESSION_STATE_SYNCHRONIZED)) {
|
||||
focus_log_focused = 0;
|
||||
focus_log_lost_at = monotonic_ns();
|
||||
focus_log_lost_state = state;
|
||||
LOG("focus: lost (state %d)", state);
|
||||
} else if (state != XR_SESSION_STATE_VISIBLE && state != XR_SESSION_STATE_SYNCHRONIZED) {
|
||||
focus_log_focused = 0; // stopping, loss pending, exiting: the session ends, not a dip
|
||||
if (focus_log_lost_at) LOG("focus: session ending (state %d)", state);
|
||||
focus_log_lost_at = 0;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
static XrResult focus_hold_poll(PFN_xrPollEvent fn, XrInstance instance, XrEventDataBuffer *event) {
|
||||
for (;;) {
|
||||
if (held.delivering) { // hand held events to the app, oldest first
|
||||
@@ -285,6 +318,90 @@ static int touch_has(const char *path) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------- finger proximity from touch (proximity_emul)
|
||||
// Meta's OVRPlugin reports a thumb or index finger resting near the controller through XR_FB_touch_controller_proximity
|
||||
// (.../thumb_fb/proximity_fb, .../trigger/proximity_fb). The Frame's runtime doesn't have it; OVRPort's loader offers
|
||||
// it to the game anyway, and the proximity actions never get a working binding: "near" stays false, so games that
|
||||
// animate the hands from it show a thumb that never moves (Unreal's ThumbUp axis is "no thumb proximity", e.g. Vader
|
||||
// Immortal; found by Klownicle, GitHub #49). With proximity_emul those actions are bound to the capacitive touch inputs
|
||||
// instead (OpenXR combines several bindings of one boolean action with OR): thumb = thumbstick, face buttons or thumb
|
||||
// rest touched; index (proximity_emul=2) = trigger touched. Only when the runtime lacks the extension itself.
|
||||
static XrAction thumb_proximity_action, trigger_proximity_action;
|
||||
|
||||
static XRAPI_ATTR XrResult XRAPI_CALL hook_xrCreateAction(XrActionSet set, const XrActionCreateInfo *info,
|
||||
XrAction *action) {
|
||||
PFN_xrCreateAction fn = (PFN_xrCreateAction)lookup(active_instance, "xrCreateAction");
|
||||
if (!fn) return XR_ERROR_FUNCTION_UNSUPPORTED;
|
||||
XrResult r = fn(set, info, action);
|
||||
if (XR_SUCCEEDED(r) && info && action) { // OVRPlugin's action names
|
||||
if (!strcmp(info->actionName, "hand_thumb_proximity")) thumb_proximity_action = *action;
|
||||
else if (!strcmp(info->actionName, "hand_trigger_proximity")) trigger_proximity_action = *action;
|
||||
else return r;
|
||||
LOG("proximity_emul: game action %s found", info->actionName);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
static const char *const THUMB_TOUCH_LEFT[] = {"x/touch", "y/touch", "thumbstick/touch", "thumbrest/touch"};
|
||||
static const char *const THUMB_TOUCH_RIGHT[] = {"a/touch", "b/touch", "thumbstick/touch", "thumbrest/touch"};
|
||||
|
||||
static int add_binding(XrInstance instance, PFN_xrStringToPath to_path, XrActionSuggestedBinding *b, uint32_t *n,
|
||||
XrAction action, const char *hand, const char *input) {
|
||||
char path[XR_MAX_PATH_LENGTH];
|
||||
snprintf(path, sizeof(path), "/user/hand/%s/input/%s", hand, input);
|
||||
XrPath p;
|
||||
if (XR_FAILED(to_path(instance, path, &p))) return 0;
|
||||
for (uint32_t i = 0; i < *n; ++i)
|
||||
if (b[i].action == action && b[i].binding == p) return 0;
|
||||
b[*n].action = action;
|
||||
b[(*n)++].binding = p;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Suggests Touch bindings with finger proximity bound to the touch inputs (proximity_emul), falling back to the
|
||||
// bindings as given when the runtime refuses them.
|
||||
static XrResult suggest_touch(XrInstance instance, PFN_xrSuggestInteractionProfileBindings fn,
|
||||
PFN_xrPathToString to_string, const XrInteractionProfileSuggestedBinding *suggested) {
|
||||
PFN_xrStringToPath to_path = (PFN_xrStringToPath)lookup(instance, "xrStringToPath");
|
||||
if (!proximity_emul || runtime_has_proximity || !to_path || !to_string) return fn(instance, suggested);
|
||||
XrAction thumb = thumb_proximity_action, index = proximity_emul > 1 ? trigger_proximity_action : XR_NULL_HANDLE;
|
||||
uint32_t n = suggested->countSuggestedBindings, kept = 0, dropped = 0, added = 0;
|
||||
XrActionSuggestedBinding *b = calloc(n + 2 * 5, sizeof(*b));
|
||||
if (!b) return fn(instance, suggested);
|
||||
for (uint32_t i = 0; i < n; ++i) {
|
||||
char path[XR_MAX_PATH_LENGTH];
|
||||
uint32_t size = 0;
|
||||
const XrActionSuggestedBinding *s = &suggested->suggestedBindings[i];
|
||||
if (XR_SUCCEEDED(to_string(instance, s->binding, sizeof(path), &size, path)) && strstr(path, "/proximity_")) {
|
||||
// the game's own proximity binding, which the runtime doesn't know: its action is bound to touch below
|
||||
if (strstr(path, "/thumb")) { if (!thumb) thumb = s->action; }
|
||||
else if (proximity_emul > 1 && !index) index = s->action;
|
||||
++dropped;
|
||||
continue;
|
||||
}
|
||||
b[kept++] = *s;
|
||||
}
|
||||
for (int hand = 0; hand < 2; ++hand) {
|
||||
const char *name = hand ? "right" : "left";
|
||||
const char *const *thumb_inputs = hand ? THUMB_TOUCH_RIGHT : THUMB_TOUCH_LEFT;
|
||||
for (int c = 0; thumb && c < 4; ++c) added += add_binding(instance, to_path, b, &kept, thumb, name, thumb_inputs[c]);
|
||||
if (index) added += add_binding(instance, to_path, b, &kept, index, name, "trigger/touch");
|
||||
}
|
||||
XrResult r;
|
||||
if (!added && !dropped) r = fn(instance, suggested);
|
||||
else {
|
||||
XrInteractionProfileSuggestedBinding copy = *suggested;
|
||||
copy.countSuggestedBindings = kept;
|
||||
copy.suggestedBindings = b;
|
||||
r = fn(instance, ©);
|
||||
LOG("proximity_emul: finger proximity bound to touch (%u binding(s) added, %u proximity path(s) replaced): %d",
|
||||
added, dropped, r);
|
||||
if (XR_FAILED(r)) r = fn(instance, suggested);
|
||||
}
|
||||
free(b);
|
||||
return r;
|
||||
}
|
||||
|
||||
static XrResult remap_to_touch(XrInstance instance, PFN_xrSuggestInteractionProfileBindings fn,
|
||||
PFN_xrPathToString to_string, const XrInteractionProfileSuggestedBinding *suggested,
|
||||
const char *profile) {
|
||||
@@ -305,7 +422,7 @@ static XrResult remap_to_touch(XrInstance instance, PFN_xrSuggestInteractionProf
|
||||
copy.interactionProfile = touch;
|
||||
copy.countSuggestedBindings = kept;
|
||||
copy.suggestedBindings = b;
|
||||
XrResult r = kept ? fn(instance, ©) : XR_ERROR_PATH_UNSUPPORTED;
|
||||
XrResult r = kept ? suggest_touch(instance, fn, to_string, ©) : XR_ERROR_PATH_UNSUPPORTED;
|
||||
free(b);
|
||||
LOG("controller profile %s -> oculus/touch_controller (%u bindings, %u dropped): %d", profile + 22, kept,
|
||||
n - kept, r);
|
||||
@@ -325,12 +442,14 @@ static XRAPI_ATTR XrResult XRAPI_CALL hook_xrSuggestInteractionProfileBindings(X
|
||||
if (XR_SUCCEEDED(to_string(instance, suggested->suggestedBindings[i].binding, sizeof(path), &size, path)))
|
||||
note_pose_binding(suggested->suggestedBindings[i].action, path);
|
||||
}
|
||||
XrResult r = fn(instance, suggested);
|
||||
input_diag_suggested(instance, suggested, r, to_string); // the runtime's answer to the game's own suggestion
|
||||
if (!profile_remap || !suggested || !to_string) return r;
|
||||
char profile[XR_MAX_PATH_LENGTH] = {0};
|
||||
uint32_t size = 0;
|
||||
if (XR_FAILED(to_string(instance, suggested->interactionProfile, sizeof(profile), &size, profile))) return r;
|
||||
int known = suggested && to_string &&
|
||||
XR_SUCCEEDED(to_string(instance, suggested->interactionProfile, sizeof(profile), &size, profile));
|
||||
XrResult r = known && !strcmp(profile, TOUCH_PROFILE) ? suggest_touch(instance, fn, to_string, suggested)
|
||||
: fn(instance, suggested);
|
||||
input_diag_suggested(instance, suggested, r, to_string); // the runtime's answer to the game's own suggestion
|
||||
if (!profile_remap || !known) return r;
|
||||
if (!strcmp(profile, TOUCH_PROFILE)) {
|
||||
if (XR_SUCCEEDED(r)) app_suggested_touch = 1; // the app's own Touch bindings win over a remap
|
||||
return r;
|
||||
|
||||
@@ -0,0 +1,383 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Included after surface_projection.c. Snapshots scene images BEFORE release,
|
||||
// then composes decoded video + scene into one primary projection on the GPU.
|
||||
#include "surface_composite.h"
|
||||
#include "surface_composite_spv.h"
|
||||
|
||||
#define SC_SCENES 4
|
||||
typedef struct {
|
||||
XrSwapchain handle;
|
||||
VkImage image;
|
||||
VkImageView view;
|
||||
VkDeviceMemory memory;
|
||||
VkCommandBuffer commands[MAX_IMAGES];
|
||||
VkFence fences[MAX_IMAGES];
|
||||
int pending[MAX_IMAGES], ready;
|
||||
uint64_t serial,captured_release,releases;
|
||||
uint32_t width,height,layers;
|
||||
} surf_scene_snapshot;
|
||||
static surf_scene_snapshot sc_scenes[SC_SCENES];
|
||||
static uint64_t sc_serial;
|
||||
static int64_t sc_capture_until;
|
||||
|
||||
// Unity attaches both structures even when their transforms are identity.
|
||||
// Apply supported transforms in our shader; reject other chains rather than
|
||||
// silently discarding semantics when flattening the original scene.
|
||||
static int sc_scene_supported(const XrCompositionLayerProjection *scene) {
|
||||
int reason=0;
|
||||
if(!scene || scene->viewCount!=2 || !scene->views)return 0;
|
||||
int count=0;
|
||||
for(const XrBaseInStructure *n=scene->next;n;n=n->next) {
|
||||
if(++count>16){reason=-1;break;}
|
||||
if(n->type==XR_TYPE_COMPOSITION_LAYER_COLOR_SCALE_BIAS_KHR)continue;
|
||||
if(n->type==XR_TYPE_COMPOSITION_LAYER_IMAGE_LAYOUT_FB) {
|
||||
const XrCompositionLayerImageLayoutFB *layout=(const void*)n;
|
||||
if(!(layout->flags&~XR_COMPOSITION_LAYER_IMAGE_LAYOUT_VERTICAL_FLIP_BIT_FB))continue;
|
||||
}
|
||||
reason=n->type;break;
|
||||
}
|
||||
for(int e=0;e<2 && !reason;e++)if(scene->views[e].next)
|
||||
reason=((const XrBaseInStructure*)scene->views[e].next)->type;
|
||||
static int previous;
|
||||
if(reason && reason!=previous)LOG("surface_composite: unsupported scene extension %d; retaining ordinary composition",reason);
|
||||
previous=reason;return !reason;
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
XrSwapchain output;
|
||||
VkImage images[MAX_IMAGES];
|
||||
VkImageView views[MAX_IMAGES];
|
||||
VkFramebuffer framebuffers[MAX_IMAGES];
|
||||
VkRenderPass render_pass;
|
||||
VkSampler sampler;
|
||||
VkDescriptorPool pool;
|
||||
VkDescriptorSetLayout set_layout;
|
||||
VkDescriptorSet sets[MAX_IMAGES][2];
|
||||
VkPipelineLayout layout;
|
||||
VkPipeline pipeline;
|
||||
VkCommandBuffer commands[MAX_IMAGES];
|
||||
VkFence fences[MAX_IMAGES];
|
||||
int pending[MAX_IMAGES], ready, acquired, failed;
|
||||
uint32_t count,index;
|
||||
XrTime time;
|
||||
XrCompositionLayerProjection layer;
|
||||
XrCompositionLayerProjectionView eyes[2];
|
||||
int64_t log_time;
|
||||
uint64_t frames,holds;
|
||||
} surf_composite;
|
||||
static surf_composite sc_outputs[SURF_MAX];
|
||||
|
||||
static void sc_barrier(VkCommandBuffer cmd,VkImage image,uint32_t layers,VkImageLayout from,VkImageLayout to,
|
||||
VkAccessFlags src,VkAccessFlags dst) {
|
||||
VkImageMemoryBarrier b={VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER,NULL,src,dst,from,to,
|
||||
VK_QUEUE_FAMILY_IGNORED,VK_QUEUE_FAMILY_IGNORED,image,{VK_IMAGE_ASPECT_COLOR_BIT,0,1,0,layers}};
|
||||
vk.CmdPipelineBarrier(cmd,VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
|
||||
0,0,NULL,0,NULL,1,&b);
|
||||
}
|
||||
static int sc_command(VkCommandBuffer *cmd,VkFence *fence) {
|
||||
VkCommandBufferAllocateInfo ai={VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO,NULL,vk.pool,VK_COMMAND_BUFFER_LEVEL_PRIMARY,1};
|
||||
VkFenceCreateInfo fi={VK_STRUCTURE_TYPE_FENCE_CREATE_INFO};
|
||||
if(vk.AllocateCommandBuffers(vk.device,&ai,cmd)!=VK_SUCCESS)return 0;
|
||||
if(vk.CreateFence(vk.device,&fi,NULL,fence)==VK_SUCCESS)return 1;
|
||||
PFN_vkFreeCommandBuffers free_cmd=(PFN_vkFreeCommandBuffers)vk.GetDeviceProcAddr(vk.device,"vkFreeCommandBuffers");
|
||||
free_cmd(vk.device,vk.pool,1,cmd);*cmd=VK_NULL_HANDLE;return 0;
|
||||
}
|
||||
static int sc_reuse(VkFence fence,int *pending) {
|
||||
if(!*pending)return 1;
|
||||
if(svk.GetFenceStatus(vk.device,fence)!=VK_SUCCESS)return 0;
|
||||
if(vk.ResetFences(vk.device,1,&fence)!=VK_SUCCESS)return 0;
|
||||
*pending=0;return 1;
|
||||
}
|
||||
static void sc_retire(VkCommandBuffer *commands,VkFence *fences,int *pending,uint32_t count) {
|
||||
PFN_vkDestroyFence destroy=(PFN_vkDestroyFence)vk.GetDeviceProcAddr(vk.device,"vkDestroyFence");
|
||||
PFN_vkFreeCommandBuffers free_cmd=(PFN_vkFreeCommandBuffers)vk.GetDeviceProcAddr(vk.device,"vkFreeCommandBuffers");
|
||||
for(uint32_t i=0;i<count;i++) {
|
||||
if(pending[i])vk.WaitForFences(vk.device,1,&fences[i],VK_TRUE,UINT64_MAX);
|
||||
if(fences[i])destroy(vk.device,fences[i],NULL);
|
||||
if(commands[i])free_cmd(vk.device,vk.pool,1,&commands[i]);
|
||||
}
|
||||
}
|
||||
static void surf_scene_destroy(XrSwapchain handle) {
|
||||
if(!handle || spvk.ready<=0)return;
|
||||
// A compositor command can still be sampling this mirror after its
|
||||
// snapshot copy completes. Retire those readers before destroying a view.
|
||||
for(int k=0;k<SURF_MAX;k++)for(uint32_t j=0;j<sc_outputs[k].count;j++)
|
||||
if(sc_outputs[k].pending[j])vk.WaitForFences(vk.device,1,&sc_outputs[k].fences[j],VK_TRUE,UINT64_MAX);
|
||||
for(int i=0;i<SC_SCENES;i++)if(sc_scenes[i].handle==handle) {
|
||||
surf_scene_snapshot *s=&sc_scenes[i];
|
||||
sc_retire(s->commands,s->fences,s->pending,MAX_IMAGES);
|
||||
if(s->view)spvk.DestroyImageView(vk.device,s->view,NULL);
|
||||
if(s->image)spvk.DestroyImage(vk.device,s->image,NULL);
|
||||
if(s->memory)spvk.FreeMemory(vk.device,s->memory,NULL);
|
||||
memset(s,0,sizeof(*s));
|
||||
}
|
||||
}
|
||||
static void surf_composite_destroy(surf_projection *p) {
|
||||
surf_composite *c=&sc_outputs[p-surf_projections];
|
||||
sc_retire(c->commands,c->fences,c->pending,c->count);
|
||||
if(c->pipeline)spvk.DestroyPipeline(vk.device,c->pipeline,NULL);
|
||||
if(c->layout)spvk.DestroyPipelineLayout(vk.device,c->layout,NULL);
|
||||
if(c->pool)spvk.DestroyDescriptorPool(vk.device,c->pool,NULL);
|
||||
if(c->set_layout)spvk.DestroyDescriptorSetLayout(vk.device,c->set_layout,NULL);
|
||||
if(c->sampler)spvk.DestroySampler(vk.device,c->sampler,NULL);
|
||||
for(uint32_t i=0;i<c->count;i++) {
|
||||
if(c->framebuffers[i])spvk.DestroyFramebuffer(vk.device,c->framebuffers[i],NULL);
|
||||
if(c->views[i])spvk.DestroyImageView(vk.device,c->views[i],NULL);
|
||||
}
|
||||
if(c->render_pass)spvk.DestroyRenderPass(vk.device,c->render_pass,NULL);
|
||||
if(c->output) {
|
||||
PFN_xrDestroySwapchain fn=(PFN_xrDestroySwapchain)lookup(active_instance,"xrDestroySwapchain");
|
||||
if(c->acquired) {
|
||||
PFN_xrWaitSwapchainImage wait=(PFN_xrWaitSwapchainImage)lookup(active_instance,"xrWaitSwapchainImage");
|
||||
PFN_xrReleaseSwapchainImage release=(PFN_xrReleaseSwapchainImage)lookup(active_instance,"xrReleaseSwapchainImage");
|
||||
XrSwapchainImageWaitInfo wi={XR_TYPE_SWAPCHAIN_IMAGE_WAIT_INFO,NULL,XR_INFINITE_DURATION};
|
||||
XrSwapchainImageReleaseInfo ri={XR_TYPE_SWAPCHAIN_IMAGE_RELEASE_INFO};
|
||||
if(wait(c->output,&wi)==XR_SUCCESS)release(c->output,&ri);
|
||||
}
|
||||
if(fn)fn(c->output);
|
||||
}
|
||||
memset(c,0,sizeof(*c));
|
||||
}
|
||||
|
||||
// Called while the application still owns this successfully waited image.
|
||||
// Queue ordering includes the application's rendering and this snapshot copy;
|
||||
// no CPU readback, post-release access, or deferred OpenXR release is needed.
|
||||
static void surf_scene_capture(tracked_swapchain *t,uint32_t index) {
|
||||
if(!surface_native || monotonic_ns()>sc_capture_until || !t || index>=t->image_count ||
|
||||
spvk.ready<=0 || t->info.sampleCount!=1 || t->info.arraySize!=2 ||
|
||||
!(t->info.usageFlags&XR_SWAPCHAIN_USAGE_TRANSFER_SRC_BIT) ||
|
||||
!(t->info.usageFlags&XR_SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT))return;
|
||||
surf_scene_snapshot *s=NULL;
|
||||
for(int i=0;i<SC_SCENES;i++)if(sc_scenes[i].handle==t->handle){s=&sc_scenes[i];break;}
|
||||
if(!s)for(int i=0;i<SC_SCENES;i++)if(!sc_scenes[i].handle){s=&sc_scenes[i];s->handle=t->handle;break;}
|
||||
if(!s)return;
|
||||
if(!s->view) {
|
||||
s->width=t->info.width;s->height=t->info.height;s->layers=t->info.arraySize;
|
||||
if(!surf_private_image(s->width,s->height,s->layers,(VkFormat)t->info.format,
|
||||
VK_IMAGE_USAGE_TRANSFER_DST_BIT|VK_IMAGE_USAGE_SAMPLED_BIT,&s->image,&s->memory,&s->view)) {
|
||||
surf_scene_destroy(t->handle);return;
|
||||
}
|
||||
}
|
||||
if(!s->commands[index] && !sc_command(&s->commands[index],&s->fences[index]))return;
|
||||
if(!sc_reuse(s->fences[index],&s->pending[index]))return;
|
||||
VkCommandBuffer cmd=s->commands[index];
|
||||
VkCommandBufferBeginInfo begin={VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO,NULL,VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT};
|
||||
if(vk.ResetCommandBuffer(cmd,0)!=VK_SUCCESS || vk.BeginCommandBuffer(cmd,&begin)!=VK_SUCCESS)return;
|
||||
sc_barrier(cmd,t->images[index],s->layers,VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
|
||||
VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT,VK_ACCESS_TRANSFER_READ_BIT);
|
||||
sc_barrier(cmd,s->image,s->layers,s->ready?VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL:VK_IMAGE_LAYOUT_UNDEFINED,
|
||||
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,s->ready?VK_ACCESS_SHADER_READ_BIT:0,VK_ACCESS_TRANSFER_WRITE_BIT);
|
||||
VkImageCopy copy={{VK_IMAGE_ASPECT_COLOR_BIT,0,0,s->layers},{0,0,0},
|
||||
{VK_IMAGE_ASPECT_COLOR_BIT,0,0,s->layers},{0,0,0},{s->width,s->height,1}};
|
||||
spvk.CmdCopyImage(cmd,t->images[index],VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,s->image,VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,1,©);
|
||||
sc_barrier(cmd,s->image,s->layers,VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
|
||||
VK_ACCESS_TRANSFER_WRITE_BIT,VK_ACCESS_SHADER_READ_BIT);
|
||||
sc_barrier(cmd,t->images[index],s->layers,VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
|
||||
VK_ACCESS_TRANSFER_READ_BIT,VK_ACCESS_COLOR_ATTACHMENT_READ_BIT|VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT);
|
||||
if(vk.EndCommandBuffer(cmd)!=VK_SUCCESS)return;
|
||||
VkSubmitInfo submit={VK_STRUCTURE_TYPE_SUBMIT_INFO,NULL,0,NULL,NULL,1,&cmd};
|
||||
if(vk.QueueSubmit(vk.queue,1,&submit,s->fences[index])!=VK_SUCCESS)return;
|
||||
s->pending[index]=1;s->ready=1;s->serial=sc_serial+1;s->captured_release=s->releases+1;
|
||||
}
|
||||
|
||||
static int sc_setup(XrSession session,surf_projection *p,surf_composite *c) {
|
||||
if(c->pipeline)return 1;
|
||||
if(c->failed)return 0;
|
||||
PFN_xrCreateSwapchain create=(PFN_xrCreateSwapchain)lookup(active_instance,"xrCreateSwapchain");
|
||||
PFN_xrEnumerateSwapchainImages enumerate=(PFN_xrEnumerateSwapchainImages)lookup(active_instance,"xrEnumerateSwapchainImages");
|
||||
XrSwapchainCreateInfo ci={XR_TYPE_SWAPCHAIN_CREATE_INFO,NULL,0,
|
||||
XR_SWAPCHAIN_USAGE_TRANSFER_DST_BIT|XR_SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT,
|
||||
VK_FORMAT_R8G8B8A8_SRGB,1,2*p->size,p->size,1,1,1};
|
||||
if(!create || !enumerate || XR_FAILED(create(session,&ci,&c->output)))goto fail;
|
||||
XrSwapchainImageVulkanKHR images[MAX_IMAGES];
|
||||
for(int i=0;i<MAX_IMAGES;i++)images[i]=(XrSwapchainImageVulkanKHR){XR_TYPE_SWAPCHAIN_IMAGE_VULKAN_KHR};
|
||||
if(XR_FAILED(enumerate(c->output,MAX_IMAGES,&c->count,(void*)images)) || !c->count || c->count>MAX_IMAGES) {
|
||||
c->count=0;goto fail;
|
||||
}
|
||||
for(uint32_t i=0;i<c->count;i++) {
|
||||
c->images[i]=images[i].image;
|
||||
if(!sc_command(&c->commands[i],&c->fences[i]))goto fail;
|
||||
}
|
||||
VkAttachmentDescription attachment={0,VK_FORMAT_R8G8B8A8_SRGB,VK_SAMPLE_COUNT_1_BIT,
|
||||
VK_ATTACHMENT_LOAD_OP_DONT_CARE,VK_ATTACHMENT_STORE_OP_STORE,VK_ATTACHMENT_LOAD_OP_DONT_CARE,
|
||||
VK_ATTACHMENT_STORE_OP_DONT_CARE,VK_IMAGE_LAYOUT_UNDEFINED,VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL};
|
||||
VkAttachmentReference reference={0,VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL};
|
||||
VkSubpassDescription subpass={0,VK_PIPELINE_BIND_POINT_GRAPHICS,0,NULL,1,&reference};
|
||||
VkSubpassDependency dependency={VK_SUBPASS_EXTERNAL,0,VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
|
||||
VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT|VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT,
|
||||
VK_ACCESS_MEMORY_WRITE_BIT|VK_ACCESS_MEMORY_READ_BIT,VK_ACCESS_SHADER_READ_BIT|VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT};
|
||||
VkRenderPassCreateInfo rpi={VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO,NULL,0,1,&attachment,1,&subpass,1,&dependency};
|
||||
if(spvk.CreateRenderPass(vk.device,&rpi,NULL,&c->render_pass)!=VK_SUCCESS)goto fail;
|
||||
for(uint32_t i=0;i<c->count;i++) {
|
||||
VkImageViewCreateInfo vi={VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,NULL,0,c->images[i],VK_IMAGE_VIEW_TYPE_2D,
|
||||
VK_FORMAT_R8G8B8A8_SRGB,{0,0,0,0},{VK_IMAGE_ASPECT_COLOR_BIT,0,1,0,1}};
|
||||
if(spvk.CreateImageView(vk.device,&vi,NULL,&c->views[i])!=VK_SUCCESS)goto fail;
|
||||
VkFramebufferCreateInfo fi={VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO,NULL,0,c->render_pass,1,&c->views[i],2*p->size,p->size,1};
|
||||
if(spvk.CreateFramebuffer(vk.device,&fi,NULL,&c->framebuffers[i])!=VK_SUCCESS)goto fail;
|
||||
}
|
||||
VkSamplerCreateInfo si={VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO,NULL,0,VK_FILTER_LINEAR,VK_FILTER_LINEAR,
|
||||
VK_SAMPLER_MIPMAP_MODE_NEAREST,VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,
|
||||
VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE};
|
||||
if(spvk.CreateSampler(vk.device,&si,NULL,&c->sampler)!=VK_SUCCESS)goto fail;
|
||||
VkDescriptorSetLayoutBinding bindings[2]={{0,VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,1,VK_SHADER_STAGE_FRAGMENT_BIT},
|
||||
{1,VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,1,VK_SHADER_STAGE_FRAGMENT_BIT}};
|
||||
VkDescriptorSetLayoutCreateInfo li={VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO,NULL,0,2,bindings};
|
||||
if(spvk.CreateDescriptorSetLayout(vk.device,&li,NULL,&c->set_layout)!=VK_SUCCESS)goto fail;
|
||||
VkDescriptorPoolSize sizes[1]={{VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,4*c->count}};
|
||||
VkDescriptorPoolCreateInfo pi={VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO,NULL,0,2*c->count,1,sizes};
|
||||
if(spvk.CreateDescriptorPool(vk.device,&pi,NULL,&c->pool)!=VK_SUCCESS)goto fail;
|
||||
for(uint32_t i=0;i<c->count;i++)for(int e=0;e<2;e++) {
|
||||
VkDescriptorSetAllocateInfo ai={VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO,NULL,c->pool,1,&c->set_layout};
|
||||
if(spvk.AllocateDescriptorSets(vk.device,&ai,&c->sets[i][e])!=VK_SUCCESS)goto fail;
|
||||
}
|
||||
VkPushConstantRange range={VK_SHADER_STAGE_FRAGMENT_BIT,0,sizeof(surf_composite_params)};
|
||||
VkPipelineLayoutCreateInfo pli={VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO,NULL,0,1,&c->set_layout,1,&range};
|
||||
if(spvk.CreatePipelineLayout(vk.device,&pli,NULL,&c->layout)!=VK_SUCCESS)goto fail;
|
||||
VkShaderModule modules[2]={0};
|
||||
VkShaderModuleCreateInfo mi={VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO,NULL,0,sizeof(surface_composite_vert_spv),surface_composite_vert_spv};
|
||||
if(spvk.CreateShaderModule(vk.device,&mi,NULL,&modules[0])!=VK_SUCCESS)goto fail;
|
||||
mi.codeSize=sizeof(surface_composite_frag_spv);mi.pCode=surface_composite_frag_spv;
|
||||
if(spvk.CreateShaderModule(vk.device,&mi,NULL,&modules[1])!=VK_SUCCESS) {
|
||||
spvk.DestroyShaderModule(vk.device,modules[0],NULL);goto fail;
|
||||
}
|
||||
VkPipelineShaderStageCreateInfo stages[2]={
|
||||
{VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO,NULL,0,VK_SHADER_STAGE_VERTEX_BIT,modules[0],"main"},
|
||||
{VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO,NULL,0,VK_SHADER_STAGE_FRAGMENT_BIT,modules[1],"main"}};
|
||||
VkPipelineVertexInputStateCreateInfo vertices={VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO};
|
||||
VkPipelineInputAssemblyStateCreateInfo assembly={VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO,NULL,0,VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST};
|
||||
VkPipelineViewportStateCreateInfo viewport={VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO,NULL,0,1,NULL,1,NULL};
|
||||
VkPipelineRasterizationStateCreateInfo raster={VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO,NULL,0,VK_FALSE,VK_FALSE,
|
||||
VK_POLYGON_MODE_FILL,VK_CULL_MODE_NONE,VK_FRONT_FACE_COUNTER_CLOCKWISE,VK_FALSE,0,0,0,1};
|
||||
VkPipelineMultisampleStateCreateInfo samples={VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO,NULL,0,VK_SAMPLE_COUNT_1_BIT};
|
||||
VkPipelineColorBlendAttachmentState blend={.colorWriteMask=VK_COLOR_COMPONENT_R_BIT|VK_COLOR_COMPONENT_G_BIT|VK_COLOR_COMPONENT_B_BIT|VK_COLOR_COMPONENT_A_BIT};
|
||||
VkPipelineColorBlendStateCreateInfo blends={VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO,NULL,0,VK_FALSE,VK_LOGIC_OP_COPY,1,&blend};
|
||||
VkDynamicState dynamic_states[2]={VK_DYNAMIC_STATE_VIEWPORT,VK_DYNAMIC_STATE_SCISSOR};
|
||||
VkPipelineDynamicStateCreateInfo dynamic={VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO,NULL,0,2,dynamic_states};
|
||||
VkGraphicsPipelineCreateInfo pci={VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO,NULL,0,2,stages,&vertices,&assembly,NULL,&viewport,
|
||||
&raster,&samples,NULL,&blends,&dynamic,c->layout,c->render_pass,0,VK_NULL_HANDLE,-1};
|
||||
VkResult result=spvk.CreateGraphicsPipelines(vk.device,VK_NULL_HANDLE,1,&pci,NULL,&c->pipeline);
|
||||
for(int k=0;k<2;k++)spvk.DestroyShaderModule(vk.device,modules[k],NULL);
|
||||
if(result!=VK_SUCCESS)goto fail;
|
||||
LOG("surface_composite: one primary stereo scene, %ux%u per eye",p->size,p->size);return 1;
|
||||
fail:
|
||||
surf_composite_destroy(p);c->failed=1;
|
||||
LOG("surface_composite: setup failed; retaining ordinary composition");return 0;
|
||||
}
|
||||
|
||||
static const XrCompositionLayerBaseHeader *surf_composite_frame(XrSession session,const XrFrameEndInfo *info,
|
||||
const XrCompositionLayerProjection *scene,const XrCompositionLayerBaseHeader *video) {
|
||||
surf_projection *p=NULL;
|
||||
for(int i=0;i<SURF_MAX;i++)if(video==(const void*)&surf_projections[i].layer && surfs[i].native_project) {
|
||||
p=&surf_projections[i];break;
|
||||
}
|
||||
if(!p || !p->cache_ready || !sc_scene_supported(scene))return NULL;
|
||||
if(p->presented_job.params[0][7]!=0 || p->presented_job.params[1][7]!=0)return NULL;
|
||||
sc_capture_until=monotonic_ns()+500000000ll;
|
||||
surf_composite *c=&sc_outputs[p-surf_projections];
|
||||
surf_scene_snapshot *sources[2]={0};
|
||||
for(int e=0;e<2;e++)for(int i=0;i<SC_SCENES;i++)if(sc_scenes[i].handle==scene->views[e].subImage.swapchain) {
|
||||
sources[e]=&sc_scenes[i];break;
|
||||
}
|
||||
if(p->cached_job.space!=surfs[p-surf_projections].video_job.space)return NULL;
|
||||
if(!sources[0] || !sources[1] || sources[0]->captured_release!=sources[0]->releases || sources[1]->captured_release!=sources[1]->releases)goto held;
|
||||
for(int e=0;e<2;e++)if(scene->views[e].next || scene->views[e].subImage.imageArrayIndex>=sources[e]->layers)goto held;
|
||||
if(!sc_setup(session,p,c))return NULL;
|
||||
PFN_xrAcquireSwapchainImage acquire=(PFN_xrAcquireSwapchainImage)lookup(active_instance,"xrAcquireSwapchainImage");
|
||||
PFN_xrWaitSwapchainImage wait=(PFN_xrWaitSwapchainImage)lookup(active_instance,"xrWaitSwapchainImage");
|
||||
PFN_xrReleaseSwapchainImage release=(PFN_xrReleaseSwapchainImage)lookup(active_instance,"xrReleaseSwapchainImage");
|
||||
XrSwapchainImageAcquireInfo ai={XR_TYPE_SWAPCHAIN_IMAGE_ACQUIRE_INFO};
|
||||
XrSwapchainImageWaitInfo wi={XR_TYPE_SWAPCHAIN_IMAGE_WAIT_INFO,NULL,0};
|
||||
XrSwapchainImageReleaseInfo ri={XR_TYPE_SWAPCHAIN_IMAGE_RELEASE_INFO};
|
||||
if(!c->acquired) {
|
||||
if(XR_FAILED(acquire(c->output,&ai,&c->index)))goto held;
|
||||
c->acquired=1;
|
||||
}
|
||||
if(wait(c->output,&wi)!=XR_SUCCESS)goto held;
|
||||
if(c->index>=c->count) {release(c->output,&ri);c->acquired=0;goto held;}
|
||||
uint32_t index=c->index;
|
||||
if(!sc_reuse(c->fences[index],&c->pending[index]))goto held;
|
||||
surf_swapchain *s=&surfs[p-surf_projections];
|
||||
pthread_mutex_lock(&surf_lock);surf_video_job current=s->video_job;pthread_mutex_unlock(&surf_lock);
|
||||
VkCommandBuffer cmd=c->commands[index];
|
||||
VkCommandBufferBeginInfo begin={VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO,NULL,VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT};
|
||||
if(vk.ResetCommandBuffer(cmd,0)!=VK_SUCCESS || vk.BeginCommandBuffer(cmd,&begin)!=VK_SUCCESS)goto held;
|
||||
VkRenderPassBeginInfo rbi={VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO,NULL,c->render_pass,c->framebuffers[index],
|
||||
{{0,0},{2*p->size,p->size}},0,NULL};
|
||||
spvk.CmdBeginRenderPass(cmd,&rbi,VK_SUBPASS_CONTENTS_INLINE);
|
||||
spvk.CmdBindPipeline(cmd,VK_PIPELINE_BIND_POINT_GRAPHICS,c->pipeline);
|
||||
for(int e=0;e<2;e++) {
|
||||
VkDescriptorImageInfo di[2]={{c->sampler,p->video_cache_view,VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL},
|
||||
{c->sampler,sources[e]->view,VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL}};
|
||||
VkWriteDescriptorSet writes[2];
|
||||
for(int k=0;k<2;k++)writes[k]=(VkWriteDescriptorSet){VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET,NULL,c->sets[index][e],k,0,1,
|
||||
VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,&di[k]};
|
||||
spvk.UpdateDescriptorSets(vk.device,2,writes,0,NULL);
|
||||
spvk.CmdBindDescriptorSets(cmd,VK_PIPELINE_BIND_POINT_GRAPHICS,c->layout,0,1,&c->sets[index][e],0,NULL);
|
||||
surf_composite_params params=surf_composite_parameters(&p->cached_job,¤t,e,
|
||||
scene->views[e].subImage.imageRect,sources[e]->width,sources[e]->height,scene->views[e].subImage.imageArrayIndex);
|
||||
params.scene_options[0]=(scene->layerFlags&XR_COMPOSITION_LAYER_BLEND_TEXTURE_SOURCE_ALPHA_BIT)!=0;
|
||||
params.scene_options[1]=(scene->layerFlags&XR_COMPOSITION_LAYER_UNPREMULTIPLIED_ALPHA_BIT)!=0;
|
||||
for(const XrBaseInStructure *n=scene->next;n;n=n->next) {
|
||||
if(n->type==XR_TYPE_COMPOSITION_LAYER_COLOR_SCALE_BIAS_KHR) {
|
||||
const XrCompositionLayerColorScaleBiasKHR *color=(const void*)n;
|
||||
memcpy(params.scene_scale,&color->colorScale,16);memcpy(params.scene_bias,&color->colorBias,16);
|
||||
}
|
||||
if(n->type==XR_TYPE_COMPOSITION_LAYER_IMAGE_LAYOUT_FB)
|
||||
params.scene_options[2]=(((const XrCompositionLayerImageLayoutFB*)n)->flags&XR_COMPOSITION_LAYER_IMAGE_LAYOUT_VERTICAL_FLIP_BIT_FB)!=0;
|
||||
}
|
||||
VkViewport viewport={(float)(e*p->size),0,(float)p->size,(float)p->size,0,1};
|
||||
VkRect2D scissor={{e*(int32_t)p->size,0},{p->size,p->size}};
|
||||
spvk.CmdSetViewport(cmd,0,1,&viewport);spvk.CmdSetScissor(cmd,0,1,&scissor);
|
||||
spvk.CmdPushConstants(cmd,c->layout,VK_SHADER_STAGE_FRAGMENT_BIT,0,sizeof(params),¶ms);
|
||||
spvk.CmdDraw(cmd,3,1,0,0);
|
||||
}
|
||||
spvk.CmdEndRenderPass(cmd);
|
||||
if(vk.EndCommandBuffer(cmd)!=VK_SUCCESS)goto held;
|
||||
VkSubmitInfo submit={VK_STRUCTURE_TYPE_SUBMIT_INFO,NULL,0,NULL,NULL,1,&cmd};
|
||||
if(vk.QueueSubmit(vk.queue,1,&submit,c->fences[index])!=VK_SUCCESS)goto held;
|
||||
c->pending[index]=1;
|
||||
if(XR_FAILED(release(c->output,&ri)))goto held;
|
||||
c->acquired=0;
|
||||
for(int e=0;e<2;e++) {
|
||||
c->eyes[e]=scene->views[e];c->eyes[e].next=NULL;
|
||||
c->eyes[e].subImage=(XrSwapchainSubImage){c->output,{{e*(int32_t)p->size,0},{(int32_t)p->size,(int32_t)p->size}},0};
|
||||
}
|
||||
c->layer=*scene;c->layer.layerFlags &= ~XR_COMPOSITION_LAYER_UNPREMULTIPLIED_ALPHA_BIT;c->layer.next=NULL;c->layer.views=c->eyes;c->ready=1;c->time=info->displayTime;c->frames++;
|
||||
if(monotonic_ns()-c->log_time>5000000000ll) {
|
||||
LOG("surface_composite: %llu new scene frames, %llu held; no scene/overlay promotion",(unsigned long long)c->frames,(unsigned long long)c->holds);
|
||||
c->log_time=monotonic_ns();
|
||||
}
|
||||
return (const void*)&c->layer;
|
||||
held:
|
||||
c->holds++;
|
||||
return c->ready && c->layer.space==scene->space?(const void*)&c->layer:NULL;
|
||||
}
|
||||
|
||||
static int surf_composite_candidate(const XrFrameEndInfo *info,const XrCompositionLayerBaseHeader *video) {
|
||||
if(!info || !info->layerCount || !info->layers[0] || info->layers[0]->type!=XR_TYPE_COMPOSITION_LAYER_PROJECTION ||
|
||||
!emul_is_equirect(video))return 0;
|
||||
const XrCompositionLayerProjection *scene=(const void*)info->layers[0];
|
||||
if(!sc_scene_supported(scene))return 0;
|
||||
emul_common target=emul_common_of(video);
|
||||
for(uint32_t i=1;i<info->layerCount;i++) {
|
||||
const XrCompositionLayerBaseHeader *layer=info->layers[i];
|
||||
if(layer==video)return 1;
|
||||
if(!layer)continue;
|
||||
if(!emul_is_equirect(layer))return 0;
|
||||
emul_common other=emul_common_of(layer);
|
||||
if(other.sub.swapchain!=target.sub.swapchain || other.space!=target.space)return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
static void surf_scene_release_commit(XrSwapchain handle) {
|
||||
for(int i=0;i<SC_SCENES;i++)if(sc_scenes[i].handle==handle){sc_scenes[i].releases++;break;}
|
||||
}
|
||||
static int surf_composite_cached_only(const XrFrameEndInfo *info,surf_projection *p,
|
||||
const surf_video_job *rendered,const surf_video_job *current) {
|
||||
surf_composite *c=&sc_outputs[p-surf_projections];
|
||||
const XrCompositionLayerProjection *scene=(const void*)info->layers[0];
|
||||
return c->ready && !p->acquired && c->layer.space==scene->space && rendered->space==current->space &&
|
||||
rendered->params[0][7]==0 && rendered->params[1][7]==0 && !c->failed;
|
||||
}
|
||||
|
||||
static int surf_composite_active(surf_projection *p) {return sc_outputs[p-surf_projections].ready;}
|
||||
@@ -0,0 +1,39 @@
|
||||
#version 450
|
||||
// Reproject the decoded video into the game camera, then compose in linear light.
|
||||
// Every output pixel belongs to one primary projection, including fades/edges.
|
||||
layout(location=0) in vec2 uv;
|
||||
layout(location=0) out vec4 outputColor;
|
||||
layout(binding=0) uniform sampler2D videoImage;
|
||||
layout(binding=1) uniform sampler2DArray sceneImage;
|
||||
layout(push_constant) uniform Params {
|
||||
vec4 rotation; vec4 outputTans; vec4 videoTans;
|
||||
vec4 sceneRect; vec4 options; vec4 sceneOptions; vec4 sceneScale; vec4 sceneBias;
|
||||
} p;
|
||||
vec3 rotate(vec4 q,vec3 v){return v+2.0*cross(q.xyz,cross(q.xyz,v)+q.w*v);}
|
||||
void main(){
|
||||
vec2 scenePixel=0.5/vec2(textureSize(sceneImage,0).xy);
|
||||
vec2 sceneCoord=vec2(uv.x,p.sceneOptions.z>0 ? 1-uv.y : uv.y);
|
||||
vec2 sceneUV=clamp(p.sceneRect.xy+sceneCoord*p.sceneRect.zw,p.sceneRect.xy+scenePixel,p.sceneRect.xy+p.sceneRect.zw-scenePixel);
|
||||
vec4 scene=textureLod(sceneImage,vec3(sceneUV,p.options.y),0);
|
||||
// Projection rows follow Vulkan/OpenXR's top-to-bottom convention.
|
||||
vec3 ray=rotate(p.rotation,vec3(mix(p.outputTans.x,p.outputTans.y,uv.x),mix(p.outputTans.w,p.outputTans.z,uv.y),-1));
|
||||
vec2 vuv=(ray.xy/-ray.z-p.videoTans.xz)/(p.videoTans.yw-p.videoTans.xz); vuv.y=1-vuv.y;
|
||||
vec4 video=vec4(0);
|
||||
if(ray.z<0 && all(greaterThanEqual(vuv,vec2(0))) && all(lessThanEqual(vuv,vec2(1))))
|
||||
{
|
||||
vec2 videoPixel=0.5/vec2(textureSize(videoImage,0));
|
||||
vec4 videoRect=vec4(p.options.x*.5,0,.5,1);
|
||||
vec2 videoUV=clamp(videoRect.xy+vuv*videoRect.zw,videoRect.xy+videoPixel,videoRect.xy+videoRect.zw-videoPixel);
|
||||
video=textureLod(videoImage,videoUV,0);
|
||||
}
|
||||
float alpha=p.options.z>0 ? video.a : 1;
|
||||
vec3 rgb=p.options.w>0 ? video.rgb*alpha : video.rgb;
|
||||
float sceneAlpha=p.sceneOptions.x>0 ? scene.a : 1;
|
||||
vec3 sceneRGB=p.sceneOptions.y>0 ? scene.rgb*sceneAlpha : scene.rgb;
|
||||
// OpenXR colour transforms act on straight colour, then restore premultiplication.
|
||||
vec4 sceneStraight=vec4(sceneAlpha>0 ? sceneRGB/sceneAlpha : vec3(0),sceneAlpha);
|
||||
sceneStraight=sceneStraight*max(p.sceneScale,vec4(0))+p.sceneBias;
|
||||
sceneAlpha=sceneStraight.a;sceneRGB=sceneStraight.rgb*sceneAlpha;
|
||||
vec4 result=vec4(rgb+sceneRGB*(1-alpha),alpha+sceneAlpha*(1-alpha));
|
||||
outputColor=result;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Parameters for composing a cached movie view into the game's scene camera.
|
||||
#ifndef FRAMEBRIDGE_SURFACE_COMPOSITE_H
|
||||
#define FRAMEBRIDGE_SURFACE_COMPOSITE_H
|
||||
#include "surface_video.h"
|
||||
typedef struct {
|
||||
float rotation[4], output_tans[4], video_tans[4];
|
||||
float scene_rect[4], options[4], scene_options[4], scene_scale[4], scene_bias[4];
|
||||
} surf_composite_params;
|
||||
static surf_composite_params surf_composite_parameters(const surf_video_job *rendered,
|
||||
const surf_video_job *current,int eye,XrRect2Di rect,uint32_t width,uint32_t height,uint32_t array_index) {
|
||||
surf_composite_params p={0};
|
||||
// The current view must already be transformed into the panorama space.
|
||||
XrPosef source=surf_video_pose(rendered,current,eye);
|
||||
XrQuaternionf relative=lm_qmul(lm_qconj(source.orientation),current->views[eye].pose.orientation);
|
||||
memcpy(p.rotation,&relative,sizeof(relative));
|
||||
for(int i=0;i<4;i++) {
|
||||
p.output_tans[i]=current->params[eye][8+i]/SURF_VIDEO_GUARD;
|
||||
p.video_tans[i]=rendered->params[eye][8+i];
|
||||
}
|
||||
p.scene_rect[0]=rect.offset.x/(float)width;p.scene_rect[1]=rect.offset.y/(float)height;
|
||||
p.scene_rect[2]=rect.extent.width/(float)width;p.scene_rect[3]=rect.extent.height/(float)height;
|
||||
for(int i=0;i<4;i++)p.scene_scale[i]=1;
|
||||
p.options[0]=(float)eye;p.options[1]=(float)array_index;
|
||||
p.options[2]=(rendered->flags&XR_COMPOSITION_LAYER_BLEND_TEXTURE_SOURCE_ALPHA_BIT)!=0;
|
||||
p.options[3]=(rendered->flags&XR_COMPOSITION_LAYER_UNPREMULTIPLIED_ALPHA_BIT)!=0;
|
||||
return p;
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,3 @@
|
||||
#version 450
|
||||
layout(location=0) out vec2 uv;
|
||||
void main(){vec2 p=vec2((gl_VertexIndex<<1)&2,gl_VertexIndex&2);uv=p;gl_Position=vec4(p*2-1,0,1);}
|
||||
@@ -0,0 +1,300 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Generated by glslc; Vulkan 1.0.
|
||||
static const uint32_t surface_composite_vert_spv[]={
|
||||
0x07230203,0x00010000,0x000d000a,0x0000002e,0x00000000,0x00020011,0x00000001,0x0006000b,
|
||||
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
|
||||
0x0008000f,0x00000000,0x00000004,0x6e69616d,0x00000000,0x0000000c,0x00000018,0x00000020,
|
||||
0x00030003,0x00000002,0x000001c2,0x000a0004,0x475f4c47,0x4c474f4f,0x70635f45,0x74735f70,
|
||||
0x5f656c79,0x656e696c,0x7269645f,0x69746365,0x00006576,0x00080004,0x475f4c47,0x4c474f4f,
|
||||
0x6e695f45,0x64756c63,0x69645f65,0x74636572,0x00657669,0x00040005,0x00000004,0x6e69616d,
|
||||
0x00000000,0x00030005,0x00000009,0x00000070,0x00060005,0x0000000c,0x565f6c67,0x65747265,
|
||||
0x646e4978,0x00007865,0x00030005,0x00000018,0x00007675,0x00060005,0x0000001e,0x505f6c67,
|
||||
0x65567265,0x78657472,0x00000000,0x00060006,0x0000001e,0x00000000,0x505f6c67,0x7469736f,
|
||||
0x006e6f69,0x00070006,0x0000001e,0x00000001,0x505f6c67,0x746e696f,0x657a6953,0x00000000,
|
||||
0x00070006,0x0000001e,0x00000002,0x435f6c67,0x4470696c,0x61747369,0x0065636e,0x00070006,
|
||||
0x0000001e,0x00000003,0x435f6c67,0x446c6c75,0x61747369,0x0065636e,0x00030005,0x00000020,
|
||||
0x00000000,0x00040047,0x0000000c,0x0000000b,0x0000002a,0x00040047,0x00000018,0x0000001e,
|
||||
0x00000000,0x00050048,0x0000001e,0x00000000,0x0000000b,0x00000000,0x00050048,0x0000001e,
|
||||
0x00000001,0x0000000b,0x00000001,0x00050048,0x0000001e,0x00000002,0x0000000b,0x00000003,
|
||||
0x00050048,0x0000001e,0x00000003,0x0000000b,0x00000004,0x00030047,0x0000001e,0x00000002,
|
||||
0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00030016,0x00000006,0x00000020,
|
||||
0x00040017,0x00000007,0x00000006,0x00000002,0x00040020,0x00000008,0x00000007,0x00000007,
|
||||
0x00040015,0x0000000a,0x00000020,0x00000001,0x00040020,0x0000000b,0x00000001,0x0000000a,
|
||||
0x0004003b,0x0000000b,0x0000000c,0x00000001,0x0004002b,0x0000000a,0x0000000e,0x00000001,
|
||||
0x0004002b,0x0000000a,0x00000010,0x00000002,0x00040020,0x00000017,0x00000003,0x00000007,
|
||||
0x0004003b,0x00000017,0x00000018,0x00000003,0x00040017,0x0000001a,0x00000006,0x00000004,
|
||||
0x00040015,0x0000001b,0x00000020,0x00000000,0x0004002b,0x0000001b,0x0000001c,0x00000001,
|
||||
0x0004001c,0x0000001d,0x00000006,0x0000001c,0x0006001e,0x0000001e,0x0000001a,0x00000006,
|
||||
0x0000001d,0x0000001d,0x00040020,0x0000001f,0x00000003,0x0000001e,0x0004003b,0x0000001f,
|
||||
0x00000020,0x00000003,0x0004002b,0x0000000a,0x00000021,0x00000000,0x0004002b,0x00000006,
|
||||
0x00000023,0x40000000,0x0004002b,0x00000006,0x00000025,0x3f800000,0x0004002b,0x00000006,
|
||||
0x00000028,0x00000000,0x00040020,0x0000002c,0x00000003,0x0000001a,0x00050036,0x00000002,
|
||||
0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003b,0x00000008,0x00000009,
|
||||
0x00000007,0x0004003d,0x0000000a,0x0000000d,0x0000000c,0x000500c4,0x0000000a,0x0000000f,
|
||||
0x0000000d,0x0000000e,0x000500c7,0x0000000a,0x00000011,0x0000000f,0x00000010,0x0004006f,
|
||||
0x00000006,0x00000012,0x00000011,0x0004003d,0x0000000a,0x00000013,0x0000000c,0x000500c7,
|
||||
0x0000000a,0x00000014,0x00000013,0x00000010,0x0004006f,0x00000006,0x00000015,0x00000014,
|
||||
0x00050050,0x00000007,0x00000016,0x00000012,0x00000015,0x0003003e,0x00000009,0x00000016,
|
||||
0x0004003d,0x00000007,0x00000019,0x00000009,0x0003003e,0x00000018,0x00000019,0x0004003d,
|
||||
0x00000007,0x00000022,0x00000009,0x0005008e,0x00000007,0x00000024,0x00000022,0x00000023,
|
||||
0x00050050,0x00000007,0x00000026,0x00000025,0x00000025,0x00050083,0x00000007,0x00000027,
|
||||
0x00000024,0x00000026,0x00050051,0x00000006,0x00000029,0x00000027,0x00000000,0x00050051,
|
||||
0x00000006,0x0000002a,0x00000027,0x00000001,0x00070050,0x0000001a,0x0000002b,0x00000029,
|
||||
0x0000002a,0x00000028,0x00000025,0x00050041,0x0000002c,0x0000002d,0x00000020,0x00000021,
|
||||
0x0003003e,0x0000002d,0x0000002b,0x000100fd,0x00010038,
|
||||
};
|
||||
static const uint32_t surface_composite_frag_spv[]={
|
||||
0x07230203,0x00010000,0x000d000a,0x00000153,0x00000000,0x00020011,0x00000001,0x00020011,
|
||||
0x00000032,0x0006000b,0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,
|
||||
0x00000000,0x00000001,0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x0000003a,
|
||||
0x00000151,0x00030010,0x00000004,0x00000007,0x00030003,0x00000002,0x000001c2,0x000a0004,
|
||||
0x475f4c47,0x4c474f4f,0x70635f45,0x74735f70,0x5f656c79,0x656e696c,0x7269645f,0x69746365,
|
||||
0x00006576,0x00080004,0x475f4c47,0x4c474f4f,0x6e695f45,0x64756c63,0x69645f65,0x74636572,
|
||||
0x00657669,0x00040005,0x00000004,0x6e69616d,0x00000000,0x00060005,0x0000000e,0x61746f72,
|
||||
0x76286574,0x763b3466,0x003b3366,0x00030005,0x0000000c,0x00000071,0x00030005,0x0000000d,
|
||||
0x00000076,0x00050005,0x00000027,0x6e656373,0x78695065,0x00006c65,0x00050005,0x0000002c,
|
||||
0x6e656373,0x616d4965,0x00006567,0x00050005,0x00000038,0x6e656373,0x6f6f4365,0x00006472,
|
||||
0x00030005,0x0000003a,0x00007675,0x00040005,0x0000003f,0x61726150,0x0000736d,0x00060006,
|
||||
0x0000003f,0x00000000,0x61746f72,0x6e6f6974,0x00000000,0x00060006,0x0000003f,0x00000001,
|
||||
0x7074756f,0x61547475,0x0000736e,0x00060006,0x0000003f,0x00000002,0x65646976,0x6e61546f,
|
||||
0x00000073,0x00060006,0x0000003f,0x00000003,0x6e656373,0x63655265,0x00000074,0x00050006,
|
||||
0x0000003f,0x00000004,0x6974706f,0x00736e6f,0x00070006,0x0000003f,0x00000005,0x6e656373,
|
||||
0x74704f65,0x736e6f69,0x00000000,0x00060006,0x0000003f,0x00000006,0x6e656373,0x61635365,
|
||||
0x0000656c,0x00060006,0x0000003f,0x00000007,0x6e656373,0x61694265,0x00000073,0x00030005,
|
||||
0x00000041,0x00000070,0x00040005,0x00000057,0x6e656373,0x00565565,0x00040005,0x00000072,
|
||||
0x6e656373,0x00000065,0x00030005,0x0000007c,0x00796172,0x00040005,0x0000008e,0x61726170,
|
||||
0x0000006d,0x00040005,0x00000091,0x61726170,0x0000006d,0x00030005,0x00000093,0x00767576,
|
||||
0x00040005,0x000000ac,0x65646976,0x0000006f,0x00050005,0x000000c2,0x65646976,0x7869506f,
|
||||
0x00006c65,0x00050005,0x000000c6,0x65646976,0x616d496f,0x00006567,0x00050005,0x000000cd,
|
||||
0x65646976,0x6365526f,0x00000074,0x00040005,0x000000d2,0x65646976,0x0056556f,0x00040005,
|
||||
0x000000e9,0x68706c61,0x00000061,0x00030005,0x000000f4,0x00626772,0x00050005,0x00000103,
|
||||
0x6e656373,0x706c4165,0x00006168,0x00050005,0x0000010e,0x6e656373,0x42475265,0x00000000,
|
||||
0x00060005,0x0000011d,0x6e656373,0x72745365,0x68676961,0x00000074,0x00040005,0x0000013f,
|
||||
0x75736572,0x0000746c,0x00050005,0x00000151,0x7074756f,0x6f437475,0x00726f6c,0x00040047,
|
||||
0x0000002c,0x00000022,0x00000000,0x00040047,0x0000002c,0x00000021,0x00000001,0x00040047,
|
||||
0x0000003a,0x0000001e,0x00000000,0x00050048,0x0000003f,0x00000000,0x00000023,0x00000000,
|
||||
0x00050048,0x0000003f,0x00000001,0x00000023,0x00000010,0x00050048,0x0000003f,0x00000002,
|
||||
0x00000023,0x00000020,0x00050048,0x0000003f,0x00000003,0x00000023,0x00000030,0x00050048,
|
||||
0x0000003f,0x00000004,0x00000023,0x00000040,0x00050048,0x0000003f,0x00000005,0x00000023,
|
||||
0x00000050,0x00050048,0x0000003f,0x00000006,0x00000023,0x00000060,0x00050048,0x0000003f,
|
||||
0x00000007,0x00000023,0x00000070,0x00030047,0x0000003f,0x00000002,0x00040047,0x000000c6,
|
||||
0x00000022,0x00000000,0x00040047,0x000000c6,0x00000021,0x00000000,0x00040047,0x00000151,
|
||||
0x0000001e,0x00000000,0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00030016,
|
||||
0x00000006,0x00000020,0x00040017,0x00000007,0x00000006,0x00000004,0x00040020,0x00000008,
|
||||
0x00000007,0x00000007,0x00040017,0x00000009,0x00000006,0x00000003,0x00040020,0x0000000a,
|
||||
0x00000007,0x00000009,0x00050021,0x0000000b,0x00000009,0x00000008,0x0000000a,0x0004002b,
|
||||
0x00000006,0x00000011,0x40000000,0x00040015,0x00000018,0x00000020,0x00000000,0x0004002b,
|
||||
0x00000018,0x00000019,0x00000003,0x00040020,0x0000001a,0x00000007,0x00000006,0x00040017,
|
||||
0x00000025,0x00000006,0x00000002,0x00040020,0x00000026,0x00000007,0x00000025,0x0004002b,
|
||||
0x00000006,0x00000028,0x3f000000,0x00090019,0x00000029,0x00000006,0x00000001,0x00000000,
|
||||
0x00000001,0x00000000,0x00000001,0x00000000,0x0003001b,0x0000002a,0x00000029,0x00040020,
|
||||
0x0000002b,0x00000000,0x0000002a,0x0004003b,0x0000002b,0x0000002c,0x00000000,0x00040015,
|
||||
0x0000002e,0x00000020,0x00000001,0x0004002b,0x0000002e,0x0000002f,0x00000000,0x00040017,
|
||||
0x00000031,0x0000002e,0x00000003,0x00040017,0x00000033,0x0000002e,0x00000002,0x00040020,
|
||||
0x00000039,0x00000001,0x00000025,0x0004003b,0x00000039,0x0000003a,0x00000001,0x0004002b,
|
||||
0x00000018,0x0000003b,0x00000000,0x00040020,0x0000003c,0x00000001,0x00000006,0x000a001e,
|
||||
0x0000003f,0x00000007,0x00000007,0x00000007,0x00000007,0x00000007,0x00000007,0x00000007,
|
||||
0x00000007,0x00040020,0x00000040,0x00000009,0x0000003f,0x0004003b,0x00000040,0x00000041,
|
||||
0x00000009,0x0004002b,0x0000002e,0x00000042,0x00000005,0x0004002b,0x00000018,0x00000043,
|
||||
0x00000002,0x00040020,0x00000044,0x00000009,0x00000006,0x0004002b,0x00000006,0x00000047,
|
||||
0x00000000,0x00020014,0x00000048,0x0004002b,0x00000006,0x0000004d,0x3f800000,0x0004002b,
|
||||
0x00000018,0x0000004e,0x00000001,0x0004002b,0x0000002e,0x00000058,0x00000003,0x00040020,
|
||||
0x00000059,0x00000009,0x00000007,0x0004002b,0x0000002e,0x00000075,0x00000004,0x0004002b,
|
||||
0x0000002e,0x0000007d,0x00000001,0x0004002b,0x00000006,0x0000008c,0xbf800000,0x0004002b,
|
||||
0x0000002e,0x0000009b,0x00000002,0x0007002c,0x00000007,0x000000ad,0x00000047,0x00000047,
|
||||
0x00000047,0x00000047,0x0005002c,0x00000025,0x000000b4,0x00000047,0x00000047,0x00040017,
|
||||
0x000000b5,0x00000048,0x00000002,0x0005002c,0x00000025,0x000000bc,0x0000004d,0x0000004d,
|
||||
0x00090019,0x000000c3,0x00000006,0x00000001,0x00000000,0x00000000,0x00000000,0x00000001,
|
||||
0x00000000,0x0003001b,0x000000c4,0x000000c3,0x00040020,0x000000c5,0x00000000,0x000000c4,
|
||||
0x0004003b,0x000000c5,0x000000c6,0x00000000,0x0006002c,0x00000009,0x00000128,0x00000047,
|
||||
0x00000047,0x00000047,0x0004002b,0x0000002e,0x00000130,0x00000006,0x0004002b,0x0000002e,
|
||||
0x00000135,0x00000007,0x00040020,0x00000150,0x00000003,0x00000007,0x0004003b,0x00000150,
|
||||
0x00000151,0x00000003,0x00050036,0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,
|
||||
0x00000005,0x0004003b,0x00000026,0x00000027,0x00000007,0x0004003b,0x00000026,0x00000038,
|
||||
0x00000007,0x0004003b,0x0000001a,0x0000004a,0x00000007,0x0004003b,0x00000026,0x00000057,
|
||||
0x00000007,0x0004003b,0x00000008,0x00000072,0x00000007,0x0004003b,0x0000000a,0x0000007c,
|
||||
0x00000007,0x0004003b,0x00000008,0x0000008e,0x00000007,0x0004003b,0x0000000a,0x00000091,
|
||||
0x00000007,0x0004003b,0x00000026,0x00000093,0x00000007,0x0004003b,0x00000008,0x000000ac,
|
||||
0x00000007,0x0004003b,0x00000026,0x000000c2,0x00000007,0x0004003b,0x00000008,0x000000cd,
|
||||
0x00000007,0x0004003b,0x00000026,0x000000d2,0x00000007,0x0004003b,0x0000001a,0x000000e9,
|
||||
0x00000007,0x0004003b,0x0000001a,0x000000ed,0x00000007,0x0004003b,0x0000000a,0x000000f4,
|
||||
0x00000007,0x0004003b,0x0000000a,0x000000f8,0x00000007,0x0004003b,0x0000001a,0x00000103,
|
||||
0x00000007,0x0004003b,0x0000001a,0x00000107,0x00000007,0x0004003b,0x0000000a,0x0000010e,
|
||||
0x00000007,0x0004003b,0x0000000a,0x00000112,0x00000007,0x0004003b,0x00000008,0x0000011d,
|
||||
0x00000007,0x0004003b,0x0000000a,0x00000120,0x00000007,0x0004003b,0x00000008,0x0000013f,
|
||||
0x00000007,0x0004003d,0x0000002a,0x0000002d,0x0000002c,0x00040064,0x00000029,0x00000030,
|
||||
0x0000002d,0x00050067,0x00000031,0x00000032,0x00000030,0x0000002f,0x0007004f,0x00000033,
|
||||
0x00000034,0x00000032,0x00000032,0x00000000,0x00000001,0x0004006f,0x00000025,0x00000035,
|
||||
0x00000034,0x00050050,0x00000025,0x00000036,0x00000028,0x00000028,0x00050088,0x00000025,
|
||||
0x00000037,0x00000036,0x00000035,0x0003003e,0x00000027,0x00000037,0x00050041,0x0000003c,
|
||||
0x0000003d,0x0000003a,0x0000003b,0x0004003d,0x00000006,0x0000003e,0x0000003d,0x00060041,
|
||||
0x00000044,0x00000045,0x00000041,0x00000042,0x00000043,0x0004003d,0x00000006,0x00000046,
|
||||
0x00000045,0x000500ba,0x00000048,0x00000049,0x00000046,0x00000047,0x000300f7,0x0000004c,
|
||||
0x00000000,0x000400fa,0x00000049,0x0000004b,0x00000052,0x000200f8,0x0000004b,0x00050041,
|
||||
0x0000003c,0x0000004f,0x0000003a,0x0000004e,0x0004003d,0x00000006,0x00000050,0x0000004f,
|
||||
0x00050083,0x00000006,0x00000051,0x0000004d,0x00000050,0x0003003e,0x0000004a,0x00000051,
|
||||
0x000200f9,0x0000004c,0x000200f8,0x00000052,0x00050041,0x0000003c,0x00000053,0x0000003a,
|
||||
0x0000004e,0x0004003d,0x00000006,0x00000054,0x00000053,0x0003003e,0x0000004a,0x00000054,
|
||||
0x000200f9,0x0000004c,0x000200f8,0x0000004c,0x0004003d,0x00000006,0x00000055,0x0000004a,
|
||||
0x00050050,0x00000025,0x00000056,0x0000003e,0x00000055,0x0003003e,0x00000038,0x00000056,
|
||||
0x00050041,0x00000059,0x0000005a,0x00000041,0x00000058,0x0004003d,0x00000007,0x0000005b,
|
||||
0x0000005a,0x0007004f,0x00000025,0x0000005c,0x0000005b,0x0000005b,0x00000000,0x00000001,
|
||||
0x0004003d,0x00000025,0x0000005d,0x00000038,0x00050041,0x00000059,0x0000005e,0x00000041,
|
||||
0x00000058,0x0004003d,0x00000007,0x0000005f,0x0000005e,0x0007004f,0x00000025,0x00000060,
|
||||
0x0000005f,0x0000005f,0x00000002,0x00000003,0x00050085,0x00000025,0x00000061,0x0000005d,
|
||||
0x00000060,0x00050081,0x00000025,0x00000062,0x0000005c,0x00000061,0x00050041,0x00000059,
|
||||
0x00000063,0x00000041,0x00000058,0x0004003d,0x00000007,0x00000064,0x00000063,0x0007004f,
|
||||
0x00000025,0x00000065,0x00000064,0x00000064,0x00000000,0x00000001,0x0004003d,0x00000025,
|
||||
0x00000066,0x00000027,0x00050081,0x00000025,0x00000067,0x00000065,0x00000066,0x00050041,
|
||||
0x00000059,0x00000068,0x00000041,0x00000058,0x0004003d,0x00000007,0x00000069,0x00000068,
|
||||
0x0007004f,0x00000025,0x0000006a,0x00000069,0x00000069,0x00000000,0x00000001,0x00050041,
|
||||
0x00000059,0x0000006b,0x00000041,0x00000058,0x0004003d,0x00000007,0x0000006c,0x0000006b,
|
||||
0x0007004f,0x00000025,0x0000006d,0x0000006c,0x0000006c,0x00000002,0x00000003,0x00050081,
|
||||
0x00000025,0x0000006e,0x0000006a,0x0000006d,0x0004003d,0x00000025,0x0000006f,0x00000027,
|
||||
0x00050083,0x00000025,0x00000070,0x0000006e,0x0000006f,0x0008000c,0x00000025,0x00000071,
|
||||
0x00000001,0x0000002b,0x00000062,0x00000067,0x00000070,0x0003003e,0x00000057,0x00000071,
|
||||
0x0004003d,0x0000002a,0x00000073,0x0000002c,0x0004003d,0x00000025,0x00000074,0x00000057,
|
||||
0x00060041,0x00000044,0x00000076,0x00000041,0x00000075,0x0000004e,0x0004003d,0x00000006,
|
||||
0x00000077,0x00000076,0x00050051,0x00000006,0x00000078,0x00000074,0x00000000,0x00050051,
|
||||
0x00000006,0x00000079,0x00000074,0x00000001,0x00060050,0x00000009,0x0000007a,0x00000078,
|
||||
0x00000079,0x00000077,0x00070058,0x00000007,0x0000007b,0x00000073,0x0000007a,0x00000002,
|
||||
0x00000047,0x0003003e,0x00000072,0x0000007b,0x00060041,0x00000044,0x0000007e,0x00000041,
|
||||
0x0000007d,0x0000003b,0x0004003d,0x00000006,0x0000007f,0x0000007e,0x00060041,0x00000044,
|
||||
0x00000080,0x00000041,0x0000007d,0x0000004e,0x0004003d,0x00000006,0x00000081,0x00000080,
|
||||
0x00050041,0x0000003c,0x00000082,0x0000003a,0x0000003b,0x0004003d,0x00000006,0x00000083,
|
||||
0x00000082,0x0008000c,0x00000006,0x00000084,0x00000001,0x0000002e,0x0000007f,0x00000081,
|
||||
0x00000083,0x00060041,0x00000044,0x00000085,0x00000041,0x0000007d,0x00000019,0x0004003d,
|
||||
0x00000006,0x00000086,0x00000085,0x00060041,0x00000044,0x00000087,0x00000041,0x0000007d,
|
||||
0x00000043,0x0004003d,0x00000006,0x00000088,0x00000087,0x00050041,0x0000003c,0x00000089,
|
||||
0x0000003a,0x0000004e,0x0004003d,0x00000006,0x0000008a,0x00000089,0x0008000c,0x00000006,
|
||||
0x0000008b,0x00000001,0x0000002e,0x00000086,0x00000088,0x0000008a,0x00060050,0x00000009,
|
||||
0x0000008d,0x00000084,0x0000008b,0x0000008c,0x00050041,0x00000059,0x0000008f,0x00000041,
|
||||
0x0000002f,0x0004003d,0x00000007,0x00000090,0x0000008f,0x0003003e,0x0000008e,0x00000090,
|
||||
0x0003003e,0x00000091,0x0000008d,0x00060039,0x00000009,0x00000092,0x0000000e,0x0000008e,
|
||||
0x00000091,0x0003003e,0x0000007c,0x00000092,0x0004003d,0x00000009,0x00000094,0x0000007c,
|
||||
0x0007004f,0x00000025,0x00000095,0x00000094,0x00000094,0x00000000,0x00000001,0x00050041,
|
||||
0x0000001a,0x00000096,0x0000007c,0x00000043,0x0004003d,0x00000006,0x00000097,0x00000096,
|
||||
0x0004007f,0x00000006,0x00000098,0x00000097,0x00050050,0x00000025,0x00000099,0x00000098,
|
||||
0x00000098,0x00050088,0x00000025,0x0000009a,0x00000095,0x00000099,0x00050041,0x00000059,
|
||||
0x0000009c,0x00000041,0x0000009b,0x0004003d,0x00000007,0x0000009d,0x0000009c,0x0007004f,
|
||||
0x00000025,0x0000009e,0x0000009d,0x0000009d,0x00000000,0x00000002,0x00050083,0x00000025,
|
||||
0x0000009f,0x0000009a,0x0000009e,0x00050041,0x00000059,0x000000a0,0x00000041,0x0000009b,
|
||||
0x0004003d,0x00000007,0x000000a1,0x000000a0,0x0007004f,0x00000025,0x000000a2,0x000000a1,
|
||||
0x000000a1,0x00000001,0x00000003,0x00050041,0x00000059,0x000000a3,0x00000041,0x0000009b,
|
||||
0x0004003d,0x00000007,0x000000a4,0x000000a3,0x0007004f,0x00000025,0x000000a5,0x000000a4,
|
||||
0x000000a4,0x00000000,0x00000002,0x00050083,0x00000025,0x000000a6,0x000000a2,0x000000a5,
|
||||
0x00050088,0x00000025,0x000000a7,0x0000009f,0x000000a6,0x0003003e,0x00000093,0x000000a7,
|
||||
0x00050041,0x0000001a,0x000000a8,0x00000093,0x0000004e,0x0004003d,0x00000006,0x000000a9,
|
||||
0x000000a8,0x00050083,0x00000006,0x000000aa,0x0000004d,0x000000a9,0x00050041,0x0000001a,
|
||||
0x000000ab,0x00000093,0x0000004e,0x0003003e,0x000000ab,0x000000aa,0x0003003e,0x000000ac,
|
||||
0x000000ad,0x00050041,0x0000001a,0x000000ae,0x0000007c,0x00000043,0x0004003d,0x00000006,
|
||||
0x000000af,0x000000ae,0x000500b8,0x00000048,0x000000b0,0x000000af,0x00000047,0x000300f7,
|
||||
0x000000b2,0x00000000,0x000400fa,0x000000b0,0x000000b1,0x000000b2,0x000200f8,0x000000b1,
|
||||
0x0004003d,0x00000025,0x000000b3,0x00000093,0x000500be,0x000000b5,0x000000b6,0x000000b3,
|
||||
0x000000b4,0x0004009b,0x00000048,0x000000b7,0x000000b6,0x000200f9,0x000000b2,0x000200f8,
|
||||
0x000000b2,0x000700f5,0x00000048,0x000000b8,0x000000b0,0x0000004c,0x000000b7,0x000000b1,
|
||||
0x000300f7,0x000000ba,0x00000000,0x000400fa,0x000000b8,0x000000b9,0x000000ba,0x000200f8,
|
||||
0x000000b9,0x0004003d,0x00000025,0x000000bb,0x00000093,0x000500bc,0x000000b5,0x000000bd,
|
||||
0x000000bb,0x000000bc,0x0004009b,0x00000048,0x000000be,0x000000bd,0x000200f9,0x000000ba,
|
||||
0x000200f8,0x000000ba,0x000700f5,0x00000048,0x000000bf,0x000000b8,0x000000b2,0x000000be,
|
||||
0x000000b9,0x000300f7,0x000000c1,0x00000000,0x000400fa,0x000000bf,0x000000c0,0x000000c1,
|
||||
0x000200f8,0x000000c0,0x0004003d,0x000000c4,0x000000c7,0x000000c6,0x00040064,0x000000c3,
|
||||
0x000000c8,0x000000c7,0x00050067,0x00000033,0x000000c9,0x000000c8,0x0000002f,0x0004006f,
|
||||
0x00000025,0x000000ca,0x000000c9,0x00050050,0x00000025,0x000000cb,0x00000028,0x00000028,
|
||||
0x00050088,0x00000025,0x000000cc,0x000000cb,0x000000ca,0x0003003e,0x000000c2,0x000000cc,
|
||||
0x00060041,0x00000044,0x000000ce,0x00000041,0x00000075,0x0000003b,0x0004003d,0x00000006,
|
||||
0x000000cf,0x000000ce,0x00050085,0x00000006,0x000000d0,0x000000cf,0x00000028,0x00070050,
|
||||
0x00000007,0x000000d1,0x000000d0,0x00000047,0x00000028,0x0000004d,0x0003003e,0x000000cd,
|
||||
0x000000d1,0x0004003d,0x00000007,0x000000d3,0x000000cd,0x0007004f,0x00000025,0x000000d4,
|
||||
0x000000d3,0x000000d3,0x00000000,0x00000001,0x0004003d,0x00000025,0x000000d5,0x00000093,
|
||||
0x0004003d,0x00000007,0x000000d6,0x000000cd,0x0007004f,0x00000025,0x000000d7,0x000000d6,
|
||||
0x000000d6,0x00000002,0x00000003,0x00050085,0x00000025,0x000000d8,0x000000d5,0x000000d7,
|
||||
0x00050081,0x00000025,0x000000d9,0x000000d4,0x000000d8,0x0004003d,0x00000007,0x000000da,
|
||||
0x000000cd,0x0007004f,0x00000025,0x000000db,0x000000da,0x000000da,0x00000000,0x00000001,
|
||||
0x0004003d,0x00000025,0x000000dc,0x000000c2,0x00050081,0x00000025,0x000000dd,0x000000db,
|
||||
0x000000dc,0x0004003d,0x00000007,0x000000de,0x000000cd,0x0007004f,0x00000025,0x000000df,
|
||||
0x000000de,0x000000de,0x00000000,0x00000001,0x0004003d,0x00000007,0x000000e0,0x000000cd,
|
||||
0x0007004f,0x00000025,0x000000e1,0x000000e0,0x000000e0,0x00000002,0x00000003,0x00050081,
|
||||
0x00000025,0x000000e2,0x000000df,0x000000e1,0x0004003d,0x00000025,0x000000e3,0x000000c2,
|
||||
0x00050083,0x00000025,0x000000e4,0x000000e2,0x000000e3,0x0008000c,0x00000025,0x000000e5,
|
||||
0x00000001,0x0000002b,0x000000d9,0x000000dd,0x000000e4,0x0003003e,0x000000d2,0x000000e5,
|
||||
0x0004003d,0x000000c4,0x000000e6,0x000000c6,0x0004003d,0x00000025,0x000000e7,0x000000d2,
|
||||
0x00070058,0x00000007,0x000000e8,0x000000e6,0x000000e7,0x00000002,0x00000047,0x0003003e,
|
||||
0x000000ac,0x000000e8,0x000200f9,0x000000c1,0x000200f8,0x000000c1,0x00060041,0x00000044,
|
||||
0x000000ea,0x00000041,0x00000075,0x00000043,0x0004003d,0x00000006,0x000000eb,0x000000ea,
|
||||
0x000500ba,0x00000048,0x000000ec,0x000000eb,0x00000047,0x000300f7,0x000000ef,0x00000000,
|
||||
0x000400fa,0x000000ec,0x000000ee,0x000000f2,0x000200f8,0x000000ee,0x00050041,0x0000001a,
|
||||
0x000000f0,0x000000ac,0x00000019,0x0004003d,0x00000006,0x000000f1,0x000000f0,0x0003003e,
|
||||
0x000000ed,0x000000f1,0x000200f9,0x000000ef,0x000200f8,0x000000f2,0x0003003e,0x000000ed,
|
||||
0x0000004d,0x000200f9,0x000000ef,0x000200f8,0x000000ef,0x0004003d,0x00000006,0x000000f3,
|
||||
0x000000ed,0x0003003e,0x000000e9,0x000000f3,0x00060041,0x00000044,0x000000f5,0x00000041,
|
||||
0x00000075,0x00000019,0x0004003d,0x00000006,0x000000f6,0x000000f5,0x000500ba,0x00000048,
|
||||
0x000000f7,0x000000f6,0x00000047,0x000300f7,0x000000fa,0x00000000,0x000400fa,0x000000f7,
|
||||
0x000000f9,0x000000ff,0x000200f8,0x000000f9,0x0004003d,0x00000007,0x000000fb,0x000000ac,
|
||||
0x0008004f,0x00000009,0x000000fc,0x000000fb,0x000000fb,0x00000000,0x00000001,0x00000002,
|
||||
0x0004003d,0x00000006,0x000000fd,0x000000e9,0x0005008e,0x00000009,0x000000fe,0x000000fc,
|
||||
0x000000fd,0x0003003e,0x000000f8,0x000000fe,0x000200f9,0x000000fa,0x000200f8,0x000000ff,
|
||||
0x0004003d,0x00000007,0x00000100,0x000000ac,0x0008004f,0x00000009,0x00000101,0x00000100,
|
||||
0x00000100,0x00000000,0x00000001,0x00000002,0x0003003e,0x000000f8,0x00000101,0x000200f9,
|
||||
0x000000fa,0x000200f8,0x000000fa,0x0004003d,0x00000009,0x00000102,0x000000f8,0x0003003e,
|
||||
0x000000f4,0x00000102,0x00060041,0x00000044,0x00000104,0x00000041,0x00000042,0x0000003b,
|
||||
0x0004003d,0x00000006,0x00000105,0x00000104,0x000500ba,0x00000048,0x00000106,0x00000105,
|
||||
0x00000047,0x000300f7,0x00000109,0x00000000,0x000400fa,0x00000106,0x00000108,0x0000010c,
|
||||
0x000200f8,0x00000108,0x00050041,0x0000001a,0x0000010a,0x00000072,0x00000019,0x0004003d,
|
||||
0x00000006,0x0000010b,0x0000010a,0x0003003e,0x00000107,0x0000010b,0x000200f9,0x00000109,
|
||||
0x000200f8,0x0000010c,0x0003003e,0x00000107,0x0000004d,0x000200f9,0x00000109,0x000200f8,
|
||||
0x00000109,0x0004003d,0x00000006,0x0000010d,0x00000107,0x0003003e,0x00000103,0x0000010d,
|
||||
0x00060041,0x00000044,0x0000010f,0x00000041,0x00000042,0x0000004e,0x0004003d,0x00000006,
|
||||
0x00000110,0x0000010f,0x000500ba,0x00000048,0x00000111,0x00000110,0x00000047,0x000300f7,
|
||||
0x00000114,0x00000000,0x000400fa,0x00000111,0x00000113,0x00000119,0x000200f8,0x00000113,
|
||||
0x0004003d,0x00000007,0x00000115,0x00000072,0x0008004f,0x00000009,0x00000116,0x00000115,
|
||||
0x00000115,0x00000000,0x00000001,0x00000002,0x0004003d,0x00000006,0x00000117,0x00000103,
|
||||
0x0005008e,0x00000009,0x00000118,0x00000116,0x00000117,0x0003003e,0x00000112,0x00000118,
|
||||
0x000200f9,0x00000114,0x000200f8,0x00000119,0x0004003d,0x00000007,0x0000011a,0x00000072,
|
||||
0x0008004f,0x00000009,0x0000011b,0x0000011a,0x0000011a,0x00000000,0x00000001,0x00000002,
|
||||
0x0003003e,0x00000112,0x0000011b,0x000200f9,0x00000114,0x000200f8,0x00000114,0x0004003d,
|
||||
0x00000009,0x0000011c,0x00000112,0x0003003e,0x0000010e,0x0000011c,0x0004003d,0x00000006,
|
||||
0x0000011e,0x00000103,0x000500ba,0x00000048,0x0000011f,0x0000011e,0x00000047,0x000300f7,
|
||||
0x00000122,0x00000000,0x000400fa,0x0000011f,0x00000121,0x00000127,0x000200f8,0x00000121,
|
||||
0x0004003d,0x00000009,0x00000123,0x0000010e,0x0004003d,0x00000006,0x00000124,0x00000103,
|
||||
0x00060050,0x00000009,0x00000125,0x00000124,0x00000124,0x00000124,0x00050088,0x00000009,
|
||||
0x00000126,0x00000123,0x00000125,0x0003003e,0x00000120,0x00000126,0x000200f9,0x00000122,
|
||||
0x000200f8,0x00000127,0x0003003e,0x00000120,0x00000128,0x000200f9,0x00000122,0x000200f8,
|
||||
0x00000122,0x0004003d,0x00000009,0x00000129,0x00000120,0x0004003d,0x00000006,0x0000012a,
|
||||
0x00000103,0x00050051,0x00000006,0x0000012b,0x00000129,0x00000000,0x00050051,0x00000006,
|
||||
0x0000012c,0x00000129,0x00000001,0x00050051,0x00000006,0x0000012d,0x00000129,0x00000002,
|
||||
0x00070050,0x00000007,0x0000012e,0x0000012b,0x0000012c,0x0000012d,0x0000012a,0x0003003e,
|
||||
0x0000011d,0x0000012e,0x0004003d,0x00000007,0x0000012f,0x0000011d,0x00050041,0x00000059,
|
||||
0x00000131,0x00000041,0x00000130,0x0004003d,0x00000007,0x00000132,0x00000131,0x0007000c,
|
||||
0x00000007,0x00000133,0x00000001,0x00000028,0x00000132,0x000000ad,0x00050085,0x00000007,
|
||||
0x00000134,0x0000012f,0x00000133,0x00050041,0x00000059,0x00000136,0x00000041,0x00000135,
|
||||
0x0004003d,0x00000007,0x00000137,0x00000136,0x00050081,0x00000007,0x00000138,0x00000134,
|
||||
0x00000137,0x0003003e,0x0000011d,0x00000138,0x00050041,0x0000001a,0x00000139,0x0000011d,
|
||||
0x00000019,0x0004003d,0x00000006,0x0000013a,0x00000139,0x0003003e,0x00000103,0x0000013a,
|
||||
0x0004003d,0x00000007,0x0000013b,0x0000011d,0x0008004f,0x00000009,0x0000013c,0x0000013b,
|
||||
0x0000013b,0x00000000,0x00000001,0x00000002,0x0004003d,0x00000006,0x0000013d,0x00000103,
|
||||
0x0005008e,0x00000009,0x0000013e,0x0000013c,0x0000013d,0x0003003e,0x0000010e,0x0000013e,
|
||||
0x0004003d,0x00000009,0x00000140,0x000000f4,0x0004003d,0x00000009,0x00000141,0x0000010e,
|
||||
0x0004003d,0x00000006,0x00000142,0x000000e9,0x00050083,0x00000006,0x00000143,0x0000004d,
|
||||
0x00000142,0x0005008e,0x00000009,0x00000144,0x00000141,0x00000143,0x00050081,0x00000009,
|
||||
0x00000145,0x00000140,0x00000144,0x0004003d,0x00000006,0x00000146,0x000000e9,0x0004003d,
|
||||
0x00000006,0x00000147,0x00000103,0x0004003d,0x00000006,0x00000148,0x000000e9,0x00050083,
|
||||
0x00000006,0x00000149,0x0000004d,0x00000148,0x00050085,0x00000006,0x0000014a,0x00000147,
|
||||
0x00000149,0x00050081,0x00000006,0x0000014b,0x00000146,0x0000014a,0x00050051,0x00000006,
|
||||
0x0000014c,0x00000145,0x00000000,0x00050051,0x00000006,0x0000014d,0x00000145,0x00000001,
|
||||
0x00050051,0x00000006,0x0000014e,0x00000145,0x00000002,0x00070050,0x00000007,0x0000014f,
|
||||
0x0000014c,0x0000014d,0x0000014e,0x0000014b,0x0003003e,0x0000013f,0x0000014f,0x0004003d,
|
||||
0x00000007,0x00000152,0x0000013f,0x0003003e,0x00000151,0x00000152,0x000100fd,0x00010038,
|
||||
0x00050036,0x00000009,0x0000000e,0x00000000,0x0000000b,0x00030037,0x00000008,0x0000000c,
|
||||
0x00030037,0x0000000a,0x0000000d,0x000200f8,0x0000000f,0x0004003d,0x00000009,0x00000010,
|
||||
0x0000000d,0x0004003d,0x00000007,0x00000012,0x0000000c,0x0008004f,0x00000009,0x00000013,
|
||||
0x00000012,0x00000012,0x00000000,0x00000001,0x00000002,0x0004003d,0x00000007,0x00000014,
|
||||
0x0000000c,0x0008004f,0x00000009,0x00000015,0x00000014,0x00000014,0x00000000,0x00000001,
|
||||
0x00000002,0x0004003d,0x00000009,0x00000016,0x0000000d,0x0007000c,0x00000009,0x00000017,
|
||||
0x00000001,0x00000044,0x00000015,0x00000016,0x00050041,0x0000001a,0x0000001b,0x0000000c,
|
||||
0x00000019,0x0004003d,0x00000006,0x0000001c,0x0000001b,0x0004003d,0x00000009,0x0000001d,
|
||||
0x0000000d,0x0005008e,0x00000009,0x0000001e,0x0000001d,0x0000001c,0x00050081,0x00000009,
|
||||
0x0000001f,0x00000017,0x0000001e,0x0007000c,0x00000009,0x00000020,0x00000001,0x00000044,
|
||||
0x00000013,0x0000001f,0x0005008e,0x00000009,0x00000021,0x00000020,0x00000011,0x00050081,
|
||||
0x00000009,0x00000022,0x00000010,0x00000021,0x000200fe,0x00000022,0x00010038,
|
||||
};
|
||||
@@ -0,0 +1,331 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Decoder -> AImageReader -> fused GLES YUV conversion/projection -> shared RGBA
|
||||
// eye views -> Vulkan copy to the runtime. The original decoded image is not
|
||||
// downscaled or converted into a full-size intermediate. No picture readback or
|
||||
// CPU colour conversion; no YCbCr feature forced onto the application's device.
|
||||
// Published buffers are retained until the Vulkan fence completes. The full
|
||||
// panorama import path remains available to the independent reference fixture.
|
||||
static struct {
|
||||
media_status_t (*reader_new)(int32_t,int32_t,int32_t,uint64_t,int32_t,AImageReader**);
|
||||
media_status_t (*reader_window)(AImageReader*,ANativeWindow**);
|
||||
media_status_t (*reader_latest)(AImageReader*,AImage**);
|
||||
media_status_t (*reader_next)(AImageReader*,AImage**);
|
||||
media_status_t (*image_time)(const AImage*,int64_t*);
|
||||
void (*reader_delete)(AImageReader*);
|
||||
media_status_t (*image_buffer)(const AImage*,AHardwareBuffer**);
|
||||
void (*image_delete)(AImage*);
|
||||
int (*allocate)(const AHardwareBuffer_Desc*,AHardwareBuffer**);
|
||||
void (*describe)(const AHardwareBuffer*,AHardwareBuffer_Desc*);
|
||||
void (*release)(AHardwareBuffer*);
|
||||
jobject (*to_surface)(JNIEnv*,ANativeWindow*);
|
||||
PFNEGLGETNATIVECLIENTBUFFERANDROIDPROC client;
|
||||
PFNEGLCREATEIMAGEKHRPROC create;
|
||||
PFNEGLDESTROYIMAGEKHRPROC destroy;
|
||||
PFNGLEGLIMAGETARGETTEXTURE2DOESPROC bind;
|
||||
void (*finish)(void);
|
||||
PFN_vkGetAndroidHardwareBufferPropertiesANDROID properties;
|
||||
PFN_vkCreateImage create_image;
|
||||
PFN_vkDestroyImage destroy_image;
|
||||
PFN_vkAllocateMemory allocate_memory;
|
||||
PFN_vkFreeMemory free_memory;
|
||||
PFN_vkBindImageMemory bind_memory;
|
||||
PFN_vkCreateImageView create_view;
|
||||
PFN_vkDestroyImageView destroy_view;
|
||||
} sn;
|
||||
static int surf_native_load(void) {
|
||||
if(!vk.GetDeviceProcAddr)return 0;
|
||||
sn.properties=(PFN_vkGetAndroidHardwareBufferPropertiesANDROID)vk.GetDeviceProcAddr(vk.device,
|
||||
"vkGetAndroidHardwareBufferPropertiesANDROID");
|
||||
if(!sn.properties){LOG("surface_native: external-memory device extension unavailable");return 0;}
|
||||
void *media=dlopen("libmediandk.so",RTLD_NOW|RTLD_LOCAL);
|
||||
void *window=dlopen("libnativewindow.so",RTLD_NOW|RTLD_LOCAL);
|
||||
void *gles=dlopen("libGLESv3.so",RTLD_NOW|RTLD_LOCAL);
|
||||
if(!media || !window || !gles){LOG("surface_native: missing platform library: %s",dlerror());return 0;}
|
||||
#define SN_SYM(field,lib,name) *(void**)&sn.field=dlsym(lib,name);if(!sn.field){LOG("surface_native: missing %s",name);return 0;}
|
||||
SN_SYM(reader_new,media,"AImageReader_newWithUsage")
|
||||
SN_SYM(reader_window,media,"AImageReader_getWindow")
|
||||
SN_SYM(reader_latest,media,"AImageReader_acquireLatestImage")
|
||||
SN_SYM(reader_next,media,"AImageReader_acquireNextImage")
|
||||
SN_SYM(image_time,media,"AImage_getTimestamp")
|
||||
SN_SYM(reader_delete,media,"AImageReader_delete")
|
||||
SN_SYM(image_buffer,media,"AImage_getHardwareBuffer") SN_SYM(image_delete,media,"AImage_delete")
|
||||
SN_SYM(allocate,window,"AHardwareBuffer_allocate") SN_SYM(describe,window,"AHardwareBuffer_describe")
|
||||
SN_SYM(release,window,"AHardwareBuffer_release")
|
||||
#ifndef SURF_NATIVE_ALLOCATOR_TEST
|
||||
// A native GPU fixture has no Java VM; only the application needs this bridge.
|
||||
void *android=dlopen("libandroid.so",RTLD_NOW|RTLD_LOCAL);
|
||||
if(!android)return 0;
|
||||
SN_SYM(to_surface,android,"ANativeWindow_toSurface")
|
||||
#endif
|
||||
SN_SYM(finish,gles,"glFinish")
|
||||
#undef SN_SYM
|
||||
#define SN_VK(field,name) sn.field=(PFN_vk##name)vk.GetDeviceProcAddr(vk.device,"vk" #name);if(!sn.field)return 0;
|
||||
SN_VK(create_image,CreateImage) SN_VK(destroy_image,DestroyImage) SN_VK(allocate_memory,AllocateMemory)
|
||||
SN_VK(free_memory,FreeMemory) SN_VK(bind_memory,BindImageMemory)
|
||||
SN_VK(create_view,CreateImageView) SN_VK(destroy_view,DestroyImageView)
|
||||
#undef SN_VK
|
||||
void *egl=dlopen("libEGL.so",RTLD_NOW|RTLD_LOCAL);
|
||||
__eglMustCastToProperFunctionPointerType (*get)(const char*)=egl?
|
||||
(__eglMustCastToProperFunctionPointerType (*)(const char*))dlsym(egl,"eglGetProcAddress"):NULL;
|
||||
if(!get)return 0;
|
||||
sn.client=(PFNEGLGETNATIVECLIENTBUFFERANDROIDPROC)get("eglGetNativeClientBufferANDROID");
|
||||
sn.create=(PFNEGLCREATEIMAGEKHRPROC)get("eglCreateImageKHR");
|
||||
sn.destroy=(PFNEGLDESTROYIMAGEKHRPROC)get("eglDestroyImageKHR");
|
||||
sn.bind=(PFNGLEGLIMAGETARGETTEXTURE2DOESPROC)get("glEGLImageTargetTexture2DOES");
|
||||
return sn.client && sn.create && sn.destroy && sn.bind;
|
||||
}
|
||||
static void surf_native_slot_destroy(surf_native_slot *slot) {
|
||||
if(slot->view)sn.destroy_view(vk.device,slot->view,NULL);
|
||||
if(slot->image)sn.destroy_image(vk.device,slot->image,NULL);
|
||||
if(slot->memory)sn.free_memory(vk.device,slot->memory,NULL);
|
||||
if(slot->buffer)sn.release(slot->buffer);
|
||||
slot->view=VK_NULL_HANDLE;slot->image=VK_NULL_HANDLE;slot->memory=VK_NULL_HANDLE;slot->buffer=NULL;
|
||||
}
|
||||
static int surf_native_allocate(surf_native_slot *slot,EGLDisplay display,uint32_t width,uint32_t height) {
|
||||
AHardwareBuffer_Desc desc={.width=width,.height=height,.layers=1,
|
||||
.format=AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM,
|
||||
.usage=AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE|AHARDWAREBUFFER_USAGE_GPU_COLOR_OUTPUT};
|
||||
if(sn.allocate(&desc,&slot->buffer))return 0;
|
||||
VkAndroidHardwareBufferFormatPropertiesANDROID format={VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID};
|
||||
VkAndroidHardwareBufferPropertiesANDROID props={VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID,&format};
|
||||
if(sn.properties(vk.device,slot->buffer,&props)!=VK_SUCCESS || format.format!=VK_FORMAT_R8G8B8A8_UNORM)goto fail;
|
||||
VkExternalMemoryImageCreateInfo external={VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO,NULL,
|
||||
VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID};
|
||||
VkImageCreateInfo image={VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO,&external,0,VK_IMAGE_TYPE_2D,format.format,
|
||||
{width,height,1},1,1,VK_SAMPLE_COUNT_1_BIT,VK_IMAGE_TILING_OPTIMAL,
|
||||
VK_IMAGE_USAGE_SAMPLED_BIT|VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT|VK_IMAGE_USAGE_TRANSFER_SRC_BIT,
|
||||
VK_SHARING_MODE_EXCLUSIVE,0,NULL,VK_IMAGE_LAYOUT_UNDEFINED};
|
||||
if(sn.create_image(vk.device,&image,NULL,&slot->image)!=VK_SUCCESS)goto fail;
|
||||
uint32_t type=0;while(type<32 && !(props.memoryTypeBits&(1u<<type)))type++;
|
||||
if(type==32)goto fail;
|
||||
VkImportAndroidHardwareBufferInfoANDROID imported={VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID,NULL,slot->buffer};
|
||||
VkMemoryDedicatedAllocateInfo dedicated={VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO,&imported,slot->image,VK_NULL_HANDLE};
|
||||
VkMemoryAllocateInfo alloc={VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,&dedicated,props.allocationSize,type};
|
||||
if(sn.allocate_memory(vk.device,&alloc,NULL,&slot->memory)!=VK_SUCCESS ||
|
||||
sn.bind_memory(vk.device,slot->image,slot->memory,0)!=VK_SUCCESS)goto fail;
|
||||
VkImageViewCreateInfo view={VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,NULL,0,slot->image,VK_IMAGE_VIEW_TYPE_2D,
|
||||
format.format,{0,0,0,0},{VK_IMAGE_ASPECT_COLOR_BIT,0,1,0,1}};
|
||||
if(sn.create_view(vk.device,&view,NULL,&slot->view)!=VK_SUCCESS)goto fail;
|
||||
slot->egl_image=sn.create(display,EGL_NO_CONTEXT,EGL_NATIVE_BUFFER_ANDROID,sn.client(slot->buffer),NULL);
|
||||
if(slot->egl_image==EGL_NO_IMAGE_KHR)goto fail;
|
||||
p_glGenTextures(1,&slot->texture);p_glBindTexture(GL_TEXTURE_2D,slot->texture);
|
||||
sn.bind(GL_TEXTURE_2D,slot->egl_image);
|
||||
slot->width=width;slot->height=height;
|
||||
return p_glGetError()==GL_NO_ERROR;
|
||||
fail:
|
||||
surf_native_slot_destroy(slot);return 0;
|
||||
}
|
||||
// Runs on the surface worker's EGL context. The pose snapshot is published
|
||||
// together with the completed image, so the compositor can timewarp correctly.
|
||||
static void surf_video_draw(GLuint program,const GLint uniforms[8],GLuint external,
|
||||
const surf_video_job *job) {
|
||||
p_glUseProgram(program);p_glActiveTexture(GL_TEXTURE0);p_glBindTexture(GL_TEXTURE_EXTERNAL_OES,external);
|
||||
for(int eye=0;eye<2;eye++){
|
||||
p_glViewport((GLint)(eye*job->size),0,(GLsizei)job->size,(GLsizei)job->size);
|
||||
for(int i=0;i<8;i++){
|
||||
const float *v=job->params[eye]+4*i;
|
||||
p_glUniform4f(uniforms[i],v[0],v[1],v[2],v[3]);
|
||||
}
|
||||
p_glDrawArrays(GL_TRIANGLES,0,3);
|
||||
}
|
||||
}
|
||||
#if !defined(SURF_NATIVE_ALLOCATOR_TEST) || defined(SURF_NATIVE_WORKER_TEST)
|
||||
static void surf_native_worker(surf_swapchain *s,JNIEnv *env,EGLDisplay display) {
|
||||
AImageReader *reader=NULL;ANativeWindow *window=NULL;
|
||||
GLuint program=0,external=0,fbo=0,vao=0;
|
||||
enum {PENDING_IMAGES=4,ACQUIRED_IMAGES=5};
|
||||
AImage *held=NULL,*pending[PENDING_IMAGES]={0};int64_t pending_time[PENDING_IMAGES]={0};int pending_count=0;
|
||||
EGLImageKHR input=EGL_NO_IMAGE_KHR;
|
||||
AHardwareBuffer_Desc desc={0};uint64_t last_job=0;GLint uniforms[8]={0};
|
||||
int64_t source_time=0;
|
||||
surf_video_job rendered_job={0};int video_dirty=0;
|
||||
#ifdef SURF_NATIVE_WORKER_TEST
|
||||
// A native fixture supplies the real reader/codec without a Java VM.
|
||||
(void)env;reader=surf_worker_test_reader;
|
||||
#else
|
||||
if(sn.reader_new((int32_t)s->width,(int32_t)s->height,AIMAGE_FORMAT_PRIVATE,
|
||||
AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE,s->native_project?ACQUIRED_IMAGES:3,&reader)!=AMEDIA_OK ||
|
||||
sn.reader_window(reader,&window)!=AMEDIA_OK)goto fail;
|
||||
jobject local=sn.to_surface(env,window);
|
||||
if(!local || (*env)->ExceptionCheck(env)){(*env)->ExceptionClear(env);goto fail;}
|
||||
s->surface=(*env)->NewGlobalRef(env,local);(*env)->DeleteLocalRef(env,local);
|
||||
if(!s->surface)goto fail;
|
||||
#endif
|
||||
const char *fragment="#version 300 es\n#extension GL_OES_EGL_image_external_essl3 : require\n"
|
||||
"precision highp float;uniform samplerExternalOES tex;in vec2 uv;out vec4 color;"
|
||||
"void main(){color=texture(tex,uv);}";
|
||||
GLuint vertex=emul_compile(GL_VERTEX_SHADER,"",surf_vs),pixel=emul_compile(GL_FRAGMENT_SHADER,"",
|
||||
s->native_project?surf_video_fragment:fragment);
|
||||
if(!vertex || !pixel)goto fail;
|
||||
program=p_glCreateProgram();p_glAttachShader(program,vertex);p_glAttachShader(program,pixel);p_glLinkProgram(program);
|
||||
GLint ok=0;p_glGetProgramiv(program,GL_LINK_STATUS,&ok);if(!ok)goto fail;
|
||||
if(s->native_project)for(int i=0;i<8;i++)uniforms[i]=p_glGetUniformLocation(program,surf_video_uniforms[i]);
|
||||
p_glGenTextures(1,&external);p_glBindTexture(GL_TEXTURE_EXTERNAL_OES,external);
|
||||
s_glTexParameteri(GL_TEXTURE_EXTERNAL_OES,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
|
||||
s_glTexParameteri(GL_TEXTURE_EXTERNAL_OES,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
|
||||
s_glTexParameteri(GL_TEXTURE_EXTERNAL_OES,GL_TEXTURE_WRAP_S,GL_CLAMP_TO_EDGE);
|
||||
s_glTexParameteri(GL_TEXTURE_EXTERNAL_OES,GL_TEXTURE_WRAP_T,GL_CLAMP_TO_EDGE);
|
||||
p_glGenFramebuffers(1,&fbo);p_glGenVertexArrays(1,&vao);
|
||||
pthread_mutex_lock(&surf_lock);s->ready=1;pthread_cond_broadcast(&surf_cond);pthread_mutex_unlock(&surf_lock);
|
||||
LOG("surface_native: shared GPU video surface ready (%s)",s->native_project?"fused visible-view conversion":"full panorama");
|
||||
int64_t start=0,frames=0,views=0,draw_ns=0,reused=0,held_views=0,anchored_views=0,recentred_views=0;
|
||||
while(!s->stop){
|
||||
int index=-1;
|
||||
surf_video_job job;
|
||||
pthread_mutex_lock(&surf_lock);
|
||||
if(s->video_job.seq==last_job && !s->stop){
|
||||
struct timespec until;clock_gettime(CLOCK_REALTIME,&until);until.tv_nsec+=1000000;
|
||||
if(until.tv_nsec>=1000000000){until.tv_sec++;until.tv_nsec-=1000000000;}
|
||||
pthread_cond_timedwait(&surf_cond,&surf_lock,&until);
|
||||
}
|
||||
job=s->video_job;
|
||||
for(int i=0;i<SURF_NATIVE_SLOTS;i++)if(s->native_slots[i].state==0){index=i;s->native_slots[i].state=1;break;}
|
||||
pthread_mutex_unlock(&surf_lock);
|
||||
if(index<0){struct timespec pause={0,250000};nanosleep(&pause,NULL);continue;}
|
||||
surf_native_slot *slot=&s->native_slots[index];
|
||||
AImage *image=NULL;
|
||||
if(s->native_project){
|
||||
// Acquire future pictures promptly: leaving them in a droppable
|
||||
// producer queue loses pictures before their presentation time.
|
||||
// Keep at most four future pictures plus the currently sampled one.
|
||||
int64_t now=monotonic_ns(),target=surf_video_target(now,job.time);
|
||||
while(pending_count && !surf_video_future(pending_time[0],now,target)){
|
||||
if(image)sn.image_delete(image);
|
||||
image=pending[0];pending_count--;
|
||||
memmove(pending,pending+1,pending_count*sizeof(*pending));
|
||||
memmove(pending_time,pending_time+1,pending_count*sizeof(*pending_time));
|
||||
}
|
||||
while(pending_count<PENDING_IMAGES && pending_count+(held!=NULL)+(image!=NULL)<ACQUIRED_IMAGES){
|
||||
AImage *next=NULL;if(sn.reader_next(reader,&next)!=AMEDIA_OK)break;
|
||||
int64_t timestamp=0;sn.image_time(next,×tamp);
|
||||
if(surf_video_future(timestamp,now,target)){
|
||||
pending[pending_count]=next;pending_time[pending_count++]=timestamp;
|
||||
}else{
|
||||
if(image)sn.image_delete(image);image=next;
|
||||
}
|
||||
}
|
||||
}else sn.reader_latest(reader,&image);
|
||||
int new_image=image!=NULL;
|
||||
if(new_image){
|
||||
// Keep the decoder image acquired while GLES might sample it again
|
||||
// for head movement. Releasing it sooner lets the decoder overwrite it.
|
||||
if(input!=EGL_NO_IMAGE_KHR)sn.destroy(display,input);
|
||||
if(held)sn.image_delete(held);
|
||||
held=image;input=EGL_NO_IMAGE_KHR;
|
||||
sn.image_time(held,&source_time);
|
||||
AHardwareBuffer *buffer=NULL;
|
||||
int valid=sn.image_buffer(held,&buffer)==AMEDIA_OK;
|
||||
if(valid)sn.describe(buffer,&desc);
|
||||
if(!valid || !desc.width || !desc.height || desc.width>8192 || desc.height>8192)goto fail;
|
||||
input=sn.create(display,EGL_NO_CONTEXT,EGL_NATIVE_BUFFER_ANDROID,sn.client(buffer),NULL);
|
||||
if(input==EGL_NO_IMAGE_KHR)goto fail;
|
||||
p_glActiveTexture(GL_TEXTURE0);p_glBindTexture(GL_TEXTURE_EXTERNAL_OES,external);sn.bind(GL_TEXTURE_EXTERNAL_OES,input);
|
||||
frames++;video_dirty=1;
|
||||
}
|
||||
// Importing/acquiring a decoder buffer can take time. Pick the newest
|
||||
// request immediately before drawing instead of keeping the earlier pose.
|
||||
pthread_mutex_lock(&surf_lock);job=s->video_job;pthread_mutex_unlock(&surf_lock);
|
||||
// Coalesce video arrivals into the next application view request. Drawing
|
||||
// on both clocks would do up to video-fps + headset-fps work per second.
|
||||
if(!held || (s->native_project?(!job.size || job.seq==last_job):!new_image)){
|
||||
pthread_mutex_lock(&surf_lock);slot->state=0;pthread_mutex_unlock(&surf_lock);continue;
|
||||
}
|
||||
if(s->native_project && !video_dirty && surf_video_covers(&rendered_job,&job)){
|
||||
last_job=job.seq;reused++;
|
||||
pthread_mutex_lock(&surf_lock);slot->state=0;pthread_mutex_unlock(&surf_lock);continue;
|
||||
}
|
||||
uint32_t width=s->native_project?2*job.size:desc.width,height=s->native_project?job.size:desc.height;
|
||||
if(!slot->buffer || slot->width!=width || slot->height!=height){
|
||||
if(slot->texture)p_glDeleteTextures(1,&slot->texture);
|
||||
if(slot->egl_image)sn.destroy(display,slot->egl_image);
|
||||
slot->texture=0;slot->egl_image=EGL_NO_IMAGE_KHR;surf_native_slot_destroy(slot);
|
||||
if(!surf_native_allocate(slot,display,width,height))goto fail;
|
||||
LOG("surface_native: %ux%u decoded input -> %ux%u shared view",desc.width,desc.height,width,height);
|
||||
}
|
||||
p_glBindFramebuffer(GL_FRAMEBUFFER,fbo);
|
||||
p_glFramebufferTexture2D(GL_FRAMEBUFFER,GL_COLOR_ATTACHMENT0,GL_TEXTURE_2D,slot->texture,0);
|
||||
if(p_glCheckFramebufferStatus(GL_FRAMEBUFFER)!=GL_FRAMEBUFFER_COMPLETE)goto fail;
|
||||
p_glUseProgram(program);p_glUniform1i(p_glGetUniformLocation(program,"tex"),0);p_glBindVertexArray(vao);
|
||||
int64_t draw_start=monotonic_ns();
|
||||
surf_video_job draw=job;
|
||||
if(s->native_project){
|
||||
if(surf_video_anchor(&rendered_job,&job,&draw))anchored_views++;
|
||||
else recentred_views++;
|
||||
surf_video_draw(program,uniforms,external,&draw);
|
||||
}
|
||||
else {p_glViewport(0,0,(GLsizei)width,(GLsizei)height);p_glDrawArrays(GL_TRIANGLES,0,3);}
|
||||
sn.finish(); // external writes completed before the Vulkan ownership acquire
|
||||
if(!video_dirty)held_views++;
|
||||
draw_ns+=monotonic_ns()-draw_start;views++;last_job=job.seq;rendered_job=draw;video_dirty=0;
|
||||
GLenum error=p_glGetError();
|
||||
if(error)goto fail;
|
||||
pthread_mutex_lock(&surf_lock);
|
||||
for(int i=0;i<SURF_NATIVE_SLOTS;i++)if(s->native_slots[i].state==2)s->native_slots[i].state=0;
|
||||
slot->video=draw;slot->projected=s->native_project;slot->source_width=desc.width;slot->source_height=desc.height;
|
||||
slot->source_time=source_time;
|
||||
slot->seq=++s->seq;slot->state=2;s->frames++;
|
||||
pthread_mutex_unlock(&surf_lock);
|
||||
int64_t now=monotonic_ns();if(!start)start=now;
|
||||
if(now-start>5000000000ll){LOG("surface_native: %.1f video frames/s, %.1f views/s, visible-view GPU wait %.2f ms, no picture readback",
|
||||
frames*1e9/(now-start),views*1e9/(now-start),views?draw_ns/1e6/views:0);
|
||||
if(s->native_project)LOG("surface_native: held-picture redraws=%lld, compositor reuse=%lld, panorama radius=%.3f",
|
||||
(long long)held_views,(long long)reused,job.params[0][7]);
|
||||
if(s->native_project)LOG("surface_native: fixed sampling grid=%lld views, recentered=%lld views",
|
||||
(long long)anchored_views,(long long)recentred_views);
|
||||
frames=views=draw_ns=reused=held_views=anchored_views=recentred_views=0;start=now;}
|
||||
}
|
||||
goto done;
|
||||
fail:
|
||||
surf_fail(s,"shared GPU video initialization/delivery failed");
|
||||
done:
|
||||
sn.finish();
|
||||
if(input!=EGL_NO_IMAGE_KHR)sn.destroy(display,input);
|
||||
if(held)sn.image_delete(held);
|
||||
for(int i=0;i<pending_count;i++)sn.image_delete(pending[i]);
|
||||
for(int i=0;i<SURF_NATIVE_SLOTS;i++){
|
||||
surf_native_slot *slot=&s->native_slots[i];
|
||||
if(slot->texture)p_glDeleteTextures(1,&slot->texture);
|
||||
if(slot->egl_image)sn.destroy(display,slot->egl_image);
|
||||
slot->texture=0;slot->egl_image=EGL_NO_IMAGE_KHR;
|
||||
}
|
||||
if(external)p_glDeleteTextures(1,&external);if(fbo)p_glDeleteFramebuffers(1,&fbo);
|
||||
if(reader)sn.reader_delete(reader);
|
||||
}
|
||||
#endif
|
||||
static void surf_native_complete(surf_swapchain *s) {
|
||||
pthread_mutex_lock(&surf_lock);
|
||||
if(s->native_pending>=0)s->native_slots[s->native_pending].state=0;
|
||||
s->native_pending=-1;pthread_mutex_unlock(&surf_lock);
|
||||
}
|
||||
static void surf_native_ownership(VkCommandBuffer command,surf_native_slot *slot,int acquire) {
|
||||
VkAccessFlags access=slot->projected?VK_ACCESS_TRANSFER_READ_BIT:VK_ACCESS_SHADER_READ_BIT;
|
||||
VkImageLayout layout=slot->projected?VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL:VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
|
||||
VkImageMemoryBarrier barrier={VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER,NULL,
|
||||
acquire?0:access,acquire?access:0,
|
||||
acquire?VK_IMAGE_LAYOUT_GENERAL:layout,
|
||||
acquire?layout:VK_IMAGE_LAYOUT_GENERAL,
|
||||
acquire?VK_QUEUE_FAMILY_FOREIGN_EXT:vk.family,acquire?vk.family:VK_QUEUE_FAMILY_FOREIGN_EXT,
|
||||
slot->image,{VK_IMAGE_ASPECT_COLOR_BIT,0,1,0,1}};
|
||||
vk.CmdPipelineBarrier(command,VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
|
||||
0,0,NULL,0,NULL,1,&barrier);
|
||||
}
|
||||
static void surf_native_retire(surf_swapchain *s) {
|
||||
if(!s->native_mode || s->native_current<0)return;
|
||||
// Teardown is the only blocking handoff. The worker is stopped before a
|
||||
// swapchain is destroyed, so it cannot rewrite an image being retired.
|
||||
VkCommandBufferBeginInfo begin={VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO,NULL,
|
||||
VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT,NULL};
|
||||
vk.ResetCommandBuffer(s->cmd,0);vk.BeginCommandBuffer(s->cmd,&begin);
|
||||
surf_native_ownership(s->cmd,&s->native_slots[s->native_current],0);
|
||||
vk.EndCommandBuffer(s->cmd);
|
||||
VkSubmitInfo submit={VK_STRUCTURE_TYPE_SUBMIT_INFO,NULL,0,NULL,NULL,1,&s->cmd,0,NULL};
|
||||
if(vk.QueueSubmit(vk.queue,1,&submit,s->fence)==VK_SUCCESS){
|
||||
vk.WaitForFences(vk.device,1,&s->fence,VK_TRUE,UINT64_MAX);vk.ResetFences(vk.device,1,&s->fence);
|
||||
}
|
||||
pthread_mutex_lock(&surf_lock);s->native_slots[s->native_current].state=0;
|
||||
s->native_current=-1;pthread_mutex_unlock(&surf_lock);
|
||||
}
|
||||
static void surf_native_destroy(surf_swapchain *s) {
|
||||
if(!s->native_mode)return;
|
||||
for(int i=0;i<SURF_NATIVE_SLOTS;i++)surf_native_slot_destroy(&s->native_slots[i]);
|
||||
}
|
||||
@@ -0,0 +1,511 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Vulkan presentation for equirectangular Android video surfaces. The decoder's
|
||||
// native GPU path projects directly from YUV on the surface worker, then copies
|
||||
// the finished stereo view into a runtime swapchain. CPU-delivered/reference
|
||||
// panoramas use a compute shader. No unsupported equirect layer reaches runtime.
|
||||
#include "surface_projection_spv.h"
|
||||
typedef struct {
|
||||
XrSwapchain output;
|
||||
VkImage images[MAX_IMAGES], source, rendered, video_cache;
|
||||
VkImageView rendered_view, source_view, video_cache_view;
|
||||
VkDeviceMemory memory, rendered_memory, video_cache_memory;
|
||||
VkSampler sampler;
|
||||
VkDescriptorPool descriptors;
|
||||
VkDescriptorSetLayout set_layout;
|
||||
VkDescriptorSet set;
|
||||
VkPipelineLayout layout;
|
||||
VkPipeline pipeline;
|
||||
uint32_t count, size, width, height, acquired_index;
|
||||
int acquired;
|
||||
XrTime presented_time;
|
||||
XrTime tracking_log_time;
|
||||
uint64_t source_seq;
|
||||
int source_ready, ready, view_source, occludes, cache_ready;
|
||||
XrCompositionLayerProjection layer;
|
||||
XrCompositionLayerProjectionView eyes[2];
|
||||
surf_video_job presented_job, cached_job;
|
||||
} surf_projection;
|
||||
static surf_projection surf_projections[SURF_MAX];
|
||||
static struct {
|
||||
#define SP_FN(name) PFN_vk##name name;
|
||||
SP_FN(CreateImage) SP_FN(DestroyImage) SP_FN(GetImageMemoryRequirements) SP_FN(BindImageMemory)
|
||||
SP_FN(CreateImageView) SP_FN(DestroyImageView) SP_FN(CreateSampler) SP_FN(DestroySampler)
|
||||
SP_FN(CreateDescriptorSetLayout) SP_FN(DestroyDescriptorSetLayout) SP_FN(CreateDescriptorPool)
|
||||
SP_FN(DestroyDescriptorPool) SP_FN(AllocateDescriptorSets) SP_FN(UpdateDescriptorSets)
|
||||
SP_FN(CreatePipelineLayout) SP_FN(DestroyPipelineLayout) SP_FN(CreateShaderModule) SP_FN(DestroyShaderModule)
|
||||
SP_FN(CreateRenderPass) SP_FN(DestroyRenderPass) SP_FN(CreateFramebuffer) SP_FN(DestroyFramebuffer)
|
||||
SP_FN(CreateGraphicsPipelines) SP_FN(CmdBeginRenderPass) SP_FN(CmdEndRenderPass)
|
||||
SP_FN(CmdSetViewport) SP_FN(CmdSetScissor) SP_FN(CmdDraw)
|
||||
SP_FN(CreateComputePipelines) SP_FN(DestroyPipeline) SP_FN(CmdBindPipeline) SP_FN(CmdBindDescriptorSets)
|
||||
SP_FN(CmdPushConstants) SP_FN(CmdDispatch) SP_FN(CmdCopyImage) SP_FN(FreeMemory)
|
||||
#undef SP_FN
|
||||
int ready;
|
||||
} spvk;
|
||||
static int surf_projection_functions(void) {
|
||||
if(spvk.ready)return spvk.ready>0;
|
||||
spvk.ready=-1;
|
||||
#define SP_LOAD(name) spvk.name=(PFN_vk##name)vk.GetDeviceProcAddr(vk.device,"vk" #name); if(!spvk.name)return 0;
|
||||
SP_LOAD(CreateImage) SP_LOAD(DestroyImage) SP_LOAD(GetImageMemoryRequirements) SP_LOAD(BindImageMemory)
|
||||
SP_LOAD(CreateImageView) SP_LOAD(DestroyImageView) SP_LOAD(CreateSampler) SP_LOAD(DestroySampler)
|
||||
SP_LOAD(CreateDescriptorSetLayout) SP_LOAD(DestroyDescriptorSetLayout) SP_LOAD(CreateDescriptorPool)
|
||||
SP_LOAD(DestroyDescriptorPool) SP_LOAD(AllocateDescriptorSets) SP_LOAD(UpdateDescriptorSets)
|
||||
SP_LOAD(CreatePipelineLayout) SP_LOAD(DestroyPipelineLayout) SP_LOAD(CreateShaderModule) SP_LOAD(DestroyShaderModule)
|
||||
SP_LOAD(CreateRenderPass) SP_LOAD(DestroyRenderPass) SP_LOAD(CreateFramebuffer) SP_LOAD(DestroyFramebuffer)
|
||||
SP_LOAD(CreateGraphicsPipelines) SP_LOAD(CmdBeginRenderPass) SP_LOAD(CmdEndRenderPass)
|
||||
SP_LOAD(CmdSetViewport) SP_LOAD(CmdSetScissor) SP_LOAD(CmdDraw)
|
||||
SP_LOAD(CreateComputePipelines) SP_LOAD(DestroyPipeline) SP_LOAD(CmdBindPipeline) SP_LOAD(CmdBindDescriptorSets)
|
||||
SP_LOAD(CmdPushConstants) SP_LOAD(CmdDispatch) SP_LOAD(CmdCopyImage) SP_LOAD(FreeMemory)
|
||||
#undef SP_LOAD
|
||||
spvk.ready=1;return 1;
|
||||
}
|
||||
// All images belong to the session device; failures leave cleanup-safe handles.
|
||||
static int surf_private_image(uint32_t width,uint32_t height,uint32_t layers,VkFormat format,
|
||||
VkImageUsageFlags usage,VkImage *image,VkDeviceMemory *memory,VkImageView *view) {
|
||||
VkImageCreateInfo ci={VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO,NULL,0,VK_IMAGE_TYPE_2D,format,
|
||||
{width,height,1},1,layers,VK_SAMPLE_COUNT_1_BIT,VK_IMAGE_TILING_OPTIMAL,usage,VK_SHARING_MODE_EXCLUSIVE};
|
||||
if(spvk.CreateImage(vk.device,&ci,NULL,image)!=VK_SUCCESS)return 0;
|
||||
VkMemoryRequirements req;spvk.GetImageMemoryRequirements(vk.device,*image,&req);
|
||||
VkPhysicalDeviceMemoryProperties props;svk.GetPhysicalDeviceMemoryProperties(vk.physical,&props);
|
||||
uint32_t type=UINT32_MAX;
|
||||
for(uint32_t i=0;i<props.memoryTypeCount;i++)if((req.memoryTypeBits&(1u<<i)) &&
|
||||
(props.memoryTypes[i].propertyFlags&VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT)){type=i;break;}
|
||||
if(type==UINT32_MAX)return 0;
|
||||
VkMemoryAllocateInfo alloc={VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,NULL,req.size,type};
|
||||
if(svk.AllocateMemory(vk.device,&alloc,NULL,memory)!=VK_SUCCESS ||
|
||||
spvk.BindImageMemory(vk.device,*image,*memory,0)!=VK_SUCCESS)return 0;
|
||||
VkImageViewCreateInfo vi={VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,NULL,0,*image,
|
||||
layers>1?VK_IMAGE_VIEW_TYPE_2D_ARRAY:VK_IMAGE_VIEW_TYPE_2D,format,{0,0,0,0},
|
||||
{VK_IMAGE_ASPECT_COLOR_BIT,0,1,0,layers}};
|
||||
return spvk.CreateImageView(vk.device,&vi,NULL,view)==VK_SUCCESS;
|
||||
}
|
||||
static void surf_composite_destroy(surf_projection *p);
|
||||
static int surf_composite_active(surf_projection *p);
|
||||
static int surf_composite_candidate(const XrFrameEndInfo *info,const XrCompositionLayerBaseHeader *video);
|
||||
static int surf_composite_cached_only(const XrFrameEndInfo *info,surf_projection *p,const surf_video_job *rendered,const surf_video_job *current);
|
||||
static void surf_projection_destroy(surf_swapchain *s) {
|
||||
surf_projection *p=&surf_projections[s-surfs];
|
||||
if(!spvk.ready || spvk.ready<0)return;
|
||||
if(s->in_flight) {
|
||||
vk.WaitForFences(vk.device,1,&s->fence,VK_TRUE,UINT64_MAX);
|
||||
vk.ResetFences(vk.device,1,&s->fence);s->in_flight=0;
|
||||
}
|
||||
surf_native_complete(s);
|
||||
surf_native_retire(s);
|
||||
surf_composite_destroy(p);
|
||||
if(p->video_cache_view)spvk.DestroyImageView(vk.device,p->video_cache_view,NULL);
|
||||
if(p->video_cache)spvk.DestroyImage(vk.device,p->video_cache,NULL);
|
||||
if(p->video_cache_memory)spvk.FreeMemory(vk.device,p->video_cache_memory,NULL);
|
||||
if(p->rendered_view)spvk.DestroyImageView(vk.device,p->rendered_view,NULL);
|
||||
if(p->rendered)spvk.DestroyImage(vk.device,p->rendered,NULL);
|
||||
if(p->rendered_memory)spvk.FreeMemory(vk.device,p->rendered_memory,NULL);
|
||||
if(p->pipeline)spvk.DestroyPipeline(vk.device,p->pipeline,NULL);
|
||||
if(p->layout)spvk.DestroyPipelineLayout(vk.device,p->layout,NULL);
|
||||
if(p->descriptors)spvk.DestroyDescriptorPool(vk.device,p->descriptors,NULL);
|
||||
if(p->set_layout)spvk.DestroyDescriptorSetLayout(vk.device,p->set_layout,NULL);
|
||||
if(p->sampler)spvk.DestroySampler(vk.device,p->sampler,NULL);
|
||||
if(p->source_view)spvk.DestroyImageView(vk.device,p->source_view,NULL);
|
||||
if(p->source)spvk.DestroyImage(vk.device,p->source,NULL);
|
||||
if(p->memory)spvk.FreeMemory(vk.device,p->memory,NULL);
|
||||
if(p->output) {
|
||||
PFN_xrDestroySwapchain destroy=(PFN_xrDestroySwapchain)lookup(active_instance,"xrDestroySwapchain");
|
||||
if(destroy)destroy(p->output);
|
||||
}
|
||||
memset(p,0,sizeof(*p));
|
||||
}
|
||||
static int surf_projection_setup(XrSession session,surf_swapchain *s,surf_projection *p,uint32_t width,uint32_t height) {
|
||||
if(p->pipeline || (s->native_project && p->output))return 1;
|
||||
if(!surf_vk_ready() || !surf_staging(s) || !surf_projection_functions())return 0;
|
||||
const char *stage="runtime swapchain";
|
||||
p->size=equirect_res>=512 && equirect_res<=4096?(uint32_t)equirect_res:1536;
|
||||
if(s->native_mode && !equirect_res_set)p->size=2560;
|
||||
p->width=width;p->height=height;
|
||||
XrSwapchainCreateInfo ci={XR_TYPE_SWAPCHAIN_CREATE_INFO,NULL,0,
|
||||
XR_SWAPCHAIN_USAGE_TRANSFER_DST_BIT|XR_SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT|XR_SWAPCHAIN_USAGE_SAMPLED_BIT,
|
||||
VK_FORMAT_R8G8B8A8_SRGB,1,2*p->size,p->size,1,1,1};
|
||||
PFN_xrCreateSwapchain create=(PFN_xrCreateSwapchain)lookup(active_instance,"xrCreateSwapchain");
|
||||
PFN_xrEnumerateSwapchainImages enumerate=(PFN_xrEnumerateSwapchainImages)lookup(active_instance,"xrEnumerateSwapchainImages");
|
||||
if(!create || !enumerate)goto fail;
|
||||
XrResult xr_result=create(session,&ci,&p->output);
|
||||
if(XR_FAILED(xr_result)) {
|
||||
static int create_failures;
|
||||
if(create_failures++<5)LOG("surface_projection: swapchain creation result=%d",xr_result);
|
||||
goto fail;
|
||||
}
|
||||
stage="runtime image enumeration";
|
||||
XrSwapchainImageVulkanKHR images[MAX_IMAGES];
|
||||
for(int i=0;i<MAX_IMAGES;i++)images[i]=(XrSwapchainImageVulkanKHR){XR_TYPE_SWAPCHAIN_IMAGE_VULKAN_KHR,NULL,VK_NULL_HANDLE};
|
||||
uint32_t image_count=0;
|
||||
if(XR_FAILED(enumerate(p->output,MAX_IMAGES,&image_count,(XrSwapchainImageBaseHeader*)images)) ||
|
||||
!image_count || image_count>MAX_IMAGES)goto fail;
|
||||
p->count=image_count;
|
||||
for(uint32_t i=0;i<p->count;i++)p->images[i]=images[i].image;
|
||||
if(s->native_project){
|
||||
stage="video composition cache";
|
||||
if(!surf_private_image(2*p->size,p->size,1,VK_FORMAT_R8G8B8A8_SRGB,
|
||||
VK_IMAGE_USAGE_TRANSFER_DST_BIT|VK_IMAGE_USAGE_SAMPLED_BIT,
|
||||
&p->video_cache,&p->video_cache_memory,&p->video_cache_view))goto fail;
|
||||
LOG("surface_projection: fused GPU video view ready (%ux%u per eye)",p->size,p->size);
|
||||
return 1;
|
||||
}
|
||||
stage="source image";
|
||||
VkImageCreateInfo image={VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO,NULL,0,VK_IMAGE_TYPE_2D,VK_FORMAT_R8G8B8A8_UNORM,
|
||||
{width,height,1},1,1,VK_SAMPLE_COUNT_1_BIT,VK_IMAGE_TILING_OPTIMAL,
|
||||
VK_IMAGE_USAGE_TRANSFER_DST_BIT|VK_IMAGE_USAGE_SAMPLED_BIT,VK_SHARING_MODE_EXCLUSIVE,0,NULL,VK_IMAGE_LAYOUT_UNDEFINED};
|
||||
VkMemoryRequirements req;
|
||||
VkPhysicalDeviceMemoryProperties props;svk.GetPhysicalDeviceMemoryProperties(vk.physical,&props);
|
||||
uint32_t type=UINT32_MAX;
|
||||
VkMemoryAllocateInfo memory;
|
||||
VkImageViewCreateInfo view={VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,NULL,0,p->source,VK_IMAGE_VIEW_TYPE_2D,
|
||||
VK_FORMAT_R8G8B8A8_UNORM,{0,0,0,0},{VK_IMAGE_ASPECT_COLOR_BIT,0,1,0,1}};
|
||||
if(!s->native_mode){
|
||||
if(spvk.CreateImage(vk.device,&image,NULL,&p->source)!=VK_SUCCESS)goto fail;
|
||||
spvk.GetImageMemoryRequirements(vk.device,p->source,&req);
|
||||
for(uint32_t i=0;i<props.memoryTypeCount;i++)if((req.memoryTypeBits&(1u<<i)) &&
|
||||
(props.memoryTypes[i].propertyFlags&VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT)){type=i;break;}
|
||||
if(type==UINT32_MAX)goto fail;
|
||||
memory=(VkMemoryAllocateInfo){VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,NULL,req.size,type};
|
||||
if(svk.AllocateMemory(vk.device,&memory,NULL,&p->memory)!=VK_SUCCESS ||
|
||||
spvk.BindImageMemory(vk.device,p->source,p->memory,0)!=VK_SUCCESS)goto fail;
|
||||
view.image=p->source;
|
||||
if(spvk.CreateImageView(vk.device,&view,NULL,&p->source_view)!=VK_SUCCESS)goto fail;
|
||||
}
|
||||
// The runtime supports sRGB swapchains, which cannot be storage images.
|
||||
// Compute into a private UNORM image and copy its encoded pixels unchanged.
|
||||
stage="private storage image";
|
||||
image.extent=(VkExtent3D){2*p->size,p->size,1};
|
||||
image.usage=VK_IMAGE_USAGE_STORAGE_BIT|VK_IMAGE_USAGE_TRANSFER_SRC_BIT;
|
||||
if(spvk.CreateImage(vk.device,&image,NULL,&p->rendered)!=VK_SUCCESS)goto fail;
|
||||
spvk.GetImageMemoryRequirements(vk.device,p->rendered,&req);
|
||||
type=UINT32_MAX;
|
||||
for(uint32_t i=0;i<props.memoryTypeCount;i++)if((req.memoryTypeBits&(1u<<i)) &&
|
||||
(props.memoryTypes[i].propertyFlags&VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT)){type=i;break;}
|
||||
if(type==UINT32_MAX)goto fail;
|
||||
memory=(VkMemoryAllocateInfo){VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,NULL,req.size,type};
|
||||
if(svk.AllocateMemory(vk.device,&memory,NULL,&p->rendered_memory)!=VK_SUCCESS ||
|
||||
spvk.BindImageMemory(vk.device,p->rendered,p->rendered_memory,0)!=VK_SUCCESS)goto fail;
|
||||
view.image=p->rendered;
|
||||
if(spvk.CreateImageView(vk.device,&view,NULL,&p->rendered_view)!=VK_SUCCESS)goto fail;
|
||||
stage="sampler and descriptors";
|
||||
VkSamplerCreateInfo sampler={VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO,NULL,0,VK_FILTER_LINEAR,VK_FILTER_LINEAR,
|
||||
VK_SAMPLER_MIPMAP_MODE_NEAREST,VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,
|
||||
VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,0,VK_FALSE,1,VK_FALSE,VK_COMPARE_OP_ALWAYS,0,0,VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK,VK_FALSE};
|
||||
if(spvk.CreateSampler(vk.device,&sampler,NULL,&p->sampler)!=VK_SUCCESS)goto fail;
|
||||
VkDescriptorSetLayoutBinding bindings[2]={{0,VK_DESCRIPTOR_TYPE_STORAGE_IMAGE,1,VK_SHADER_STAGE_COMPUTE_BIT,NULL},
|
||||
{1,VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,1,VK_SHADER_STAGE_COMPUTE_BIT,NULL}};
|
||||
VkDescriptorSetLayoutCreateInfo set={VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO,NULL,0,2,bindings};
|
||||
if(spvk.CreateDescriptorSetLayout(vk.device,&set,NULL,&p->set_layout)!=VK_SUCCESS)goto fail;
|
||||
VkDescriptorPoolSize sizes[2]={{VK_DESCRIPTOR_TYPE_STORAGE_IMAGE,1},{VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,1}};
|
||||
VkDescriptorPoolCreateInfo pool={VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO,NULL,0,1,2,sizes};
|
||||
if(spvk.CreateDescriptorPool(vk.device,&pool,NULL,&p->descriptors)!=VK_SUCCESS)goto fail;
|
||||
VkDescriptorSetAllocateInfo alloc={VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO,NULL,p->descriptors,1,&p->set_layout};
|
||||
if(spvk.AllocateDescriptorSets(vk.device,&alloc,&p->set)!=VK_SUCCESS)goto fail;
|
||||
stage="compute pipeline";
|
||||
VkPushConstantRange range={VK_SHADER_STAGE_COMPUTE_BIT,0,128};
|
||||
VkPipelineLayoutCreateInfo layout={VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO,NULL,0,1,&p->set_layout,1,&range};
|
||||
if(spvk.CreatePipelineLayout(vk.device,&layout,NULL,&p->layout)!=VK_SUCCESS)goto fail;
|
||||
VkShaderModule module;
|
||||
VkShaderModuleCreateInfo shader={VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO,NULL,0,sizeof(surface_projection_spv),surface_projection_spv};
|
||||
if(spvk.CreateShaderModule(vk.device,&shader,NULL,&module)!=VK_SUCCESS)goto fail;
|
||||
VkComputePipelineCreateInfo pipeline={VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO,NULL,0,
|
||||
{VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO,NULL,0,VK_SHADER_STAGE_COMPUTE_BIT,module,"main",NULL},p->layout,VK_NULL_HANDLE,0};
|
||||
VkResult result=spvk.CreateComputePipelines(vk.device,VK_NULL_HANDLE,1,&pipeline,NULL,&p->pipeline);
|
||||
spvk.DestroyShaderModule(vk.device,module,NULL);
|
||||
if(result!=VK_SUCCESS)goto fail;
|
||||
LOG("surface_projection: Vulkan stereo panorama renderer ready (%ux%u per eye)",p->size,p->size);return 1;
|
||||
fail:;
|
||||
static int failures;
|
||||
if(failures++<5)LOG("surface_projection: setup failed at %s; retaining original layer behavior",stage);
|
||||
surf_projection_destroy(s);return 0;
|
||||
}
|
||||
// Build both eyes at once. The worker carries this exact pose/space snapshot
|
||||
// with its finished image rather than labelling an old image with a newer pose.
|
||||
static int surf_video_request(XrSession session,const XrFrameEndInfo *info,
|
||||
const XrCompositionLayerBaseHeader *layer,surf_swapchain *s,surf_projection *p) {
|
||||
emul_common common=emul_common_of(layer);
|
||||
pthread_mutex_lock(&surf_lock);
|
||||
int same=s->video_job.seq && s->video_job.time==info->displayTime && s->video_job.space==common.space;
|
||||
pthread_mutex_unlock(&surf_lock);
|
||||
if(same)return 1;
|
||||
surf_video_job job={.time=info->displayTime,.space=common.space,.flags=layer->layerFlags,.size=p->size};
|
||||
job.views[0].type=job.views[1].type=XR_TYPE_VIEW;
|
||||
int source=surf_views_select(session,info,common.space,
|
||||
(PFN_xrLocateSpace)lookup(active_instance,"xrLocateSpace"),job.views);
|
||||
if(!source){
|
||||
PFN_xrLocateViews locate=(PFN_xrLocateViews)lookup(active_instance,"xrLocateViews");
|
||||
XrViewLocateInfo li={XR_TYPE_VIEW_LOCATE_INFO,NULL,XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO,info->displayTime,common.space};
|
||||
XrViewState state={XR_TYPE_VIEW_STATE};uint32_t count=0;
|
||||
if(!locate || XR_FAILED(locate(session,&li,&state,2,&count,job.views)) || count!=2 ||
|
||||
!(state.viewStateFlags&XR_VIEW_STATE_ORIENTATION_VALID_BIT))return 0;
|
||||
source=3;
|
||||
}
|
||||
if(p->view_source!=source){
|
||||
LOG("surface_projection: views from %s",source==1?"submitted projection":source==2?"application locate":"runtime locate");
|
||||
p->view_source=source;
|
||||
}
|
||||
for(int eye=0;eye<2;eye++){
|
||||
const XrCompositionLayerBaseHeader *selected=layer;
|
||||
for(uint32_t i=0;i<info->layerCount;i++)if(emul_is_equirect(info->layers[i])){
|
||||
emul_common c=emul_common_of(info->layers[i]);
|
||||
if(c.sub.swapchain==s->handle && c.space==common.space && (c.eye==XR_EYE_VISIBILITY_BOTH ||
|
||||
c.eye==(eye?XR_EYE_VISIBILITY_RIGHT:XR_EYE_VISIBILITY_LEFT))){selected=info->layers[i];break;}
|
||||
}
|
||||
emul_common c=emul_common_of(selected);XrView *view=&job.views[eye];
|
||||
job.panorama[eye]=c.pose;
|
||||
view->fov=surf_video_guard_fov(view->fov);
|
||||
XrQuaternionf rotation=lm_qmul(lm_qconj(c.pose.orientation),view->pose.orientation);
|
||||
XrVector3f origin=lm_rotate(lm_qconj(c.pose.orientation),(XrVector3f){view->pose.position.x-c.pose.position.x,
|
||||
view->pose.position.y-c.pose.position.y,view->pose.position.z-c.pose.position.z});
|
||||
float params[32]={rotation.x,rotation.y,rotation.z,rotation.w,origin.x,origin.y,origin.z,0,
|
||||
tanf(view->fov.angleLeft),tanf(view->fov.angleRight),tanf(view->fov.angleDown),tanf(view->fov.angleUp),
|
||||
c.sub.imageRect.offset.x/(float)s->width,c.sub.imageRect.offset.y/(float)s->height,
|
||||
c.sub.imageRect.extent.width/(float)s->width,c.sub.imageRect.extent.height/(float)s->height,
|
||||
0,0,0,(float)eye,1,1,0,0,1,1,1,1,0,0,0,0};
|
||||
if(selected->type==XR_TYPE_COMPOSITION_LAYER_EQUIRECT2_KHR){
|
||||
const XrCompositionLayerEquirect2KHR *e=(const void*)selected;
|
||||
params[7]=e->radius;params[16]=e->centralHorizontalAngle;params[17]=e->upperVerticalAngle;params[18]=e->lowerVerticalAngle;
|
||||
}else{
|
||||
const XrCompositionLayerEquirectKHR *e=(const void*)selected;
|
||||
params[7]=e->radius;params[20]=e->scale.x;params[21]=e->scale.y;params[22]=e->bias.x;params[23]=e->bias.y;
|
||||
}
|
||||
for(const XrBaseInStructure *n=selected->next;n;n=n->next)if(n->type==XR_TYPE_COMPOSITION_LAYER_COLOR_SCALE_BIAS_KHR){
|
||||
const XrCompositionLayerColorScaleBiasKHR *color=(const void*)n;
|
||||
memcpy(params+24,&color->colorScale,16);memcpy(params+28,&color->colorBias,16);
|
||||
}
|
||||
memcpy(job.params[eye],params,sizeof(params));
|
||||
}
|
||||
pthread_mutex_lock(&surf_lock);job.seq=s->video_job.seq+1;s->video_job=job;
|
||||
pthread_cond_broadcast(&surf_cond);pthread_mutex_unlock(&surf_lock);
|
||||
return 1;
|
||||
}
|
||||
static const XrCompositionLayerBaseHeader *surf_video_layer(surf_projection *p,const surf_video_job *current) {
|
||||
if(!p->ready)return NULL;
|
||||
int occludes=surf_video_occludes(&p->presented_job,current);
|
||||
if(occludes!=p->occludes && !surf_composite_active(p))LOG("surface_projection: opaque primary=%d (fades and uncovered views retain lower layers)",occludes);
|
||||
p->occludes=occludes;
|
||||
for(int eye=0;eye<2;eye++)p->eyes[eye].pose=occludes?
|
||||
surf_video_primary_pose(&p->presented_job,current,eye):surf_video_pose(&p->presented_job,current,eye);
|
||||
if(current->time-p->tracking_log_time>=5000000000ll){
|
||||
XrQuaternionf correction=lm_qmul(lm_qconj(p->eyes[0].pose.orientation),current->views[0].pose.orientation);
|
||||
XrQuaternionf layer_delta=lm_qmul(lm_qconj(p->presented_job.panorama[0].orientation),current->panorama[0].orientation);
|
||||
LOG("surface_projection: render age=%.2f ms, head correction=%.2f deg, layer rotation=%.2f deg, space=%p",
|
||||
(current->time-p->presented_job.time)/1e6,lm_angle(correction)*180/LM_PI,lm_angle(layer_delta)*180/LM_PI,
|
||||
(void*)(uintptr_t)current->space);
|
||||
p->tracking_log_time=current->time;
|
||||
}
|
||||
return (const void*)&p->layer;
|
||||
}
|
||||
static int surf_projection_occludes(const XrCompositionLayerBaseHeader *layer) {
|
||||
for(int i=0;i<SURF_MAX;i++)if(layer==(const void*)&surf_projections[i].layer)
|
||||
return surfs[i].native_project && surf_projections[i].ready && surf_projections[i].occludes;
|
||||
return 0;
|
||||
}
|
||||
static const XrCompositionLayerBaseHeader *surf_video_present(XrSession session,const XrFrameEndInfo *info,
|
||||
const XrCompositionLayerBaseHeader *layer,surf_swapchain *s,surf_projection *p) {
|
||||
if(!surf_projection_setup(session,s,p,s->width,s->height) || !surf_video_request(session,info,layer,s,p))return NULL;
|
||||
pthread_mutex_lock(&surf_lock);surf_video_job current=s->video_job;pthread_mutex_unlock(&surf_lock);
|
||||
// Request tracking updates even when our previous copy is still queued.
|
||||
if(s->in_flight){
|
||||
if(svk.GetFenceStatus(vk.device,s->fence)!=VK_SUCCESS)return surf_video_layer(p,¤t);
|
||||
vk.ResetFences(vk.device,1,&s->fence);s->in_flight=0;surf_native_complete(s);
|
||||
}
|
||||
// A worker can publish between the two eye calls; present the pair only once.
|
||||
if(p->ready && p->presented_time==info->displayTime)return surf_video_layer(p,¤t);
|
||||
int slot=-1;
|
||||
pthread_mutex_lock(&surf_lock);
|
||||
for(int i=0;i<SURF_NATIVE_SLOTS;i++)if(s->native_slots[i].state==2){slot=i;s->native_slots[i].state=3;break;}
|
||||
pthread_mutex_unlock(&surf_lock);
|
||||
if(slot<0)return surf_video_layer(p,¤t);
|
||||
surf_native_slot *native=&s->native_slots[slot];
|
||||
if(!native->projected || native->width!=2*p->size || native->height!=p->size)goto unused;
|
||||
PFN_xrAcquireSwapchainImage acquire=(PFN_xrAcquireSwapchainImage)lookup(active_instance,"xrAcquireSwapchainImage");
|
||||
PFN_xrWaitSwapchainImage wait=(PFN_xrWaitSwapchainImage)lookup(active_instance,"xrWaitSwapchainImage");
|
||||
PFN_xrReleaseSwapchainImage release=(PFN_xrReleaseSwapchainImage)lookup(active_instance,"xrReleaseSwapchainImage");
|
||||
int compose=surf_composite_candidate(info,layer);
|
||||
int cached_only=compose && surf_composite_cached_only(info,p,&native->video,¤t);
|
||||
XrSwapchainImageAcquireInfo ai={XR_TYPE_SWAPCHAIN_IMAGE_ACQUIRE_INFO};
|
||||
XrSwapchainImageWaitInfo wi={XR_TYPE_SWAPCHAIN_IMAGE_WAIT_INFO,NULL,0};
|
||||
XrSwapchainImageReleaseInfo ri={XR_TYPE_SWAPCHAIN_IMAGE_RELEASE_INFO};uint32_t index;
|
||||
if(!acquire || !wait || !release)goto unused;
|
||||
if(!cached_only && !p->acquired){
|
||||
if(XR_FAILED(acquire(p->output,&ai,&p->acquired_index)))goto unused;
|
||||
p->acquired=1;
|
||||
}
|
||||
index=p->acquired_index;
|
||||
XrResult waited=cached_only?XR_SUCCESS:wait(p->output,&wi);
|
||||
// Timeout is a positive XrResult, but the image is not yet writable. Keep
|
||||
// it acquired and retry next frame rather than blocking the render thread.
|
||||
if(waited!=XR_SUCCESS)goto unused;
|
||||
if(!cached_only && index>=p->count){release(p->output,&ri);p->acquired=0;goto unused;}
|
||||
VkCommandBufferBeginInfo begin={VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO,NULL,VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT};
|
||||
vk.ResetCommandBuffer(s->cmd,0);vk.BeginCommandBuffer(s->cmd,&begin);
|
||||
surf_native_ownership(s->cmd,native,1);
|
||||
if(!cached_only)surf_barrier(s->cmd,p->images[index],VK_IMAGE_LAYOUT_UNDEFINED,VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,0,VK_ACCESS_TRANSFER_WRITE_BIT);
|
||||
VkImageCopy copy={{VK_IMAGE_ASPECT_COLOR_BIT,0,0,1},{0,0,0},{VK_IMAGE_ASPECT_COLOR_BIT,0,0,1},{0,0,0},{2*p->size,p->size,1}};
|
||||
if(!cached_only)spvk.CmdCopyImage(s->cmd,native->image,VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,p->images[index],VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,1,©);
|
||||
if(compose){
|
||||
surf_barrier(s->cmd,p->video_cache,p->cache_ready?VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL:VK_IMAGE_LAYOUT_UNDEFINED,
|
||||
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,p->cache_ready?VK_ACCESS_SHADER_READ_BIT:0,VK_ACCESS_TRANSFER_WRITE_BIT);
|
||||
spvk.CmdCopyImage(s->cmd,native->image,VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,p->video_cache,VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,1,©);
|
||||
surf_barrier(s->cmd,p->video_cache,VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
|
||||
VK_ACCESS_TRANSFER_WRITE_BIT,VK_ACCESS_SHADER_READ_BIT);
|
||||
}
|
||||
surf_native_ownership(s->cmd,native,0);
|
||||
if(!cached_only)surf_barrier(s->cmd,p->images[index],VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
|
||||
VK_ACCESS_TRANSFER_WRITE_BIT,VK_ACCESS_COLOR_ATTACHMENT_READ_BIT|VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT);
|
||||
vk.EndCommandBuffer(s->cmd);
|
||||
VkSubmitInfo submit={VK_STRUCTURE_TYPE_SUBMIT_INFO,NULL,0,NULL,NULL,1,&s->cmd};
|
||||
int ok=vk.QueueSubmit(vk.queue,1,&submit,s->fence)==VK_SUCCESS;
|
||||
if(!cached_only){release(p->output,&ri);p->acquired=0;}if(!ok)goto unused;
|
||||
s->native_pending=slot;s->in_flight=1;s->uploads++;if(compose){p->cache_ready=1;p->cached_job=native->video;}
|
||||
p->width=native->source_width;p->height=native->source_height;p->source_seq=native->seq;p->source_ready=1;
|
||||
for(int eye=0;eye<2;eye++)p->eyes[eye]=(XrCompositionLayerProjectionView){XR_TYPE_COMPOSITION_LAYER_PROJECTION_VIEW,NULL,
|
||||
native->video.views[eye].pose,native->video.views[eye].fov,
|
||||
{p->output,{{eye*(int32_t)p->size,0},{(int32_t)p->size,(int32_t)p->size}},0}};
|
||||
p->layer=(XrCompositionLayerProjection){XR_TYPE_COMPOSITION_LAYER_PROJECTION,NULL,native->video.flags,native->video.space,2,p->eyes};
|
||||
p->presented_job=native->video;
|
||||
p->ready=1;p->presented_time=info->displayTime;return surf_video_layer(p,¤t);
|
||||
unused:
|
||||
pthread_mutex_lock(&surf_lock);native->state=native->seq==s->seq?2:0;pthread_mutex_unlock(&surf_lock);
|
||||
return surf_video_layer(p,¤t);
|
||||
}
|
||||
static const XrCompositionLayerBaseHeader *surf_projection_frame(XrSession session,const XrFrameEndInfo *info,
|
||||
const XrCompositionLayerBaseHeader *layer) {
|
||||
if(!surf_vulkan || !emul_is_equirect(layer))return NULL;
|
||||
emul_common common=emul_common_of(layer);
|
||||
surf_swapchain *s=surf_find(common.sub.swapchain);
|
||||
if(!s)return NULL;
|
||||
surf_projection *p=&surf_projections[s-surfs];
|
||||
if(s->native_project)return surf_video_present(session,info,layer,s,p);
|
||||
if(s->in_flight) {
|
||||
if(svk.GetFenceStatus(vk.device,s->fence)!=VK_SUCCESS)return p->ready?(const XrCompositionLayerBaseHeader*)&p->layer:NULL;
|
||||
vk.ResetFences(vk.device,1,&s->fence);s->in_flight=0;
|
||||
surf_native_complete(s);
|
||||
}
|
||||
int native_index=-1;
|
||||
if(s->native_mode){
|
||||
pthread_mutex_lock(&surf_lock);
|
||||
for(int i=0;i<SURF_NATIVE_SLOTS;i++)if(s->native_slots[i].state==2){native_index=i;s->native_slots[i].state=3;break;}
|
||||
pthread_mutex_unlock(&surf_lock);
|
||||
if(native_index<0 && !p->source_ready)return NULL;
|
||||
}
|
||||
surf_native_slot *native=native_index>=0?&s->native_slots[native_index]:NULL;
|
||||
uint32_t source_width=native?native->width:(s->native_mode?p->width:s->width);
|
||||
uint32_t source_height=native?native->height:(s->native_mode?p->height:s->height);
|
||||
if(p->pipeline && (p->width!=source_width || p->height!=source_height)){
|
||||
if(s->native_mode){p->width=source_width;p->height=source_height;}
|
||||
else surf_projection_destroy(s);
|
||||
}
|
||||
if(!surf_projection_setup(session,s,p,source_width,source_height)){
|
||||
if(native){pthread_mutex_lock(&surf_lock);native->state=native->seq==s->seq?2:0;pthread_mutex_unlock(&surf_lock);}return NULL;
|
||||
}
|
||||
XrView views[2]={{XR_TYPE_VIEW,NULL},{XR_TYPE_VIEW,NULL}};
|
||||
XrViewState state={XR_TYPE_VIEW_STATE,NULL,0};uint32_t count=0;
|
||||
XrViewLocateInfo locate={XR_TYPE_VIEW_LOCATE_INFO,NULL,XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO,info->displayTime,common.space};
|
||||
PFN_xrLocateViews locate_views=(PFN_xrLocateViews)lookup(active_instance,"xrLocateViews");
|
||||
int view_source=surf_views_select(session,info,common.space,
|
||||
(PFN_xrLocateSpace)lookup(active_instance,"xrLocateSpace"),views);
|
||||
if(!view_source){
|
||||
if(!locate_views || XR_FAILED(locate_views(session,&locate,&state,2,&count,views)) || count!=2 ||
|
||||
!(state.viewStateFlags&XR_VIEW_STATE_ORIENTATION_VALID_BIT))goto unused;
|
||||
view_source=3;
|
||||
}
|
||||
if(p->view_source!=view_source){
|
||||
LOG("surface_projection: views from %s, space=%p, frame time=%lld",view_source==1?"submitted projection":
|
||||
view_source==2?"application locate":"runtime locate",(void*)(uintptr_t)common.space,(long long)info->displayTime);
|
||||
p->view_source=view_source;
|
||||
}
|
||||
pthread_mutex_lock(&surf_lock);uint64_t seq=s->native_mode?(native?native->seq:p->source_seq):s->seq;
|
||||
if(!s->native_mode && seq!=p->source_seq)memcpy(s->staging_map,s->pixels,(size_t)s->width*s->height*4);
|
||||
pthread_mutex_unlock(&surf_lock);
|
||||
if(!seq)goto unused;
|
||||
PFN_xrAcquireSwapchainImage acquire=(PFN_xrAcquireSwapchainImage)lookup(active_instance,"xrAcquireSwapchainImage");
|
||||
PFN_xrWaitSwapchainImage wait=(PFN_xrWaitSwapchainImage)lookup(active_instance,"xrWaitSwapchainImage");
|
||||
PFN_xrReleaseSwapchainImage release=(PFN_xrReleaseSwapchainImage)lookup(active_instance,"xrReleaseSwapchainImage");
|
||||
XrSwapchainImageAcquireInfo ai={XR_TYPE_SWAPCHAIN_IMAGE_ACQUIRE_INFO,NULL};
|
||||
XrSwapchainImageWaitInfo wi={XR_TYPE_SWAPCHAIN_IMAGE_WAIT_INFO,NULL,100000000};
|
||||
XrSwapchainImageReleaseInfo ri={XR_TYPE_SWAPCHAIN_IMAGE_RELEASE_INFO,NULL};uint32_t index;
|
||||
if(!acquire || !wait || !release || XR_FAILED(acquire(p->output,&ai,&index)))goto unused;
|
||||
if(index>=p->count || XR_FAILED(wait(p->output,&wi))) {release(p->output,&ri);goto unused;}
|
||||
int previous_native=s->native_current;
|
||||
surf_native_slot *sample=native?native:(s->native_mode && previous_native>=0?&s->native_slots[previous_native]:NULL);
|
||||
VkDescriptorImageInfo descriptors[2]={{VK_NULL_HANDLE,p->rendered_view,VK_IMAGE_LAYOUT_GENERAL},
|
||||
{p->sampler,sample?sample->view:p->source_view,VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL}};
|
||||
VkWriteDescriptorSet writes[2];
|
||||
for(int i=0;i<2;i++)writes[i]=(VkWriteDescriptorSet){VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET,NULL,p->set,(uint32_t)i,0,1,
|
||||
i?VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE,&descriptors[i],NULL,NULL};
|
||||
spvk.UpdateDescriptorSets(vk.device,2,writes,0,NULL);
|
||||
VkCommandBufferBeginInfo begin={VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO,NULL,VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT,NULL};
|
||||
vk.ResetCommandBuffer(s->cmd,0);vk.BeginCommandBuffer(s->cmd,&begin);
|
||||
if(native){
|
||||
if(previous_native>=0)surf_native_ownership(s->cmd,&s->native_slots[previous_native],0);
|
||||
surf_native_ownership(s->cmd,native,1);
|
||||
}else if(!s->native_mode && seq!=p->source_seq) {
|
||||
surf_barrier(s->cmd,p->source,p->source_ready?VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL:VK_IMAGE_LAYOUT_UNDEFINED,
|
||||
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,p->source_ready?VK_ACCESS_SHADER_READ_BIT:0,VK_ACCESS_TRANSFER_WRITE_BIT);
|
||||
VkBufferImageCopy copy={0,0,0,{VK_IMAGE_ASPECT_COLOR_BIT,0,0,1},{0,0,0},{s->width,s->height,1}};
|
||||
svk.CmdCopyBufferToImage(s->cmd,s->staging,p->source,VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,1,©);
|
||||
surf_barrier(s->cmd,p->source,VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
|
||||
VK_ACCESS_TRANSFER_WRITE_BIT,VK_ACCESS_SHADER_READ_BIT);
|
||||
}
|
||||
surf_barrier(s->cmd,p->rendered,VK_IMAGE_LAYOUT_UNDEFINED,VK_IMAGE_LAYOUT_GENERAL,0,VK_ACCESS_SHADER_WRITE_BIT);
|
||||
spvk.CmdBindPipeline(s->cmd,VK_PIPELINE_BIND_POINT_COMPUTE,p->pipeline);
|
||||
spvk.CmdBindDescriptorSets(s->cmd,VK_PIPELINE_BIND_POINT_COMPUTE,p->layout,0,1,&p->set,0,NULL);
|
||||
for(int eye=0;eye<2;eye++) {
|
||||
const XrCompositionLayerBaseHeader *selected=NULL;
|
||||
for(uint32_t i=0;i<info->layerCount;i++)if(emul_is_equirect(info->layers[i])) {
|
||||
emul_common c=emul_common_of(info->layers[i]);
|
||||
if(c.sub.swapchain==s->handle && c.space==common.space && (c.eye==XR_EYE_VISIBILITY_BOTH ||
|
||||
c.eye==(eye?XR_EYE_VISIBILITY_RIGHT:XR_EYE_VISIBILITY_LEFT))){selected=info->layers[i];break;}
|
||||
}
|
||||
if(!selected)selected=layer;
|
||||
emul_common c=emul_common_of(selected);
|
||||
XrQuaternionf rotation=lm_qmul(lm_qconj(c.pose.orientation),views[eye].pose.orientation);
|
||||
XrVector3f origin=lm_rotate(lm_qconj(c.pose.orientation),(XrVector3f){views[eye].pose.position.x-c.pose.position.x,
|
||||
views[eye].pose.position.y-c.pose.position.y,views[eye].pose.position.z-c.pose.position.z});
|
||||
float params[32]={rotation.x,rotation.y,rotation.z,rotation.w,origin.x,origin.y,origin.z,0,
|
||||
tanf(views[eye].fov.angleLeft),tanf(views[eye].fov.angleRight),tanf(views[eye].fov.angleDown),tanf(views[eye].fov.angleUp),
|
||||
c.sub.imageRect.offset.x/(float)s->width,c.sub.imageRect.offset.y/(float)s->height,
|
||||
c.sub.imageRect.extent.width/(float)s->width,c.sub.imageRect.extent.height/(float)s->height,
|
||||
0,0,0,(float)eye,1,1,0,0,1,1,1,1,0,0,0,0};
|
||||
if(selected->type==XR_TYPE_COMPOSITION_LAYER_EQUIRECT2_KHR) {
|
||||
const XrCompositionLayerEquirect2KHR *e=(const void*)selected;
|
||||
params[7]=e->radius;params[16]=e->centralHorizontalAngle;params[17]=e->upperVerticalAngle;params[18]=e->lowerVerticalAngle;
|
||||
} else {
|
||||
const XrCompositionLayerEquirectKHR *e=(const void*)selected;
|
||||
params[7]=e->radius;params[20]=e->scale.x;params[21]=e->scale.y;params[22]=e->bias.x;params[23]=e->bias.y;
|
||||
}
|
||||
for(const XrBaseInStructure *n=selected->next;n;n=n->next)if(n->type==XR_TYPE_COMPOSITION_LAYER_COLOR_SCALE_BIAS_KHR) {
|
||||
const XrCompositionLayerColorScaleBiasKHR *color=(const void*)n;
|
||||
memcpy(params+24,&color->colorScale,16);memcpy(params+28,&color->colorBias,16);
|
||||
}
|
||||
spvk.CmdPushConstants(s->cmd,p->layout,VK_SHADER_STAGE_COMPUTE_BIT,0,sizeof(params),params);
|
||||
spvk.CmdDispatch(s->cmd,(p->size+15)/16,(p->size+15)/16,1);
|
||||
p->eyes[eye]=(XrCompositionLayerProjectionView){XR_TYPE_COMPOSITION_LAYER_PROJECTION_VIEW,NULL,
|
||||
views[eye].pose,views[eye].fov,{p->output,{{eye*(int32_t)p->size,0},{(int32_t)p->size,(int32_t)p->size}},0}};
|
||||
}
|
||||
surf_barrier(s->cmd,p->rendered,VK_IMAGE_LAYOUT_GENERAL,VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
|
||||
VK_ACCESS_SHADER_WRITE_BIT,VK_ACCESS_TRANSFER_READ_BIT);
|
||||
surf_barrier(s->cmd,p->images[index],VK_IMAGE_LAYOUT_UNDEFINED,VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
|
||||
0,VK_ACCESS_TRANSFER_WRITE_BIT);
|
||||
VkImageCopy rendered_copy={{VK_IMAGE_ASPECT_COLOR_BIT,0,0,1},{0,0,0},
|
||||
{VK_IMAGE_ASPECT_COLOR_BIT,0,0,1},{0,0,0},{2*p->size,p->size,1}};
|
||||
spvk.CmdCopyImage(s->cmd,p->rendered,VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
|
||||
p->images[index],VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,1,&rendered_copy);
|
||||
surf_barrier(s->cmd,p->images[index],VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
|
||||
VK_ACCESS_TRANSFER_WRITE_BIT,VK_ACCESS_COLOR_ATTACHMENT_READ_BIT|VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT);
|
||||
vk.EndCommandBuffer(s->cmd);
|
||||
VkSubmitInfo submit={VK_STRUCTURE_TYPE_SUBMIT_INFO,NULL,0,NULL,NULL,1,&s->cmd,0,NULL};
|
||||
int ok=vk.QueueSubmit(vk.queue,1,&submit,s->fence)==VK_SUCCESS;
|
||||
release(p->output,&ri);
|
||||
if(!ok)goto unused;
|
||||
if(native){s->native_pending=previous_native;s->native_current=native_index;}
|
||||
s->in_flight=1;p->source_ready=1;p->source_seq=seq;s->uploads++;
|
||||
p->layer=(XrCompositionLayerProjection){XR_TYPE_COMPOSITION_LAYER_PROJECTION,NULL,layer->layerFlags,common.space,2,p->eyes};
|
||||
p->ready=1;
|
||||
return (const XrCompositionLayerBaseHeader*)&p->layer;
|
||||
unused:
|
||||
if(native){pthread_mutex_lock(&surf_lock);native->state=native->seq==s->seq?2:0;pthread_mutex_unlock(&surf_lock);}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#include "surface_composite.c"
|
||||
@@ -0,0 +1,38 @@
|
||||
#version 450
|
||||
layout(local_size_x=16,local_size_y=16) in;
|
||||
layout(binding=0,rgba8) uniform writeonly image2D outputImage;
|
||||
layout(binding=1) uniform sampler2D panorama;
|
||||
layout(push_constant) uniform Params {
|
||||
vec4 rotation;
|
||||
vec4 originRadius;
|
||||
vec4 tans;
|
||||
vec4 rect;
|
||||
vec4 anglesEye;
|
||||
vec4 scaleBias;
|
||||
vec4 colorScale;
|
||||
vec4 colorBias;
|
||||
} p;
|
||||
vec3 rotate(vec4 q,vec3 v) {return v+2.0*cross(q.xyz,cross(q.xyz,v)+q.w*v);}
|
||||
void main() {
|
||||
ivec2 size=imageSize(outputImage),pixel=ivec2(gl_GlobalInvocationID.xy);
|
||||
int eye=int(p.anglesEye.w),width=size.x/2;
|
||||
if(pixel.x>=width || pixel.y>=size.y)return;
|
||||
vec2 uv=(vec2(pixel)+0.5)/vec2(width,size.y);
|
||||
vec3 d=normalize(rotate(p.rotation,vec3(mix(p.tans.x,p.tans.y,uv.x),mix(p.tans.w,p.tans.z,uv.y),-1.0)));
|
||||
if(p.originRadius.w>0.0) {
|
||||
vec3 o=p.originRadius.xyz;
|
||||
float b=dot(o,d),disc=b*b+p.originRadius.w*p.originRadius.w-dot(o,o);
|
||||
if(disc<0.0){imageStore(outputImage,pixel+ivec2(eye*width,0),vec4(0));return;}
|
||||
float distance=-b+sqrt(disc);
|
||||
if(distance<=0.0){imageStore(outputImage,pixel+ivec2(eye*width,0),vec4(0));return;}
|
||||
d=normalize(o+distance*d);
|
||||
}
|
||||
float lon=atan(d.x,-d.z),lat=asin(clamp(d.y,-1.0,1.0));
|
||||
vec2 eq;
|
||||
if(p.anglesEye.x>0.0) eq=vec2(lon/p.anglesEye.x+0.5,(lat-p.anglesEye.z)/(p.anglesEye.y-p.anglesEye.z));
|
||||
else eq=vec2(lon/6.28318530718+0.5,lat/3.14159265359+0.5)*p.scaleBias.xy+p.scaleBias.zw;
|
||||
vec4 color=vec4(0);
|
||||
if(all(greaterThanEqual(eq,vec2(0))) && all(lessThanEqual(eq,vec2(1))))
|
||||
color=clamp(textureLod(panorama,p.rect.xy+vec2(eq.x,1.0-eq.y)*p.rect.zw,0.0)*p.colorScale+p.colorBias,0.0,1.0);
|
||||
imageStore(outputImage,pixel+ivec2(eye*width,0),color);
|
||||
}
|
||||
Loaded 100 of 418 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user