Commit Graph
8620 Commits
Author SHA1 Message Date
lbgos fae80cd24b steamvr_drv: validate haptic values before dispatch 2026-10-13 00:31:49 +03:00
lbgos 50cb5533c5 steamvr_drv: fall back to 100 percent on bogus render scale
A zero or negative XRT_COMPOSITOR_SCALE_PERCENTAGE produced a huge
uint32 render target after the float-to-unsigned conversion. Clamp to
the default instead.
2026-10-13 00:31:49 +03:00
lbgos eb6a18d19e steamvr_drv: serialize passthrough toggle edge detection
NotifyButton runs on each controller's RunFrame thread and shared the
rising-edge state unlocked, so simultaneous presses could double-toggle
or tear the menu double-press timestamp. Hold the camera mutex.
2026-10-13 00:31:49 +03:00
lbgos 8e15b31087 steamvr_drv: join drivers and free controllers in Cleanup
Cleanup freed only the HMD driver and left the controllers leaking with
nulled xdev pointers, and a Cleanup without prior Deactivate left pose
threads running into xrt teardown. Deactivate (now idempotent) then
delete everything before destroying the system.
2026-10-13 00:31:49 +03:00
lbgos 4a5313c53b steamvr_drv: keep chaperone universe on unreadable world status
A failed status read decoded as stamp 0 and flipped a localized room
(universe 2) to the session universe (3) until the next poll, yanking
the chaperone mid-session. Ignore unreadable polls instead.
2026-10-13 00:31:49 +03:00
lbgos 8fff58735e steamvr_drv: make pose and watchdog shutdown flags atomic
m_poseUpdating is written on the SteamVR thread and read on the pose
threads, g_bExiting the same across the watchdog thread. Plain bools
are a data race; use std::atomic.
2026-10-13 00:31:49 +03:00
lbgos 908f01f122 steamvr_drv: make pose threads survive deactivate/activate cycles
Deactivate joined the pose thread but left the flag false and the
pointer dangling, so a re-Activate spawned a thread that exited
immediately (frozen poses) and leaked the old thread; a second
Deactivate joined twice and aborted. Reset the flag on Activate,
join/delete/null on Deactivate, and clear stale haptic outputs.
2026-10-13 00:31:49 +03:00
lbgos a040f3d1d5 steamvr_drv: zero-init controller property and skeleton handles
m_ulPropertyContainer and m_skeletal_input_control were read before
Activate assigns them (haptic routing compares the container, RunFrame
tests the skeleton handle). Give them deterministic invalid values.
2026-10-13 00:31:49 +03:00
lbgos bf0a04c036 constellation: fail closed when a model exceeds MAX_OBJECT_LEDS
project_led_points() and project_bounding_points() write into
caller stack arrays sized MAX_OBJECT_LEDS (64) but looped over the
model's uint8_t counts unchecked. Reject oversized models instead
of overflowing the stack.
2026-10-13 00:31:49 +03:00
lbgos 76f4fd6204 constellation: stop zeroing the P3P candidate arena per fallback
joint_p3p_fallback() calloc'd ~300KB (24 full results) on every
invocation. Only count/overflow are read before written, so malloc
plus explicit init is enough.
2026-10-13 00:31:49 +03:00
lbgos 53a1c9f96a constellation: verify P3P candidates in a stack result
joint_p3p_candidate() malloc/free'd a ~12KB result per geometry
verified root. Verify into a stack object and copy only survivors
into the bounded set.
2026-10-13 00:31:49 +03:00
lbgos f2a08eaf4c constellation: reject device adds past CONSTELLATION_MAX_DEVICES
t_constellation_tracker_add_device() guarded the devices[] write with
assert() only, so a release build adding a fifth device would
overflow the array. Return NULL when full instead.
2026-10-13 00:31:49 +03:00
lbgos 501ca420a5 constellation: route P3P sanity-check print through U_LOG_D
check_led_against_model_subset() used printf on the per-frame search
path, bypassing log levels and spamming stdout whenever lambdatwist
returns an inconsistent root. Log at debug level instead.
2026-10-13 00:31:49 +03:00
lbgos 2995c7a7fd constellation: guard blobwatch observation release with bw_lock
sample_free() pushes observations back to the blobwatch queue from
both the fast and the long thread, while process() pops under
bw_lock. Take bw_lock around the release so concurrent free/process
pairs cannot corrupt the queue head/tail and hand one observation
buffer to two samples.
2026-10-13 00:31:49 +03:00
lbgos 42bc93ce99 rift_s: advance JSON offset before a failing queue callback 2026-10-13 00:31:05 +03:00
lbgos e8c8b078e8 rift_s: complete radio and camera error handling 2026-10-13 00:30:42 +03:00
lbgos 94b5fa108e rift_s: check camera mode enumeration and stream start
Unchecked enumerate_modes left modes/count undefined on failure and
an unchecked stream_start returned a camera that never delivers
frames. Fail loudly and free the mode list on the error path.
2026-10-13 00:29:37 +03:00
lbgos 3639b9563c rift_s: fail camera calibration parse on missing/short entry list
A missing CameraCalibration array returned false (== success) and
leaked the JSON root, and a short list left zeroed cameras that the
tracker indexes unconditionally. Require all five.
2026-10-13 00:29:37 +03:00
lbgos 9becb096bc rift_s: guard camera JSON model strings against non-string values
A present-but-non-string Id/Model made GetStringValue return NULL
into strtol/strcmp. Reject it as a parse failure instead.
2026-10-13 00:29:37 +03:00
lbgos d4edd2925c rift_s: handle unset HOME when building the IPD config path
Passing NULL for %s is undefined; leave the path empty (live IPD
updates already treat that as disabled) instead.
2026-10-13 00:29:37 +03:00
lbgos e21fdf33fb rift_s: fix controller index bounds assertion
The || accepted every index (-1 and past-the-end alike), guarding an
out-of-bounds controllers[] access with a check that cannot fail.
2026-10-13 00:29:37 +03:00
lbgos eae62eaca2 rift_s: require a length byte before reading the proximity state
A 1-byte 0x66 report would read buf[1] past the received data.
2026-10-13 00:29:37 +03:00
lbgos 3030d7d3a5 rift_s: validate radio command length and allocation at runtime
The queue length check was assert-only, so release builds would
overflow cmd_bytes on a bad caller. Reject bad lengths and OOM.
2026-10-13 00:29:37 +03:00
lbgos acf69cc808 rift_s: retry radio commands when the HID send fails
A failed send still marked the command pending, so the queue waited
forever for a reply to a packet that never went out.
2026-10-13 00:29:37 +03:00
lbgos 058bd2f4b6 rift_s: require a full radio response header before consuming it
The completion path below asserts ret > 3, but a 2-3 byte read fell
through and was consumed with an uninitialised busy flag. Bail on
short reads to match.
2026-10-13 00:29:37 +03:00
lbgos 8b88a136cf rift_s: validate radio reply length before copying JSON bytes
reply_len is device-controlled; without checking it against the
actual response size the memcpy over-reads the stack response.
2026-10-13 00:29:37 +03:00
lbgos 9c2d0252e3 rift_s: bound firmware block length and check the allocation
block_len comes from the device. Cap it at 1 MiB and handle malloc
failure instead of NULL-dereferencing or truncating len_out.
2026-10-13 00:29:37 +03:00
lbgos 5ba88d5966 rift_s: reject zero IMU rate from device config
rift_s_hmd_handle_report divides 1000000 by imu_hz; a zero rate from
the device would crash with SIGFPE on the first HMD report.
2026-10-13 00:29:37 +03:00
lbgos 0980d3c808 rift_s: validate inputs before dereferencing in report parsers
Both report parsers read buf[0] before any NULL/size check. Reject
NULL buffers and empty packets first.
2026-10-13 00:29:37 +03:00
lbgos 8e8cdbb450 rift_s: clamp controller report trailing bytes to extra_bytes
data_len is device-controlled; unparsed trailing bytes could exceed
the 48-byte spill buffer and smash the stack. Keep what fits.
2026-10-13 00:29:36 +03:00
lbgos 8376cac447 Install Settings with a native launcher for the current build 2026-10-12 23:57:26 +03:00
lbgos 3d10d41aac Configure native WebKit rendering before loading Settings 2026-10-12 23:11:33 +03:00
lbgos 57560f9f37 Sample acquired overlay images without transfer-source assumptions 2026-10-12 22:54:50 +03:00
lbgos e45a676936 Add Vulkan overlay-view preview to Rift S Settings 2026-10-12 22:47:53 +03:00
lbgos a2fefca89c Pause off-head exposure writes and retry failed camera updates 2026-10-12 16:59:37 +03:00
lbgos ace645bc95 Prepare an unbounded session origin before native SteamVR startup 2026-10-12 16:59:37 +03:00
lbgos 1545a37319 Restore validated controller bias and capture confirmed initial tilt 2026-10-12 16:56:27 +03:00
lbgos fd744f411a Pool camera matches in gravity-aware room recovery 2026-10-12 16:44:33 +03:00
lbgos 405abf14d7 Keep Settings on native VR View after GL mirror import stalls presentation 2026-10-12 00:47:29 +03:00
lbgos a9aee8a684 Retain native room recognition diagnostics while the headset is worn 2026-10-12 00:29:27 +03:00
lbgos 43ebc19a06 Exercise installed Basalt defaults in the complete test suite 2026-10-12 00:23:31 +03:00
lbgos e373caa0b1 Record cold acquisition timing in native SteamVR logs 2026-10-12 00:19:09 +03:00
lbgos 2966b3eaf1 Keep Rift S controllers uninitialized before optical acquisition 2026-10-11 22:19:46 +03:00
lbgos e078018041 Find installed Basalt without a Steam launch override 2026-10-11 22:13:37 +03:00
lbgos 855ccd6a3c Use observed VIO history for room-map camera exposures 2026-10-11 21:54:35 +03:00
lbgos 1a779622d7 Document automatic SteamVR registration and ordinary Steam launch 2026-10-11 21:51:52 +03:00
lbgos b06c2a3f4d Keep the mirror GLX context on one thread and render settings on Wayland 2026-10-11 21:46:47 +03:00
lbgos 55e27157ee Sync the verified Rift S r25 runtime and tracking fixes 2026-10-11 21:45:52 +03:00
lbgos 8073a7f104 Register Rift S automatically in Steam user sessions 2026-10-11 21:43:22 +03:00
lbgos 8c13ac33e4 Render the native SteamVR compositor mirror in settings 2026-10-11 21:24:53 +03:00