Commit Graph
155 Commits
Author SHA1 Message Date
spoopyghosty0 0df0bd16b5 hevc: tone map HDR (PQ/HLG) Main 10 to SDR BT.709 instead of flat colours
The software Main 10 path narrowed HDR10 pictures to 8 bits as they were, so
PQ shown as SDR looked grey and BT.2020 colours dull. hdr_tonemap.h maps
brightness with BT.2390's EETF (203 cd/m2 reference white = SDR white,
highlights rolled off up to MaxCLL / the mastering peak / 1000 cd/m2) and
converts colour per chroma sample through linear light into BT.709, moving
out-of-gamut colours toward grey of the same luminance. The component then
prefers its bitstream colour aspects, so surfaces and its RGBA conversion see
BT.709. Bands run in the colour helper threads (about 10 ms per 1080p picture
on one big core). Decoder revision 10; artifacts rebuilt with build.py.
2026-10-19 12:41:20 -04:00
Veticia Misumena 7128432e39 hevc: decode Main 10 in software instead of hanging on Iris
Iris on the Frame's kernel (6.18) offers HEVC Main 10 only into its
compressed Q10C capture format. The component always asks for NV12, and a
Main 10 stream in such a session returned no pictures: playback stayed at
0:00, the flush on leaving timed out (ACodec -110) and the next video hit
MediaCodec::reclaim, so every later decoder start in the app failed until it
restarted (seen in Bigscreen Beta with local files over DLNA).

- hevc_profile.h reads general_profile_idc from the parameter sets
  (CODECCONFIG or the first access unit, Annex B or hvcC); streams beyond
  Main never open Iris and decode in FFmpeg's software HEVC decoder, which
  the component already contains.
- Its 10-bit planar pictures are rounded to 8-bit planar before the existing
  outputs (no HDR tone mapping).
- The HEVC component lists Main 10 (level 5.1), so format-aware players
  select it instead of reporting NoSupport and using it anyway.
- Decoder revision 9; artifacts rebuilt with native/hevc/build.py (the same
  toolchain rebuilds revision 8 byte for byte).

Tested on a Steam Frame in Bigscreen Beta: 1080p and 4K Main 10 clips and a
real 1080p Main 10 episode play; 8-bit HEVC and H.264 afterwards play too.
FFmpeg's software HEVC decoder on the Frame's CPU, 4 threads as the
component uses: 1080p Main 10 episode 232 fps, synthetic 4K Main 10 72 fps.
2026-10-19 12:22:36 -04:00
spoopyghosty0 b65abb4b95 Room scanner: refinement + label rules after the mesh (raw files, scan.json, --refine-only)
The owner's tuned room-scan cleanup (2026-10-18) ported to C, pass for pass: plane offsets re-estimated from the
scan, one-sided structural bands, flat wall/floor/ceiling panels (or snap), near clearing, erase spheres, the walked
volume from the recording's head path, furniture tops, clipping with the unseen-edge allowance, islands, thin
floating pieces, Taubin smoothing; label rules on the scanner's volumes (merged/nested/outside boxes removed, shape
relabelling, SCREEN flatness from the raw mesh, door/closet suggestions in scan.json).

room.txt + room-mesh.bin are now refined (ceiling re-estimated); the unrefined output stays as room-raw.txt +
room-mesh-raw.bin with the same UUIDs; scan.json holds heads, settings, report, labels, suggestions. The scan path
refines its raw files as read back, so --refine-only on them reproduces the scan byte for byte; --refine 0 writes
the old output. The fusion grid is freed before the refinement (peak memory unchanged).
2026-10-19 00:23:22 -04:00
spoopyghosty0 e231c5a6fe scene: drop PR #246's per-call semantic-label log line (it logged every call; mr-scene logs each entity's labels once), as in the PR's merge 2026-10-19 00:23:18 -04:00
spoopyghosty0 7a65e86cdc FrameBridge layer limit: FrameBridge's own fade quad is always kept with the projection layers, the app's other layers fill the rest in submission order; one log line per trim (at most 5), trimmed layers no longer counted as unusable 2026-10-19 00:23:15 -04:00
spoopyghosty0 0a542d849e xrshim: emulated functions again only for a real instance (OpenXR: XR_NULL_HANDLE serves only the pre-instance functions; with mr-scene the shim would otherwise hand out the routed xrPollEvent/xrLocateSpace) 2026-10-19 00:23:13 -04:00
alicecatpaw a0c26c9646 Emulate Meta spatial entity discovery and enforce runtime layer limits
- Emulate XR_META_spatial_entity_discovery (xrDiscoverSpacesMETA, xrRetrieveSpaceDiscoveryResultsMETA) and XR_META_boundary_visibility
- Add system properties for space discovery and boundary visibility
- Fix semantic labels length and null termination
- Allow xrGetInstanceProcAddr with null handle for emulated procs in xrshim
- Trim composition layers exceeding runtime maxLayerCount in xrEndFrame and validate quad extents
- Hook xrshim when scene_emul is enabled in adapter settings
- Update prebuilt native artifacts and checksums
2026-10-19 00:23:12 -04:00
spoopyghosty0 05344906ef MR diagnostics: log room-entity locates (base space, flags; every one without both valid bits): MRUK keeps an anchor pending forever otherwise (Pinball FX's load never succeeds) 2026-10-19 00:23:10 -04:00
spoopyghosty0 94ece1a232 MR scan on request (FrameBridge): a capture request asks FramePort to scan (request/ack/result files), holds the completion, reloads the scanned room on ok, fails with XR_ERROR_RUNTIME_FAILURE otherwise, falls back to the stored room without a scanner (setting scene_scan_request, default on) 2026-10-19 00:23:10 -04:00
spoopyghosty0 3298c5f64d MR: scene capture completes after 1.5 s like a real scan (Pinball FX re-asked at once); log each room query per entity and the labels an app gets (with its support info) 2026-10-19 00:19:18 -04:00
spoopyghosty0 087ad75f47 MR: shim-routed generic calls handle only fake room spaces and room events; real ones go to OVRPort's dispatcher (its headset identity, events and controller spaces were skipped for every scene_emul game: Vermillion's controllers, NOPE) 2026-10-19 00:19:18 -04:00
spoopyghosty0 460c503e43 MR diagnostics: log the head against the floor outline when a game looks for the room (MRUK's current room; Pinball FX asks for a scan again and again) 2026-10-19 00:19:17 -04:00
spoopyghosty0 3687a6eb0d MR: Meta scene/anchor permissions with every scene_emul recipe (migration scene_permissions; NOPE/Pinball never asked for the room), emulate XR_META_boundary_visibility, log the app's passthrough calls 2026-10-19 00:19:17 -04:00
spoopyghosty0 e07441fb09 MR: hiding the STAGE bounds becomes per-game setting scene_hide_bounds (Demeter on; NOPE stalled on a black screen without a play area) 2026-10-19 00:19:16 -04:00
spoopyghosty0 7971354675 MR: hide the STAGE bounds from scene-emulation apps (OVRPlugin can't outline the Frame's 1x1 m rect: Demeter's guardian check threw), box walls in loop order 2026-10-19 00:19:15 -04:00
spoopyghosty0 c3144f65dd MR: room entities offer SHARABLE like Meta's runtime; log refused scene components (Demeter rejected the room) 2026-10-19 00:19:15 -04:00
spoopyghosty0 210d6e80c5 MR: rooms older Meta SDKs accept (labels as Meta's runtime maps them, GLOBAL_MESH only with the mesh extension), rectangular rooms from perpendicular walls, ceilings found after a short look up, 60 s minimum scan 2026-10-19 00:19:15 -04:00
spoopyghosty0 d48dcaba4e Fit stable room surfaces from smoothed depth fans 2026-10-19 00:18:58 -04:00
spoopyghosty0 f68c7f4232 Skip unusable tracking frames and reject inpainted depth 2026-10-19 00:18:58 -04:00
spoopyghosty0 0e41e1fcca Validate room scanning geometry and harden bounded reconstruction 2026-10-19 00:18:56 -04:00
spoopyghosty0 bbb05cfc0b Add offline room reconstruction and synthetic depth renderer 2026-10-19 00:18:44 -04:00
spoopyghosty0 e8eea8548c MR: scan the room in the headset - RoomView 3D capture with headset prompts, wall labels, agent 92
The agent records Valve's passthrough depth mesh (IVRBlockQueue + IVRPaths, Background/Overlay OpenVR app), converts
poses with the final raw->standing transform, shows pre-rendered prompts as a SteamVR overlay, then builds the room
with fp_roomscan (room_capture / room_capture_status). PC: rooms.scan, Frame page progress, frameport frame room scan.
FrameBridge reads the optional wall label (INVISIBLE_WALL_FACE). ROOM_FORMAT: outline orientation stated exactly.
2026-10-19 00:18:42 -04:00
spoopyghosty0 577b72969a Verify shim routing and protect erased or stale scene handles 2026-10-19 00:17:34 -04:00
spoopyghosty0 11ccdb7fac Test room geometry discovery persistence and malformed data on the host 2026-10-19 00:17:33 -04:00
spoopyghosty0 7fe604dbec Report scanned room or guardian box on scene capture requests 2026-10-19 00:17:33 -04:00
spoopyghosty0 2306b2e788 Route all emulated scene APIs and fake space consumers through the shim 2026-10-19 00:17:33 -04:00
spoopyghosty0 65b39a51ca Persist random UUID application anchors across sessions 2026-10-19 00:17:32 -04:00
spoopyghosty0 8473fe429e Add META discovery and persistence entry points and events 2026-10-19 00:17:32 -04:00
spoopyghosty0 3586d520d3 Expose room polygons volume bounds and triangle meshes 2026-10-19 00:17:32 -04:00
spoopyghosty0 79f60057fa Load scanned STAGE room files and bounded mesh sidecars 2026-10-19 00:17:31 -04:00
Codex 25db57f468 Fix #387: pool GLES panel swapchains before the runtime count limit
Add opt-in swapchain_pool with private GLES images and up to two packed
runtime atlases. Start at eight live app runtime swapchains to reserve
headroom before the session cap. Preserve image ownership, GL state,
source fences, crops and the existing cylinder/equirect layer ordering.

Enable for 4XVR, add count-limit triage without unknown suggestions for
older apps, and document the pending headset menu check. Leave default
recipes and adapter revisions unchanged. Rebuild arm64/arm32 artifacts.

Validation: 132 targeted tests passed (2 skipped), including the native
runtime/GL harness; Ruff and generated docs pass. Full host suite:
2095 passed, 137 skipped, 12 failures and 16 setup errors, all denied
socket creation in this sandbox. No headset validation or push.
2026-10-19 00:04:16 -04:00
Codex bd2a742356 Route embedded Khronos OpenXR loaders through FrameBridge
Detect and redirect static loader manifests and Android brokers, ship a runtime negotiation shim and the inner loader chain, and maintain per-game manifests on install and launch. Add the PrimedGun recipe, triage and host coverage.
2026-10-19 00:03:49 -04:00
spoopyghosty0 d0a2d89c92 Keep opt-in OpenXR layer recommendations at full swapchain resolution (#406)
Route OVRPlugin recommendations through the existing extension shim, retain native loader hooks, and log projection rect changes once per second per eye. Enable the fix for Batman, document verification, and rebuild both adapter architectures.
2026-10-19 00:03:20 -04:00
spoopyghosty0 d801ff6bc8 Controller buttons: second button up and toward the other hand like Quest (Quest pair: Y = d-pad right, B = X; Mirror follows); d-pad touch is one sensor 2026-10-18 09:23:52 -04:00
spoopyghosty0 33bb14e034 FrameBridge: cube-only frames as quads (#385); CI: lint, foveation test
HardBullet's loading frames submit only a cube layer, which the Frame's runtime doesn't composite, so the loading
screen stayed black. Adapter setting cube_quads (default on) draws a cube-only frame's six faces as quad layers
around the viewer; frames with a projection layer are unchanged. Adapter rebuilt on current main.

Also: the foveation test expected a numeric FOVE_LEVEL to pass through (Valve's layer ignores numbers since #394),
a long description line and an import order in adapter_dialog.py failed lint.
2026-10-17 21:52:39 -04:00
spoopyghosty0 b42d85d7c4 Fix Frame binding ownership and accepted Touch translation 2026-10-17 21:36:41 -04:00
spoopyghosty0 1f64d089e1 quest_buttons: bare trigger/squeeze/button paths map too (OpenXR resolves them to value/click) 2026-10-17 21:36:37 -04:00
spoopyghosty0 1f27cd47a3 Rebuild adapters and cover binding suggestion failures 2026-10-17 21:36:18 -04:00
spoopyghosty0 ff592e41e8 Add opt-in Quest controller bindings for Frame 2026-10-17 21:36:17 -04:00
spoopyghosty0 d02ff3c9aa Vulkan shim: leave out Lepton's Fossilize layer, blank shaders for refused pipelines (#349)
Transformers Beyond Reality: Redux ended its first frames with Unreal's "Shader compilation failures are
Fatal." With Lepton's Fossilize layer loaded every graphics pipeline failed with
VK_ERROR_OUT_OF_HOST_MEMORY, even a constant-colour one; the pipeline cache, the app's CPU allocator and
Valve's FDM/RPO layers were ruled out on the device. Without Fossilize a few multiview vertex shaders
still fail in Turnip.

- adapter.vk_no_fossilize: the shim removes VK_LAYER_fossilize from GraphicsEnv's debug layer list when
  the engine loads it (library constructor, same GraphicsEnv calls as zinkfix)
- adapter.vk_pipeline_fallback: a refused graphics pipeline is created again with a blank fragment
  shader, then blank vertex + fragment shaders
- catalog entry (status unknown, headless only), triage vulkan-pipeline-refused, PLAYBOOK, DEVICE_NOTES

Headless on the dev Frame: RUNNING after 78 s at 72 fps (was: exit within 21 s). Headset check pending.
2026-10-17 21:34:00 -04:00
spoopyghosty0 5e668f33d3 Batman audio hooks: place stubs in verified free gaps, say which step failed
On the Frame the atomic-branch detours never installed ("installation failed"): an mmap hint isn't honoured,
so the stub landed out of B range. Stubs now go into free gaps from /proc/self/maps within +-128 MiB of the
entry, mapped with MAP_FIXED_NOREPLACE (a relocated result is rejected); no gap = no hook. Every failure logs
the target and the failing step.
2026-10-17 16:47:06 -04:00
spoopyghosty0 feb4658dde Batman audio hooks: publish detours with one atomic branch (#389, #34)
The detour helper from PR #34 (used by the metadata hook and PR #389's two geometry hooks) wrote a 16-byte
branch + literal in two steps while game threads may run the function (installation is retried from
xrPollEvent). Each hook now publishes a single aligned release-atomic AArch64 B to a stub within +-128 MiB;
the trampoline replays the one verified instruction and returns to entry+4. Every mprotect is checked;
failures before publication free the stub and trampoline and leave the function untouched; no stub in range =
no hook. Adapter artifacts rebuilt by us (the PR's binary isn't shipped).
2026-10-17 16:47:06 -04:00
Lucas-Mathieu 78fc926a48 Fix Batman audio geometry input lifetime across background loading 2026-10-17 16:47:05 -04:00
spoopyghosty0 1e1c435191 Headset model per game, Quest 3 by default (#373)
Games saw a Quest 2: OVRPort's dispatcher hardcodes the system name "Oculus Quest2" and a Quest 2
headset UUID (XR_META_headset_id), and OVRPlugin decides the headset type from the UUID first, then the
name. device.headset_model (Customize; Quest 3 default for every Quest game, also Quest 3S, Quest Pro,
Quest 2) rewrites both in the dispatcher after checking the original bytes; Quest 2 leaves the build
byte-identical. FrameBridge reports the same name to games that call the runtime directly. A library
migration adds the default to existing recipes (installed games show Update on Frame).
Lepton's ro.product.model ("Lepton") can't be overridden by boot properties, so Build.MODEL is unchanged.

Verified on the Frame: OVRPlugin logs "systemName Meta Quest 3" (was "Oculus Quest2").
2026-10-17 15:18:45 -04:00
spoopyghosty0 7d4e20844f FrameBridge: XR_FB_color_space for games that require it (#336)
OutRun Quest VR quits before its VR session with "Rec.709 color space unavailable": the Frame's runtime
has no XR_FB_color_space. Adapter setting fb_color_space (off by default; triage color-space-missing
suggests it) offers the extension when the runtime lacks it, reports Rec.709 and accepts any colour
space without converting. OVRPort's dispatcher can't forward the new functions, so it isn't on for every
game. Not yet tried on the device.
2026-10-17 14:56:59 -04:00
spoopyghosty0 9772b9a17f Vulkan shim: vk_pipeline_log diagnostics (failing pipeline creations, Y'CbCr conversions; GitHub #349) 2026-10-17 02:19:08 -04:00
spoopyghosty0 542e54882d Add opt-in dispatcher-level Quest Vulkan foveation suppression 2026-10-17 02:19:06 -04:00
spoopyghosty0 8986aa7040 FrameBridge: answer xrGetDisplayRefreshRateFB with the real rate (PreyVR black menu, #306)
The Frame's runtime has no XR_FB_display_refresh_rate (-7); OVRPort's dispatcher still
offers it and answered 0 Hz. Team Beef's idTech 4 ports run USERCMD_MSEC = 1000 / refresh,
so PreyVR had 0 ms tics: the async thread spun (~1.9M tics/s), com_frameTime stayed 0 and
the main menu's timeline never got past its first step (black backdrop + cursor only).
FrameBridge now always answers with 1 / predictedDisplayPeriod (else the refresh_rate
setting, else 72 Hz). Headless: menu drawn (snapshot mean 68 vs 0.1 before), clocks advance.

- glmv: gl_mv_debug=2 traces draws (state, GL errors per framebuffer), failed texture
  uploads/copies/compiles and idTech 4 clocks; how this was found
- triage: a single xrEndFrame -16 is info, not the black-menu error it was blamed for
- PLAYBOOK row, CLAUDE.md fact, host test for the fallback rate
2026-10-17 02:19:00 -04:00
spoopyghosty0 a1dd3bc7b6 adapter: snapshots fall back to a quad/cylinder layer and log brightness
Frames without a projection layer (e.g. PreyVR's menu, a cylinder layer only) gave no snapshot. The snapshot now
takes the first quad/cylinder layer's image instead and logs the layer type, image area, array index and the mean/max
brightness of the submitted area, so a black image shows in the log without fetching the file (#306).
2026-10-17 02:18:58 -04:00
spoopyghosty0 2e1622c56b FrameBridge: unique controller action names (#323)
Scared By Squares (Unreal 4.27, OpenXR) creates two actions named "turn"
(an action mapping and an axis mapping called Turn). The Frame's runtime
accepts the duplicate, then vrserver fails to load the input manifest it
builds ("SetXrInputConfig failed. Failed to load manifest"), drops the
app's connection and treats it as exited: black, then the home environment
while the game keeps running with sound. Headless the app reconnected as a
plain OpenXR instance, got throttled to 10 fps and the compositor received
no presents.

- action_dedup (adapter setting, default on): a later duplicate action name
  or localized name in a set is created as "<name>_N" / "<Localized> N"
  (native/adapter/action_names.h, host-tested). Headless on the dev Frame:
  manifest loads, 72 fps, 2808 presents in 45 s (before: 10 fps, none).
- input_diag logs every action set and action (escaped names).
- force_render (hidden diagnostic): xrWaitFrame reports shouldRender=TRUE so
  headless runs exercise engines that skip layers when not visible; FrameBridge
  logs shouldRender changes.
- Triage: space-warp-used only on the motion-vector swapchain (format 97);
  D24S8 (129) eye depth falsely matched. New info finding duplicate-action-renamed.
- Catalog entry (status unknown, min_app 1.2.1), PLAYBOOK row.
2026-10-17 02:18:56 -04:00