Compare commits

...
Author SHA1 Message Date
Patrick Nicolas b0c05813fe Prepare v26.11 release
Release APK Only / Android (Release) (push) Failing after 37m19s
Release APK Only / Android (Debug) (push) Failing after 37m22s
Release APK Only / Android (DebugWithValidationLayer) (push) Failing after 37m23s
Release APK Only / Create APK release (push) Skipped
Build / Linux (map[packages:extra-cmake-modules libarchive-dev libboost-all-dev libkf6coreaddons-dev libkf6qqc2desktopstyle-dev libkf6iconthemes-dev libkirigami-dev librsvg2-dev nlohmann-json3-dev qcoro-qt6-dev qml6-module-org-kde-kirigamiaddons-formcard prese… (push) Waiting to run
Build / Linux (map[packages:libboost-all-dev libsystemd-dev preset:server-tracing]) (push) Waiting to run
Build / Linux (map[packages:libboost-all-dev libsystemd-dev preset:server]) (push) Waiting to run
Build / Linux (map[packages:libboost-all-dev preset:server-no-systemd]) (push) Waiting to run
Build / Linux (map[packages:libboost-all-dev wireshark-dev preset:dissector-no-system-boost]) (push) Waiting to run
Build / Linux (map[packages:libharfbuzz-dev libfreetype-dev libavcodec-dev libavutil-dev libswscale-dev librsvg2-bin gettext libcurl4-openssl-dev libfontconfig-dev libpipewire-0.3-dev preset:client-no-system-boost]) (push) Waiting to run
Build / Linux (map[packages:libsystemd-dev preset:server-no-system-boost]) (push) Waiting to run
Build / Steam Frame (push) Waiting to run
Build / Create release (push) Blocked by required conditions
Build / Sync fork downstream (push) Blocked by required conditions
Build / Linux server (flatpak) (push) Skipped
Build / Test Nix package and devshell (push) Skipped
Build / Android (Debug) (push) Skipped
Build / Android (DebugWithValidationLayer) (push) Skipped
Build / Android (Oculus) (push) Skipped
Build / Android (Release) (push) Skipped
Build / Build Ubuntu package (plucky) (push) Skipped
Format / Formatting check (client) (push) Skipped
Format / Formatting check (common) (push) Skipped
Format / Formatting check (dashboard) (push) Skipped
Format / Formatting check (server) (push) Skipped
Format / Formatting check (tools/wireshark) (push) Skipped
Format / Python lint (ruff) (push) Skipped
Locales / Locale check (push) Skipped
2026-11-28 08:57:11 +01:00
Patrick Nicolas c8e74a3430 Fix secrets initialization 2026-11-28 08:47:30 +01:00
galister 0f020f2bb6 desktop file for linux client 2026-11-28 08:45:06 +01:00
guideahon b470b13dfc Clarify full WiVRn version strings 2026-11-27 13:51:57 +01:00
guideahon c5932f6ed9 Clarify WiVRn protocol compatibility 2026-11-27 13:51:57 +01:00
Sapphire 15b5ed07e1 Support Steam appinfo v42 (sharded) format 2026-11-27 02:58:57 -05:00
ZokuTe 2529e0bfa0 Update Simplified Chinese localization & Fix non-honorific pronouns for certain individuals. close #599 2026-11-24 09:38:54 +01:00
Patrick Nicolas dd472aee25 Workaround for source_group error
CMake Error at cmake-fetch/boost-src/libs/locale/CMakeLists.txt:236 (source_group):
  source_group
  "/home/runner/work/WiVRn/WiVRn/cmake-fetch/boost-src/libs/locale/include/boost/locale"
  is not a prefix of file
  "/home/runner/work/WiVRn/WiVRn/cmake-fetch/boost-src/libs/locale/include/boost/locale.hpp"
2026-11-23 15:25:22 +01:00
schlegp 04837ba215 Add Vulkan AV1 video encoder (#1087)
Experimental support, is never automatically selected.
2026-11-16 17:24:08 +01:00
TommiTheFirst 540d95ae7e Replaced custom bitcast with std::bit_cast 2026-11-16 15:57:57 +01:00
galister 47651c00e8 v4l2_decoder: 10-bit only if p010 capture supported 2026-11-16 21:30:12 +09:00
Patrick Nicolas 63700f05fa Fix buffer overflow when creating listen socket 2026-11-15 10:04:16 +01:00
Patrick Nicolas 4d782f7370 Set higher priorities for pipewire devices 2026-11-13 19:44:09 +01:00
Sapphire ea57db02f4 Add missing #pragma once to android USB header 2026-11-12 15:25:34 -05:00
Sapphire 7bb6f7c866 Allow changing log level on Android 2026-11-12 15:25:34 -05:00
Jonathan Steffan c26740b62d Merge pull request #1206 from damaestro/ci-ccache-fixes
ci: fix ccache effectiveness for Linux and Android builds
2026-11-11 21:40:33 -07:00
Sapphire e98e28fedc Change real panel size log to debug 2026-11-11 17:39:13 -05:00
Sapphire d3d15fab4c Make sure view is scaled for GUI render resolution display 2026-11-11 17:26:49 -05:00
Sapphire 6be331fbaa Fix Android battery change log condition 2026-11-11 16:23:54 -05:00
Sapphire 64ecbdc24b Move battery handling into dedicated monitor class 2026-11-11 16:23:54 -05:00
Sapphire 2233817b59 Forward controller battery info via XR_EXT_interaction_profile_battery_state_display 2026-11-11 16:23:54 -05:00
Sapphire aba0210923 Bind Frame bumper click to trigger as well for GUI interactions 2026-11-11 16:23:54 -05:00
Sapphire 86bbb80f90 Reorder some inputs and fix comments 2026-11-11 15:56:13 -05:00
Sapphire f4358ebe85 Reuse menu ID for view button, give left system click a distinct ID 2026-11-11 15:56:13 -05:00
Sapphire 4049f2125a Remove superfluous subpaths from Frame interaction profile patch 2026-11-11 15:56:13 -05:00
Sapphire 235eac73c2 Add missing hand interaction poses for Frame left/right bindings 2026-11-11 15:56:13 -05:00
Patrick Nicolas 1540df2e6b Add -fno-finite-math-only 2026-11-11 20:22:01 +01:00
Jonathan Steffan 70282d57fd ci: fix ccache effectiveness for Linux and Android builds
- Disable CMake module scanning, which made compilations uncacheable.
- Linux: trailing "." on cache key so one preset's key is not a prefix of
  another's.
- Android: add ccache (action, CCACHE_BASEDIR, gradle compiler launcher).
- Save cache on master only; evict files unused by the job.
2026-11-11 11:19:21 -07:00
Patrick Nicolas 7f9957ae79 Fix incorrect resolution show in stream settings 2026-11-11 12:00:26 +01:00
Sapphire 869b0ce660 Fix swapped Frame dpad buttons 2026-11-05 20:21:37 -05:00
Jonathan Steffan 6adb188c15 fix(ci): use archive sources instead of git clones for flatpak 2026-11-04 09:46:36 +01:00
Patrick Nicolas bae0cc3326 reimplement pico view locate quirk
note: stream_tracking should be ported to use the same code
2026-11-04 08:17:37 +01:00
Patrick Nicolas 32d4fee95e Fix warped image when growing the swapchain 2026-11-03 21:06:40 +01:00
BlackCherryCat 49b4ab96c6 Update es locale 2026-10-28 22:16:03 +01:00
Cláudio 'Patola' Sampaio 81006f06e9 new pt-br strings + fix for grip button name 2026-10-28 15:54:05 +01:00
Patrick Nicolas 9d821cad3f FR locale 2026-10-27 23:08:12 +01:00
Patrick Nicolas 500a60b685 Only ask actual hand tracking in lobby 2026-10-27 22:08:34 +01:00
Patrick Nicolas 8c5afd9a27 Reduce calls to instance.now() 2026-10-27 22:08:23 +01:00
galister f91b68491d refactor menu_toggle 2026-10-27 22:08:23 +01:00
galister 1f8e5afcf0 refactor chord_state 2026-10-27 22:08:23 +01:00
galister 528f8e7246 frame: gamepad emulation 2026-10-27 22:08:23 +01:00
Patrick Nicolas 64ae13e293 Add quirk for FS2020 2026-10-27 18:42:28 +01:00
Reina_Sakiria 44c64ba866 fix: d-pad up and left input do not work 2026-10-26 19:01:16 +01:00
Patrick Nicolas 5d69e391e4 Fix crash when loading Steam games on flatpak 2026-10-25 23:22:33 +01:00
Patrick Nicolas 4c7d57bd6d Don't rely on steamapps.vrmanifest
The file seems to no longer be updated by Steam.
Instead, read installed games from libraryfolders.vdf, owned games from
user's localconfig.vdf and data from appinfo.vdf
2026-10-25 20:45:42 +01:00
Patrick Nicolas edb1bf25ad Don't crash on systemd unit result 2026-10-25 08:57:52 +01:00
Patrick Nicolas b6bc602c5b Add AGENTS.md 2026-10-24 11:24:45 +02:00
Patrick Nicolas 8a075da1e4 Add CONTRIBUTING.md 2026-10-24 11:21:55 +02:00
Patrick Nicolas 75e2df579c Don't log warning when x264 is selected by user 2026-10-23 19:41:14 +02:00
Patrick Nicolas 170fb06d01 Disable XR_MSFT_unbounded_reference_space 2026-10-22 21:38:58 +02:00
sunryze a74622bd78 Fix quaternion sign alignment of replaced samples 2026-10-22 20:20:02 +02:00
galister 76da2e1cb7 client: support XR_META_foveation_eye_tracked (#1123) 2026-10-22 18:52:55 +02:00
Sapphire 2e60fa75e4 flake: Update inputs 2026-10-18 20:17:10 -05:00
Sapphire cf344e8709 flake: Add ninja to native build inputs 2026-10-17 19:02:37 -05:00
Patrick Nicolas f0fa8613af Save selected virtual trackers 2026-10-17 20:49:58 +02:00
Patrick Nicolas e599b381ec Don't use CMakeLists.txt for flatpak cache entry 2026-10-16 19:45:01 +02:00
Patrick Nicolas ae3d6cffa9 Sync github action image for flatpak build 2026-10-16 19:44:43 +02:00
Patrick Nicolas 3c2e5f66a6 Flush pw streams on destroy 2026-10-16 18:30:38 +02:00
Patrick Nicolas a98410bae0 Forward hand tracking data source 2026-10-16 18:30:38 +02:00
Patrick Nicolas 7d610b2959 Skip rendering on invalid view state 2026-10-16 18:30:38 +02:00
Patrick Nicolas 85c1935849 Allow URI to be provided for Linux client
ex: wivrn wivrn://:123456@localhost
2026-10-16 18:30:38 +02:00
Patrick Nicolas 80c899efdf Disable some more Monado drivers 2026-10-16 08:03:21 +02:00
Patrick Nicolas 879c50c743 Add back unused-variable warning 2026-10-16 08:03:21 +02:00
Jonathan Steffan 650ca30874 chore: update monado to 8b259763 2026-10-15 23:00:44 +02:00
Jonathan Steffan b8e24d7677 chore: update monado to be69de9e2, handle new xrt_view_type values 2026-10-15 23:00:44 +02:00
Jonathan Steffan 61abaf44e2 chore: update monado to a6a580491, use math_quat_exp_so3 2026-10-15 23:00:44 +02:00
Jonathan Steffan 75d76f1a77 chore: update monado to f07dd1348, drop upstreamed patch 0009 2026-10-15 23:00:44 +02:00
Patrick Nicolas bc3e374b96 Fix dashboard install without setting the prefix 2026-10-11 10:11:03 +02:00
Patrick Nicolas dc14ced68f Update xrizer to 0.6 2026-10-08 22:34:26 +02:00
Philip Poloczek 640e1a5405 client: don't hold a strong stream reference while creating decoders
shard_accumulator only keeps a weak_ptr to the stream, but setup() passed
it a temporary from shared_from_this(). setup() runs on the network
thread, so if the main thread drops its reference meanwhile (e.g. while
shutting down after XR_ERROR_INSTANCE_LOST), that temporary is the last
one and ~stream runs on the network thread. It then joins
network_thread from itself: std::system_error (EDEADLK) and
std::terminate.

Pass weak_from_this() instead so no strong reference is created.
2026-10-07 13:24:15 +02:00
Patrick Nicolas ab63b0503e Fix theoretical wraparound 2026-10-07 07:54:49 +02:00
Patrick Nicolas fd33697e2b Bump ruff github action 2026-10-06 19:25:41 +02:00
Patrick Nicolas 0e0de41153 reformat for clang-format < 23 2026-10-06 19:25:41 +02:00
Patrick Nicolas c4e5f4cfd2 bump clang-format 2026-10-06 19:25:41 +02:00
Patrick Nicolas 2fc4708bc6 Rework vaapi/nvenc/x264 IDR handling
Fix race conditions with should_skip
detect if nothings goes out from decoder and issue an IDR
remove idr_received, go directly to running state
2026-10-05 22:27:15 +02:00
orange 4ea97485cc Refine Japanese posture descriptions and processing label 2026-10-05 16:33:42 +02:00
orange 0f69fc70e4 Update Japanese translations and fix misleading UI text 2026-10-05 16:33:42 +02:00
Jonathan Steffan 59e4fb075e fix(htc): stop interaction-profile flapping and fix squeeze-touch binding
Blacklist XR_EXT_hand_interaction for HTC so the runtime can't switch
/user/hand/* to ext/hand_interaction_ext mid-session, which drops
controller button input whenever that profile is briefly active.

Point the Focus3 squeeze/touch binding at XRT_INPUT_FRAME_SQUEEZE_TOUCH,
the name the device actually exposes for that slot, instead of a name
that's never set active.
2026-10-05 09:36:37 +02:00
Patrick Nicolas fc48b6155e Assume user is present on session resume 2026-10-03 14:57:22 +02:00
Patrick Nicolas 833004f18c Fix outdated docs 2026-10-03 14:26:39 +02:00
Patrick Nicolas e8c92a7202 Prevent fragmentation when adding timing info 2026-10-02 18:53:16 +02:00
Sapphire 7e0bf5efc1 flake: Remove GIT_* CMake flags set by package
Fixes error in configure when using newer nixpkgs.
2026-10-01 20:06:40 -05:00
Sapphire 3136066aa9 flake: Format with nixfmt 2026-10-01 19:49:42 -05:00
Sapphire 5f604e1fc3 flake: Only add curl and ktx-tools to buildInputs for devshell 2026-10-01 19:45:19 -05:00
konsti219 0d9e6e121a linux client: add battery reporting 2026-10-01 23:19:53 +02:00
ckaznable 1b0d13c431 Update zh_TW locale 2026-10-01 08:03:10 +02:00
Patrick Nicolas 9c51adae1d FR locale 2026-09-30 23:45:01 +02:00
BlackCherryCat 3e73d98ae2 Update es locale 2026-09-30 09:25:39 +02:00
Cláudio 'Patola' Sampaio 81d8bd13d9 Translated strings about boundary and posture to pt-br 2026-09-30 07:57:24 +02:00
moi952 85f6cb0bd9 feat(client): add per-posture player height offset setting (#1121) 2026-09-29 23:21:55 +02:00
Nova a083901bdc fix: add android manifest permission for boundary 2026-09-29 21:52:44 +02:00
Nova 25e0316792 refactor(boundary): affirmative instead of subtractive 2026-09-29 21:52:44 +02:00
Nova 66b095d164 fix: update openxr version 2026-09-29 21:52:44 +02:00
Nova d2b7cc898f feat: implement XR_META_boundary_visibility 2026-09-29 21:52:44 +02:00
BlackCherryCat 760c1d3e4f Update es locale 2026-09-29 21:38:35 +02:00
mitsuami-megane 387c785c81 update ja locale 2026-09-29 21:38:15 +02:00
galister 5e3bb10b0c client: instructions when only 1 frame rate is reported 2026-09-29 19:22:33 +02:00
galister e5923e155a linux client: only show 10-bit if supported 2026-09-29 19:22:33 +02:00
galister 9062f082e5 v4l2_decoder: prefer h265 over h264 2026-09-29 19:22:33 +02:00
galister a09a462f6d Unprocessed Audio is Android-only 2026-09-29 19:22:33 +02:00
galister e80bfac44b fix typo that breaks codec detection 2026-09-29 19:22:33 +02:00
Patrick Nicolas 1adc48e2f2 Don't build ICU support in Boost 2026-09-29 19:22:33 +02:00
Patrick Nicolas 117027c390 Remove FoV from headset info packet 2026-09-29 19:22:33 +02:00
Patrick Nicolas 3a9b40472e Set WIVRN_USE_PIPEWIRE in wivrn_config.h 2026-09-29 19:22:33 +02:00
Patrick Nicolas 07131bec85 Set WIVRN_USE_V4L2 in wivrn_config.h 2026-09-29 19:22:33 +02:00
galister 24e4eba130 build frame on 24.04 2026-09-29 19:22:33 +02:00
galister fa4cf73fe4 frame build path fix 2026-09-29 19:22:33 +02:00
Patrick Nicolas add53c7318 Build Steam Frame client on CI 2026-09-29 19:22:33 +02:00
Patrick Nicolas ae12826ccb fix linux client build on gcc 14 2026-09-29 19:22:33 +02:00
Patrick Nicolas 83744c11d8 Fix build on steamrt for the Frame 2026-09-29 19:22:33 +02:00
Patrick Nicolas 4261477840 Fix build when not under the source dir 2026-09-29 19:22:33 +02:00
Michael Lip 045b39a4e3 Add missing German translations (#1136)
* translate the strings added in the settings and lobby UI

* translate the strings added to the connection wizard

* add missing de translations for new settings strings

* add missing de translations for new settings strings
2026-09-29 10:18:54 +02:00
dime-online 754ba4f6e1 driver: fix inverted interpolation factor in history::get_at
interpolate(before, after, t) expects t = 0 at the before sample and
t = 1 at the after sample (see hand_joints_list.cpp: radius = a.radius
* (1 - t) + b.radius * t, and monado's m_space_relation_interpolate
which lerps from the predecessor with the elapsed fraction).

The factor was computed as (after - now) / (after - before), which is
1 - t: querying at the before timestamp returned the after sample,
querying at the after timestamp returned the before sample, and
queries in between returned the pose mirrored about the segment
midpoint.

Compute t from the before sample so hand and body skeleton queries
between two tracking samples interpolate along the motion instead of
against it.
2026-09-27 19:17:06 +02:00
dime-online 8e3fd29c94 client: remember the last haptics amplitude to not skip stop commands
The self-assignment in the haptics handler left the stored amplitude
at its initial value of 0, so the "skip redundant calls" guard was
true for every amplitude-0 packet and haptic_stop() was never called.
Rumbles could not be cancelled early and kept playing for their whole
duration.

Store the newly applied amplitude so the guard only skips stops when
nothing was playing.
2026-09-27 19:14:07 +02:00
galister ee0d667105 client: xrHandTrackingDataSourceExt to filter out controller-based HT 2026-09-27 17:14:33 +09:00
galister 596e661d7e add frame controller profile 2026-09-27 17:14:33 +09:00
galister ef81d500ca linux client: detect panel res via /sys/class/drm 2026-09-27 17:14:33 +09:00
galister 2191884e95 linux client: v4l2 decoder 2026-09-27 17:14:33 +09:00
galister ce4486bc61 linux client: pipewire audio 2026-09-27 17:14:33 +09:00
Sapphire 40f2079268 Fix stop_application not working after Monado update 2026-09-26 04:59:02 -05:00
Sapphire c78bca4ddc Use interpolate/extrapolate functions from pose_list in generic tracker pose list 2026-09-26 04:49:24 -05:00
Patrick Nicolas 6f9e146aa3 Update flatpak KDE runtime 2026-09-19 21:47:17 +02:00
Patrick Nicolas dcc7579273 Avoid pacer immediate return when achievable
In case of discarded frames (no end frame or no layers) we don't get
called on mark_gpu_done, so times don't get updated. If the game
continues to call waitFrame, we advance the predicted display time, but
may enter the immediate return, accumulating delay.
2026-09-19 17:23:52 +02:00
Patrick Nicolas 312a7b2373 Add Ubuntu PPA in readme 2026-09-18 20:53:34 +02:00
Patrick Nicolas c64af3ac90 Fix float errors on quaternions
1% error on norm is too much and can cause overflow in quantization
Even accurate normalization can have errors when computing sqrt if one
coordinate is almost 0
2026-09-16 21:45:24 +02:00
galister 6b48898774 update monado 2026-09-16 23:23:12 +09:00
galister 07657d7281 update monado 2026-09-16 23:23:12 +09:00
galister b27f8dd831 update monado 2026-09-16 23:23:12 +09:00
galister 58c0e015a0 keyboard & mouse forward are android only 2026-09-15 05:12:57 +09:00
Patrick Nicolas 8eff464261 Use vulkan encode by default even on NVIDIA 2026-09-14 21:19:49 +02:00
Hüseyin Fahri Uzun a5837b47c7 Updated TR locale 2026-09-14 11:10:01 +02:00
Patrick Nicolas a052aac4ca Handle filesystem errors for downloads 2026-09-13 23:59:10 +02:00
Patrick Nicolas 55c6cd2ecd Fix possible crash on decoder deletion 2026-09-13 23:59:10 +02:00
Anton Kesy e0f5a84d8d Fix typos (#1109) 2026-09-13 20:32:28 +02:00
Patrick Nicolas 2a15f372a5 fix typo 2026-09-13 12:02:37 +02:00
Patrick Nicolas fdd6182414 Remove some fields from bug template 2026-09-12 14:18:11 +02:00
Patrick Nicolas 332ca1a7f5 Add AI slop warning in issue template 2026-09-12 14:11:55 +02:00
Patrick Nicolas bbc6e4cc36 Fix flatpak release build 2026-09-12 11:23:48 +02:00
Patrick Nicolas 49b8758b8c Prepare 26.9 release 2026-09-12 10:07:17 +02:00
Patrick Nicolas 88640364b0 Bump default resolution to 120% 2026-09-12 10:07:17 +02:00
Jamal 0fa471d688 po: fill in the az translator header 2026-09-09 23:05:37 +02:00
Jamal Ali a1d2e6a135 po: Add Azerbaijani language (#1101) 2026-09-09 21:10:14 +02:00
Jonathan Steffan 0654a9ab79 fix(client): disable vk_debug_ext_allowed on vive focus 3 2026-09-08 08:02:53 +02:00
Jonathan Steffan 3c927dd80b Raise the vulkan h265 encoder's minimum coding block to 16x16
The SPS allowed coding blocks down to 8x8. On NVIDIA that costs 4x the
encode time: 13.4 ms per 1920x1472 frame against 4.4 ms for the same
GPU's NVENC path, so the encoder sustained 36.5 fps against a 90 Hz
target. At 16x16 it is 3.2 ms and holds 90 Hz.
2026-09-08 08:01:54 +02:00
Patrick Nicolas 116e9e5454 Scan network interfaces periodically
mdns would only inspect interfaces it knows about when it is started.
USB may not be usable as soon as the interface is brought up, so poll
every now and then.
2026-09-06 11:07:39 +02:00
Patrick Nicolas ad7391d51b Use combo when there are too many refresh rates 2026-09-03 23:02:49 +02:00
ZokuTe 42b3417ba9 Update Simplified Chinese localization, close #599 2026-09-01 23:09:24 +02:00
Patrick Nicolas 3663709b69 Fix use after scope 2026-09-01 21:50:57 +02:00
Patrick Nicolas f187cdda9d Fix font memory leak 2026-09-01 21:50:57 +02:00
Patrick Nicolas f3af24ba57 Add support for address sanitizer 2026-09-01 21:50:57 +02:00
schlegp d81be2ae03 Fix angular velocity sign in pose_list
The angular velocity was worked out with the wrong formula. It used
dq * q, but it should be dq * q^-1 (the inverse of q, which is just
its conjugate here because q is normalized).

Using q instead of its inverse pointed the angular velocity the wrong
way. Games read this value when you let go of a controller, so thrown
objects came out spinning wrong.
2026-09-01 21:38:03 +02:00
Patrick Nicolas 9e9fc859f5 Detect network errors from any socket call 2026-08-31 19:34:05 +02:00
Patrick Nicolas 474e55ba68 Reset mdns on usb drop (and improve logs) 2026-08-31 19:34:05 +02:00
Álvaro 5d7acfc265 Update es locale (#1083) 2026-08-31 17:14:35 +02:00
Patrick Nicolas 1085f79072 Disable XR_KHR_composition_layer_depth
We don't use the depth layer anyway, it's useless to expose the
extension.
2026-08-30 18:45:53 +02:00
mitsuami-megane ed1e751f00 update ja locale 2026-08-30 09:21:58 +02:00
Cláudio 'Patola' Sampaio affbbe2b46 pt_BR strings about extrapolation 2026-08-30 09:21:36 +02:00
Patrick Nicolas 762e0dc4ee FR locale 2026-08-29 22:50:36 +02:00
Sapphire 28a8fbd743 Add patches and dashboard setting for maximum steamvr_lh pose prediction 2026-08-29 15:24:53 -05:00
Cláudio 'Patola' Sampaio 15716d04c6 Two new pt-br translation about USB 2026-08-29 19:17:20 +02:00
Patrick Nicolas 9bad971d8a Fix invalidated pointer usage 2026-08-29 16:26:15 +02:00
Patrick Nicolas 8f4cac3735 Don't request WRITE_SETTINGS permission 2026-08-29 13:22:51 +02:00
Patrick Nicolas f9d976a8f9 FR locale 2026-08-29 12:35:53 +02:00
Patrick Nicolas 8738131fb1 Native USB networking for Quest
Requires Horizon OS >= 2.6
2026-08-29 12:33:59 +02:00
Patrick Nicolas 8333322cd2 Add FontAwesome 7 Brands 2026-08-29 12:09:54 +02:00
Patrick Nicolas 1a49cee5d0 Update FontAwesome 6 -> 7 2026-08-29 12:03:49 +02:00
Patrick Nicolas 5204b61ad6 jnipp: add accessor for object fields 2026-08-29 11:47:19 +02:00
Patrick Nicolas 7836d15322 Simplify Android symbol visibility 2026-08-29 11:47:19 +02:00
Sapphire c7881fbc9e Fix deadlock when exiting due to all clients exiting 2026-08-26 23:39:50 -05:00
Sapphire 6e8c4df34f Bump flake inputs 2026-08-26 23:39:05 -05:00
Patrick Nicolas ea7e345d2c Remove CAP_SYS_NICE leftovers in unit file 2026-08-25 19:11:04 +02:00
Sapphire c564436377 Gracefully stop applications on server quit
This doesn't work with Ctrl+C as the entire process group is signaled,
but it works with wivrnctl stop-server.
2026-08-24 14:13:07 -05:00
Patrick Nicolas e604848409 Remove WIVRN_DUMP_TIMINGS 2026-08-17 21:30:57 +02:00
Guillaume Meunier 88fd1dfed2 Update entt to 4.0.0 2026-08-17 20:43:56 +02:00
Guillaume Meunier 2150a117f4 Define IMGUI_DEFINE_MATH_OPERATORS in CMakeLists instead of in each file 2026-08-17 20:43:56 +02:00
Guillaume Meunier cb60fe1d94 Remove obsolete imgui functions 2026-08-17 20:43:56 +02:00
Guillaume Meunier 7448b2b22c Update imspinner to ffe57a9cf741a92bdb6042cd4f8eb152b9c95b1d 2026-08-17 20:43:56 +02:00
Guillaume Meunier 84bd79a736 Update implot to 1.0 2026-08-17 20:43:56 +02:00
Guillaume Meunier 16bb157163 Update imgui to 1.92.9 2026-08-17 20:43:56 +02:00
Guillaume Meunier 075ed2dfe0 Update imgui to 1.92.8 2026-08-17 20:43:56 +02:00
Guillaume Meunier 8242baf0ae Update imgui to 1.92.7 2026-08-17 20:43:56 +02:00
Guillaume Meunier f5fd1ecb9e Update imgui to 1.92.6 2026-08-17 20:43:56 +02:00
Patrick Nicolas da950e0857 Disable quad views 2026-08-17 18:48:54 +02:00
notblankyu 57da74d69f update pt-BR locale 2026-08-16 12:32:13 +02:00
hypevhs 874ee96589 README: use friendlier log locations 2026-08-11 11:20:59 +02:00
galister 3bdd7a46be update monado, LH_DISCOVER_WAIT_MS no longer needed 2026-08-10 20:51:53 +02:00
Patrick Nicolas b52ab171be FR locale 2026-08-08 09:22:47 +02:00
mitsuami-megane 2f70558d31 update ja locale 2026-08-08 09:07:08 +02:00
BlackCherryCat ba4d708bc1 Update es locale 2026-08-08 08:50:00 +02:00
Patola 0bea16fd53 Two new pt-br strings (#1062) 2026-08-08 15:09:31 +09:00
galister ef0f6373b1 add slider for LH_STICK_DEADZONE 2026-08-07 21:01:58 +02:00
Patrick Nicolas d44e7aba9c Assign device ids (fix for c99db1) 2026-08-07 19:19:15 +02:00
Patrick Nicolas 85a635069f Remove WIVRN_USE_SYSTEMD config option 2026-08-06 19:33:22 +02:00
Sapphire ca59f46751 Fix virtual body trackers selection not saving 2026-08-02 22:17:12 -05:00
Sapphire 4749c15aa4 Update Monado 2026-08-01 20:37:14 +02:00
Sapphire a6da4e6dc9 Update Monado 2026-08-01 20:37:14 +02:00
Guillaume Meunier 80e838f7c5 Add bash shell completion for wivrnctl 2026-08-01 16:04:03 +02:00
Guillaume Meunier 12bb615e35 Add zsh shell completion for wivrnctl 2026-08-01 15:25:28 +02:00
Briella Bugs 981e9587a2 Update Client building instructions with up to date package name 2026-08-01 12:38:51 +02:00
Sapphire 2027dd04d0 Zero out output relation when generic tracker is disabled 2026-07-31 13:52:33 -05:00
Guillaume Meunier 21e14ea14e Update fr locale 2026-07-31 20:33:59 +02:00
Patola 486abef4a6 Translated lots of new strings to pt_BR (#1054) 2026-07-31 07:44:15 +02:00
Patrick Nicolas 8c8bd6bd1a Rename runtime to "WiVRn" in installed manifest 2026-07-30 19:12:06 +02:00
Patrick Nicolas 333e080d1c Provide Vulkan version to Monado 2026-07-30 19:12:06 +02:00
Patrick Nicolas 774ca3a19e Update Monado 2026-07-30 19:12:03 +02:00
Patrick Nicolas c99db1ccd0 Update Monado 2026-07-30 19:04:46 +02:00
Patrick Nicolas 6b3d67eb7a Update Monado 2026-07-30 18:39:45 +02:00
Patrick Nicolas daea840c48 Update Monado 2026-07-29 23:40:53 +02:00
Patrick Nicolas 4fb50ed556 Update Monado 2026-07-29 23:40:21 +02:00
Patrick Nicolas 49276fd5d8 Update Monado 2026-07-29 21:33:19 +02:00
Patrick Nicolas aa3a94e76d python lint 2026-07-29 21:19:39 +02:00
Patrick Nicolas bd624e8258 CI: cache apt deps in Locale check 2026-07-29 21:13:33 +02:00
Patrick Nicolas 3ecb9d5069 CI: enforce result for files changed in PR 2026-07-29 21:13:33 +02:00
ZokuTe d462ce4f27 Update Simplified Chinese localization (#1050) 2026-07-29 14:52:10 +02:00
mitsuami-megane f172737b91 update ja locale 2026-07-29 13:41:29 +02:00
BlackCherryCat 8f166bb993 Update es locale 2026-07-29 11:37:49 +02:00
Mattia Zirpoli 48e6704303 i18n: Update italian translation (#1047)
Signed-off-by: Mattia Zirpoli <mat.zirpoli@gmail.com>
2026-07-29 09:39:30 +02:00
Guillaume Meunier e44ae9d4e2 Don't change icon size to avoid flickering 2026-07-28 00:23:23 +02:00
Guillaume Meunier 79fed879e2 Use the default values in the configuration class instead of repeating them 2026-07-27 23:45:26 +02:00
Guillaume Meunier bf77b93a17 Reorganize tabs, fix opacity not settable to 80% 2026-07-27 23:28:47 +02:00
Guillaume Meunier 2d2f064576 Fix defaults in the GUI to match the defaults when there is no config file 2026-07-27 23:28:47 +02:00
Sapphire 7e93d25ce0 Use text colour for environment browse loading spinner 2026-07-26 22:43:39 -05:00
Sapphire 96abf3e99e Tweak success pill colour for light theme 2026-07-26 22:30:37 -05:00
Sapphire 44915ffd8f Fix virtual body trackers selection being disabled in stream 2026-07-26 22:23:46 -05:00
Sapphire b61d991a62 Fix size of 'active' chip in applications list not matching Stop button 2026-07-26 22:15:50 -05:00
Sapphire a54ed2d090 Fix stream GUI application launcher and tooltips not respecting theme, make statistics graph look better on light theme 2026-07-26 21:31:54 -05:00
Guillaume Meunier b33de5ef4b Consider enum values when computing protocol hash 2026-07-26 21:15:22 +02:00
Guillaume Meunier 66a2ffda82 Update fr locale 2026-07-26 21:14:12 +02:00
Guillaume Meunier e0fc008936 Fix padding in the application launcher to have the same in the lobby and the stream scene 2026-07-26 21:14:12 +02:00
Guillaume Meunier 3994a91636 Allow to kill all apps when disconnecting 2026-07-26 21:14:12 +02:00
Guillaume Meunier c59d4486bc Make the recentering tip and virtual keyboard respect the selected theme 2026-07-26 21:14:12 +02:00
Guillaume Meunier 3a71509ff8 Fix typo 2026-07-26 21:14:12 +02:00
Guillaume Meunier 3c56ff7403 Remove bitrate setting with the thumbstick 2026-07-26 21:14:12 +02:00
Guillaume Meunier a91b8982d2 Allow disabling the in-stream window from the stream scene 2026-07-26 18:13:15 +02:00
Guillaume Meunier 3dc1547721 Allow setting the theme from the stream scene 2026-07-26 18:13:15 +02:00
Guillaume Meunier 6452447d9c Add option for forwarding devices from the stream scene 2026-07-26 18:13:15 +02:00
Guillaume Meunier 54b4aba7af Copy translations without context to translations with context 2026-07-26 17:24:37 +02:00
Guillaume Meunier c40d9eeddc Clarify messages, use the degree symbol instead of 'deg' 2026-07-26 17:24:37 +02:00
Guillaume Meunier 741114272a Translate the themes names 2026-07-26 17:24:37 +02:00
Guillaume Meunier f5a0554384 Add context to strings for translation 2026-07-26 17:24:37 +02:00
Guillaume Meunier 6ce05184af Add disabled tooltip for application spacewarp 2026-07-26 17:24:36 +02:00
Guillaume Meunier ef233a66da Remove passthrough item from the top bar 2026-07-26 17:24:36 +02:00
Guillaume Meunier c414be0087 Remove unused functions 2026-07-26 17:24:36 +02:00
Guillaume Meunier 08643d6a14 Dim rounded windows correctly 2026-07-26 17:24:36 +02:00
Guillaume Meunier 001f91b607 Use combo box with multiple selection for virtual body trackers 2026-07-26 17:24:36 +02:00
Guillaume Meunier fe516ccc24 Add combo box with multiple selection 2026-07-26 17:24:36 +02:00
Guillaume Meunier 0a049b163a Only show autoconnect for automatically detected servers 2026-07-26 17:24:36 +02:00
Guillaume Meunier 37c40d3b6f Add tooltip when foveation center override is disabled 2026-07-26 17:24:36 +02:00
Guillaume Meunier 1ca43be072 Position the tooltip for disabled settings on top of the setting instead of following the cursor 2026-07-26 17:24:36 +02:00
Guillaume Meunier 9b220e6f70 Remove unused functions 2026-07-26 17:24:36 +02:00
ahsanswr 84d172f2e8 Refactors 2026-07-26 17:24:36 +02:00
ahsanswr 80ee73128d Code cleanup 2026-07-26 17:24:36 +02:00
ahsanswr 5e359fe983 UI improvements 2026-07-26 17:24:36 +02:00
ahsanswr b7d17db0c7 Padding fixes 2026-07-26 17:24:36 +02:00
ahsanswr dba182ea51 Wrap setting descriptions and tighten content panel layout
- setting_label wraps the description (capped at half the row width) instead
  of truncating it to a single ellipsized line
- drop hard line breaks from the descriptions that had them
- run the content panel to the window edge so the wide scrollbar sits at the
  edge, and keep a clear gap between the content and the scrollbar
2026-07-26 17:24:36 +02:00
ahsanswr 2e9f2c8646 Ui improvements 2026-07-26 17:24:36 +02:00
ahsanswr 4226485c57 Popup ui improvements 2026-07-26 17:24:36 +02:00
ahsanswr 9352db046a Popup fixes and improvements 2026-07-26 17:24:36 +02:00
ahsanswr e4b4bfa66d Fixes and improvements 2026-07-26 17:24:36 +02:00
ahsanswr 12834824ab Fixes and improvements 2026-07-26 17:24:36 +02:00
ahsanswr a5b1b6dbeb Overhaul settings UI 2026-07-26 17:24:36 +02:00
ahsanswr 45710151aa Add more components 2026-07-26 17:24:36 +02:00
ahsanswr 44879e45ab Add new UI framework 2026-07-26 17:24:36 +02:00
Jonathan Steffan d747f4dd04 fix(android): cache the gradle distribution and dependencies
Every Android job downloads gradle-8.13-bin.zip and the whole Android
plugin dependency tree from Maven Central on each run, so a Maven Central
403 fails the build before it configures anything:

  Could not GET '.../kotlin-stdlib-2.2.0.pom'.
  Received status code 403 from server: Forbidden

Cache ~/.gradle/caches and ~/.gradle/wrapper, keyed on the wrapper
properties and build.gradle.
2026-07-26 10:16:46 +02:00
Jonathan Steffan 04639417c4 fix(flatpak): add source mirrors and match the container to the runtime
The toolchain tarballs are each fetched from a single host, and ftpmirror.gnu.org
timing out failed the whole job. Add mirror-urls fallbacks where a byte-identical
alternate host exists.

Also bump the builder container to kde-6.10, matching runtime-version in the
manifest.
2026-07-26 10:16:46 +02:00
Jonathan Steffan 86e58449c2 feat(vulkan): use distro Vulkan packages instead of setup-vulkan-sdk
With the pinned SDK gone, CI builds against distro headers, so raise the
server requirement to 1.4.304 to match what is actually tested and
supported: Ubuntu 26.04 has 1.4.341, the Ubuntu package build (plucky)
has 1.4.304, as does Debian 13. This subsumes the separate 1.3.283 check
for Vulkan video encode, and makes VK_HEADER_VERSION >= 304 always true
for the server. The client conditionals stay, it is built for Android
against the 1.3.268 headers fetched in common/CMakeLists.txt.
2026-07-26 10:16:46 +02:00
Patrick Nicolas 52e53f0591 Use (again) boost::pfr for hmd_traits overrides 2026-07-25 18:35:41 +02:00
Guillaume Meunier 6ff72e0425 Allow blacklisting Vulkan/OpenXR extensions 2026-07-25 18:35:41 +02:00
Guillaume Meunier eb94356092 Unify the different ray models, allow overriding shaders used in gltf 2026-07-25 18:35:41 +02:00
Patrick Nicolas ed8316f320 Fix rays making holes in picture 2026-07-25 18:35:41 +02:00
Patrick Nicolas 32724d359f Fix invisible rays 2026-07-25 18:35:41 +02:00
Patrick Nicolas d30ddc96e9 tweak HTC controller offset 2026-07-25 18:35:41 +02:00
Patrick Nicolas 3c148bd1dd Remove HTC ray workaround for XR elite firmware 2 2026-07-25 18:35:41 +02:00
Jonathan Steffan 00d2727049 fix(ruff): update Python code to conform to 0.16 2026-07-24 21:14:49 +02:00
HttpAnimations 8b54ba1643 Check return value of recvfrom in UDP receive_from_raw (#1040) 2026-07-24 15:02:47 +02:00
HttpAnimations b5c5f0e09d Reject oversized TCP control packets 2026-07-21 09:34:09 +02:00
Patrick Nicolas 9491f02bc0 Update Android NDK 2026-07-20 18:54:53 +02:00
Patrick Nicolas 4d1de2eab9 Don't collect copy times for iGPU (vulkan encoder) 2026-07-14 20:15:53 +02:00
Patrick Nicolas eed9e052fc Correctly report if tracing is enabled 2026-07-14 20:15:53 +02:00
mitsuami-megane 82b6ebc7a7 update ja locale 2026-07-14 14:00:11 +02:00
Patrick Nicolas d6f9cca646 Set AAudio preset to voice communication
Matches what we do and should workaround a bug in Meta OS
2026-07-14 11:41:20 +02:00
umceko e57577d675 Fix main queue synchronization with monado
copy_mutex duplicated the pthread_mutex_t of vk.queue.mutex into
main_queue->mutex by value, which creates an independent mutex: monado
submissions on IPC client threads (comp_swapchain image transitions,
vkDeviceWaitIdle in image_cleanup) did not exclude wivrn's layer_commit
and encoder submissions on the same VkQueue. This intermittently
corrupts driver state when a client creates or destroys swapchains
while streaming, observed as SIGSEGV inside vkQueueSubmit2 and as
uncaught vk::SystemError from layer_commit on NVIDIA.

Initialize monado's queue mutexes and redirect vk.queue.mutex to the
main queue os_mutex so every submitter takes the same lock.
2026-07-14 09:25:35 +02:00
bcf4645b88 update README (#1024)
Co-authored-by: hypevhs <3746656+hypevhs@users.noreply.github.com>
Co-authored-by: Sapphire <imsapphire0@gmail.com>
2026-07-13 23:10:15 +02:00
Patrick Nicolas b30d6e64d0 Log version on client start 2026-07-13 23:01:28 +02:00
unimpressive 4f66da278f Locale/sk-update (#1023) 2026-07-12 23:18:46 +02:00
ZokuTe af6340d8a8 Update Simplified Chinese localization, close #599 2026-07-12 17:34:32 +02:00
Sapphire 22f3dfda88 Set position & orientation tracked bits when valid on Meta body trackers 2026-07-11 18:04:23 -05:00
BlackCherryCat 1118028125 Update es locale 2026-07-11 16:33:57 +02:00
Patrick Nicolas 6bdc1f57cd FR locale 2026-07-11 14:53:34 +02:00
Patrick Nicolas 37fa09899e CI: common build for dashboard 2026-07-11 14:46:53 +02:00
Patrick Nicolas 79a53343ce Remove deprecated KI18n functions 2026-07-11 14:46:53 +02:00
Patrick Nicolas 1d1c040299 remove public audio description() method 2026-07-11 14:46:53 +02:00
Cláudio 'Patola' Sampaio c32375b0e0 New anatomical pt-br translations 2026-07-11 13:43:15 +02:00
SapphireandGuillaume Meunier 1cc61fd07a Make virtual tracker xdevs toggleable
Co-authored-by: Guillaume Meunier <guillaume.meunier@centraliens.net>
2026-07-10 14:52:50 -05:00
Sapphire 727445520e Create xdevs from body skeleton 2026-07-10 13:22:14 -05:00
Sapphire 10cefe65b9 Handle xrLocateSpace failure in htc_body_tracker 2026-07-10 13:22:14 -05:00
Sapphire e611fdcc51 Add velocity for htc_body 2026-07-10 13:22:14 -05:00
Sapphire 881450867a Make XR_META_body_tracking_fidelity optional 2026-07-10 13:22:14 -05:00
Sapphire bf551bd198 Use early returns in body_tracker_supported/make_body_tracker 2026-07-10 13:22:13 -05:00
Sapphire 534b4c23e3 Use shared pose_flags enum in packets 2026-07-10 13:22:13 -05:00
Sapphire 2e28b0a4ad Forward body skeletons from headset 2026-07-10 13:22:05 -05:00
Patrick Nicolas 41c2c0b727 Set default log level to info 2026-07-09 23:34:42 +02:00
Patrick Nicolas 42711e08ef FR locale 2026-07-09 21:16:12 +02:00
Patrick Nicolas d609d039d8 remove ifdef for socket cleanup 2026-07-09 21:06:32 +02:00
mitsuami-megane 40ce419b4b update ja locale 2026-07-09 07:56:46 +02:00
Cláudio 'Patola' Sampaio 041239d58f Update 8 new strings to pt-br 2026-07-09 07:56:29 +02:00
BlackCherryCat 58b1c76999 Update es locale 2026-07-08 20:16:08 +02:00
JR Lanteigne 91f6e69ffb Mirror forwarded input devices to uinput
Mirror the gamepad forwarded from the headset to a uinput device with the standard Xbox layout, so applications that do not read it through OpenXR, such as SDL and Steam Input, pick it up. This extends the existing hid-forwarding uinput path, which already covered keyboard and mouse.

The headset chooses which devices to forward (keyboard, mouse, gamepad), off by default. The hid-forwarding server option gates the uinput mirror only; the OpenXR gamepad is always exposed. The mirror needs the uinput module and write access to /dev/uinput.

Gamepad rumble written to the uinput device is read back and forwarded to the headset as OpenXR haptics.
2026-07-08 19:10:50 +02:00
JR Lanteigne aeecc857de Add gamepad forwarding through OpenXR
Forward a gamepad paired to the headset to the server. Useful when the controller is in range of the headset but not the server, such as a DualSense paired to a Quest over Bluetooth.

The headset reads the gamepad through the OpenXR microsoft/xbox_controller profile and forwards it on the existing input rails: gamepad device ids in the inputs packet, plus a gamepad entry in the interaction profile array that signals connection and disconnection from the tracking thread.

The server exposes a native OpenXR gamepad at /user/gamepad, connected while the headset reports a gamepad interaction profile. This needs no permission and is always available.

Rumble is sent back to the headset and applied through OpenXR haptics.
2026-07-08 19:10:50 +02:00
Patrick Nicolas 9935203cfb Document adb setprop usage for hmd_traits 2026-07-05 11:59:57 +02:00
HttpAnimationsandHttpAnimations 6ad8f4546b Fix assertion failure in foveation fill_ubo when count is exhausted (#1002)
Co-authored-by: HttpAnimations <shawndouglasyt@gmail.com>
2026-07-03 21:50:26 +02:00
Ekaterine Papava 1689715a69 po: Add Georgian language (#1000) 2026-07-02 20:35:53 +02:00
Patrick Nicolas c4a54b29ec Retrieve view pose when needed by a layer
In the layer squasher, world pose is retrieved from a projection layer
if possible, but the eye pose is incorrect in that case.
Get the data from hmd if it is needed by any of the layers.
2026-07-02 07:51:36 +02:00
Jonathan Steffan b9c8a54d92 Add WiVRn-native Perfetto via Perfetto SDK
Optional server profiling built on the Perfetto SDK. Adds CPU spans
(compositor, encoder, network), GPU encode/copy slices from Vulkan timestamp
queries (Vulkan/NVENC/VAAPI), and headset feedback markers from dump_time.

WIVRN_TRACING enables tracing and selects the backend (system, inprocess, or
both); WIVRN_USE_PERFETTO gates it at build time and compiles it out otherwise.
WIVRN_TRACE_MONADO additionally drives Monado's percetto tracing from the same
switch so WiVRn and Monado land on one timeline.

Tooling: server-tracing[-monado] presets and a CI build, two Perfetto configs
(WiVRn-only and full-system), a wivrn_capture.py capture wrapper, a pftrace
summary script, and docs/profiling.md.
2026-07-01 21:04:08 +02:00
Jonathan Steffan b11655fdee fix(flatpak): use caching for builds 2026-07-01 20:48:17 +02:00
Jonathan Steffan 79ee65e158 Remove dead cleanup-function mechanism 2026-07-01 20:48:17 +02:00
Jonathan Steffan 52dc629310 Remove PulseAudio audio backend
PipeWire is the modern, preferred backend. Remove the now-redundant
PulseAudio backend entirely.
2026-07-01 20:48:17 +02:00
Sapphire f434d52f7f Simplify steam command delimiter logic
This should also fix there being leading whitespace before the
VR_OVERRIDE environment variable.
2026-06-28 18:56:39 -05:00
Sapphire f7e0f9824c Add client dependencies to flake 2026-06-28 10:07:03 -05:00
Ari43 4fd59be90a Add VapoR to OVR_COMPAT_SEARCH_PATH 2026-06-27 08:27:04 +02:00
dawkagaming 75e0158040 Add keywords to the desktop file and add 'Game' category 2026-06-25 23:35:59 +02:00
Patrick Nicolas 3eb94d0518 Omit .git from server deps 2026-06-19 12:09:15 +02:00
Patrick Nicolas 8fe89569ab Replace toktx binary with ktx 2026-06-19 10:55:01 +02:00
Patrick Nicolas 39ba5041e2 Use specialization constant for alpha/non-alpha 2026-06-18 23:27:31 +02:00
Patrick Nicolas c3d491a414 Fix specialization constants with a single constant 2026-06-18 23:27:31 +02:00
Patrick Nicolas 32b4baff70 More cache-friendly swizzle 2026-06-18 23:27:31 +02:00
Patrick Nicolas a5bca21706 Relax flags for foveation UBO 2026-06-18 23:27:31 +02:00
Snowflakesy 7908627cfa German localization files (#984) 2026-06-18 21:06:19 +02:00
Patrick Nicolas 5f734fd1dd Fix vulkan error with 0 layers submitted 2026-06-18 15:55:24 +02:00
Patrick Nicolas d294a80678 Clear image when no layers are submitted 2026-06-18 09:59:58 +02:00
Patrick Nicolas 51e887ed1f Cleanup active_runtime.json on start 2026-06-17 22:01:51 +02:00
Patrick Nicolas fc394dc3b9 typo 2026-06-16 20:59:50 +02:00
Patrick Nicolas 40fc20f3b4 Fix adb custom path browse button 2026-06-16 15:49:49 +02:00
Patrick Nicolas 79d57a35d7 Wait for left/right decoders to be ready before start 2026-06-15 21:25:21 +02:00
Patrick Nicolas 6d6353fe49 Disable passthrough if alpha not ready 2026-06-15 21:12:31 +02:00
Patrick Nicolas 29b1770ba0 cmake: explicit GIT_TAG for releases
Tagged versions shouls use GIT_TAG instead of GIT_DESC+GIT_COMMIT
When using GIT_TAG, apk download will be done from WiVRn releases
In other cases, GIT_COMMIT will be used to download from WiVRn-APK
releases.

If none is set, git is used to compute the values
2026-06-14 17:25:12 +02:00
Patrick Nicolas 0f6da3498e Add GIT_DESC/GIT_COMMIT descriptions in CMake 2026-06-14 17:25:12 +02:00
Patrick Nicolas 6a1bccd569 flatpak: update org.kde.Platform 2026-06-14 14:16:51 +02:00
Patrick Nicolas 8c39434961 flatpak: update deps, use commit sha 2026-06-14 14:16:51 +02:00
Patrick Nicolas 3f1874bdba Update Github actions 2026-06-14 14:16:51 +02:00
Patrick Nicolas 9940580fbd Don't forward 0 refresh rate to headset 2026-06-13 23:05:52 +02:00
Patrick Nicolas 43395e6e40 Add logs for refresh rate change 2026-06-13 23:05:52 +02:00
Patrick Nicolas c485bd10d3 Log selected OpenVR compatibility library 2026-06-13 14:06:44 +02:00
Patrick Nicolas 1c1215da20 Don't fail if Steam userdata can't be read 2026-06-11 16:05:46 +02:00
Patrick Nicolas f8841585eb prepare 26.6 release 2026-06-10 09:16:18 +02:00
Patrick Nicolas 1fc70945cb Downgrade message for vk queue family indices 2026-06-09 21:07:46 +02:00
Patrick Nicolas e16e713cb6 fix deadlock on reconnect 2026-06-09 19:22:36 +02:00
Patrick Nicolas a3b40a1b6c Disable firewalld check 2026-06-06 14:25:59 +02:00
Patrick Nicolas b387623aac Update Monado 2026-06-06 11:06:44 +02:00
Patrick Nicolas 245c45b9f9 Update Monado 2026-06-06 11:06:44 +02:00
unimpressive dc678fc1df NVIDIA NVENC P-states issue docs (#965) 2026-06-06 09:12:59 +02:00
Guillaume Meunier fdb7ace47a Revert "WIP snapping"
This reverts commit 11d166d518.
2026-06-05 21:19:46 +02:00
Guillaume Meunier 11d166d518 WIP snapping 2026-06-05 20:43:35 +02:00
Guillaume Meunier 4afcadf19d Change the GUI distance with the thumbstick in the stream scene 2026-06-05 20:43:35 +02:00
Guillaume Meunier f01ffd9182 Use a fixed GUI position in the stream scene when the GUI is interactable 2026-06-05 20:43:35 +02:00
Unimpressive 95a5283b51 locale sk update 2026-06-03 00:01:20 +02:00
mitsuami-megane 57cc65db19 update ja locale 2026-06-01 07:46:03 +02:00
OniriCorpe 7b021a838d Rewords some sentences, various fixes and updates for the french
language
2026-06-01 07:45:08 +02:00
Cláudio 'Patola' Sampaio 8313423b66 Unknown Sources reference translated 2026-06-01 07:43:39 +02:00
BlackCherryCat d394c802ee Update es locale 2026-05-31 22:54:44 +02:00
Patrick Nicolas df83e1b1b9 FR locale 2026-05-31 22:00:40 +02:00
OniriCorpe fc8f84bedd Adds "or Pico" to the text of the troubleshooting docs telling to look
in the unknown sources directory
2026-05-31 21:58:48 +02:00
Hüseyin Fahri Uzun df1f7be784 Updated TR translation (#956) 2026-05-29 15:29:48 +02:00
Patrick Nicolas 468b30dec4 Fix debug build 2026-05-28 18:13:01 +02:00
unimpressiveandUnimpressive c8dce26740 Fill in missing translations for sk and some minor tweaks (#951)
Co-authored-by: Unimpressive <unimpressive.crawling789@aleeas.com>
2026-05-28 15:49:49 +02:00
Patrick Nicolas cef62ddeb5 Fail on missing qml packages 2026-05-27 20:00:29 +02:00
Patrick Nicolas 3cd64e458e Fix adb custom location trigger 2026-05-27 13:42:59 +02:00
Patrick Nicolas 1d8f8b4779 Ignore extreme values for app CPU/GPU time 2026-05-27 11:15:20 +02:00
Sapphire 65a9032894 Allow access to XDG_DATA_HOME SlimeVR socket path for Flatpak
Used when running SlimeVR in Steam: https://github.com/SlimeVR/SlimeVR-Server/blob/61687a27ca1d5ee4eee98dc4b244b0687536d58e/server/core/src/main/java/io/eiren/util/OperatingSystem.kt#L42
2026-05-26 09:07:50 -05:00
EasonZxp 28c72c8e64 Add PFDM MR controller support 2026-05-26 10:52:34 +02:00
EasonZxp 6a72c537c2 Add FB hand mesh support with GLB fallback (#934)
Use the XR_FB_HAND_TRACKING_MESH extension to render hand models when supported,
and fall back to the bundled GLB hand models otherwise. This fixes incorrect hand
model rendering on PFDM MR device, Have tested with PFDM MR V4.5.0 version.
2026-05-26 09:40:37 +02:00
Clansty 18d685976e dashboard: defer ServerStatus::Started until D-Bus properties are populated
The server only exports its D-Bus interface and sets JsonConfiguration
from inside on_name_acquired (server/main.cpp), after owning the
well-known name io.github.wivrn.Server. The dashboard's GetAll
triggered from on_server_dbus_registered can therefore race ahead of
that and come back with an error or an empty reply.

Previously the dashboard set ServerStatus to Started as soon as the
name was owned, so the rest of the UI assumed the server was usable
while JsonConfiguration was still missing. SettingsPage in particular
loaded its values once in Component.onCompleted and ended up showing
defaults (Encoder Auto, SteamVR checkbox unchecked, OpenVR / Autostart
blank), even though the configuration on disk was correct.

Move the Started transition into refresh_server_properties, only after
GetAll returns a reply that actually contains JsonConfiguration. If the
initial reply is errored or empty, retry every 200 ms until the server
has exported its interface. When the dashboard starts and finds the
service already registered, set Status::Starting in the constructor so
Main.qml does not see Stopped and spawn a duplicate process.

With this, ServerStatus::Started now consistently means 'server is
fully usable, properties are populated', and SettingsPage no longer
needs to handle the asynchronous arrival of JsonConfiguration itself.
2026-05-20 21:40:51 +02:00
Patrick Nicolas a870344405 Split pico4/4u controller offsets
Values provided in https://github.com/WiVRn/WiVRn/pull/908#issuecomment-4439106699
2026-05-20 11:01:52 +02:00
Unimpressive eca2949a5c more accurate pico 4 controller offset 2026-05-20 11:01:52 +02:00
Patrick Nicolas 1f71ade4f1 Configurable max number of vulkan encoders 2026-05-19 14:20:57 +02:00
Patrick Nicolas 9313ccbc1d Use multiple vulkan encode queues if possible 2026-05-19 06:59:03 +02:00
Patrick Nicolas 8d6245330a Add support for VK_KHR_unified_image_layouts 2026-05-19 06:59:03 +02:00
Jonathan Steffan e79621d377 Fix vulkan encode QFOT layouts (NVIDIA green frame)
Compositor release left layouts as eUndefined while encoder acquire
transitioned to eVideoEncodeSrcKHR (or eTransferSrcOptimal on the NVIDIA
tmp_image path); the spec forbids that layout mismatch for exclusive-mode
QFOT. NVIDIA honoured it by treating encode-queue contents as undefined
(solid green frame).

Encoders now publish target_layout. The compositor's release and the
encoder's acquire both transition eGeneral -> target_layout in a single
barrier; per VkImageMemoryBarrier2 the layout transition is performed
exactly once between the queues, so no second non-QFOT barrier is needed.
target_layout is eVideoEncodeSrcKHR on the direct vulkan encode path and
eGeneral elsewhere.

Also fix optimal_transfer(): the inner `auto to = ...` shadowed the
parameter, so the maintenance9 check was effectively always false.
2026-05-19 06:59:03 +02:00
Mitsuami f54be85c26 update ja locale (#924) 2026-05-19 13:35:53 +09:00
ZokuTe 6efd5d0145 Update Simplified Chinese localization, close #599 2026-05-18 22:54:56 -05:00
Patrick Nicolas 27b92bba1c Skip pressure vessel var if home is in /var 2026-05-18 17:21:38 +02:00
Patola 2b93c1e4ef Update pt_BR locale (#920) 2026-05-17 22:51:22 -05:00
BlackCherryCat 2910658c58 Update es locale 2026-05-18 00:03:26 +02:00
Patrick Nicolas 85e04c7f76 FR locale 2026-05-17 20:24:58 +02:00
HttpAnimationsandHttpAnimations 9dfb821853 Implement auto-connect feature (#915)
* Auto connect

* Move setting for auto usb to the applcation autostart

---------

Co-authored-by: HttpAnimations <shawndouglasyt@gmail.com>
2026-05-17 20:18:20 +02:00
Patrick Nicolas f3ebe5798e Silence maybe unitialized warnings 2026-05-16 17:03:30 +02:00
Patrick Nicolas aa8968e1f4 Update OpenXR to 1.1.58 for client 2026-05-16 16:46:02 +02:00
ZokuTe dbb7df207f Update Simplified Chinese localization, close #599 2026-05-11 08:44:20 +02:00
Amanda M. Watson b9f2fde119 refactor hmd_traits into separate file, make class in application, and remove hardware.h/cpp 2026-05-10 19:11:17 +02:00
Patrick Nicolas b0994c54f5 Fix CI client build 2026-05-10 19:11:17 +02:00
Patrick Nicolas 9778f0e9b7 hmd traits override through boost::pfr 2026-05-10 19:11:17 +02:00
Patrick Nicolas 1b9b74cce1 Revert to explicit hmd_traits initialization 2026-05-10 19:11:17 +02:00
Patrick Nicolas 50a0f1a0ed Add quirk to prevent discarding frames 2026-05-10 19:11:17 +02:00
Patrick Nicolas 1685bbde2c rename override_view_for_hmd -> override_view 2026-05-10 19:11:17 +02:00
Patrick Nicolas d8fbbb23ab Remove model enum, change Quest default power mode
Store all quirks in the hmd_traits object
2026-05-10 19:11:17 +02:00
amwatson 209145ce0d replace hmd_traits lazy fallback with strong assert that init is called before retrieval 2026-05-10 19:11:17 +02:00
amwatson a82ba58bf9 all env_ functions return std::optional and in env_string() present-but-empty values return as '' 2026-05-10 19:11:17 +02:00
amwatson 527a094c32 Use magic_enum::containers::array for permissions list 2026-05-10 19:11:17 +02:00
amwatson 83eb6ff849 override_view() should take hmd_traits as argument to ensure envvar overrides are read consistently 2026-05-10 19:11:17 +02:00
amwatson d70c1fb414 add runtime-initialized 'hmd_traits' struct to streamline hmd-specific checks 2026-05-10 19:11:17 +02:00
galister 86c19fc5cc fix convergence_angle 2026-05-10 17:21:43 +02:00
Patrick Nicolas 54b96430f6 Addjust some IDR handler logs 2026-05-10 11:35:50 +02:00
Patrick Nicolas e3be6294c8 Configurable headset margin time 2026-05-08 16:23:35 +02:00
Patrick Nicolas b5226f0480 Remove app pacer from debug GUI on destruction 2026-05-08 16:23:35 +02:00
BlackCherryCat 6dfe43e0b6 Update es locale 2026-05-06 18:15:34 +02:00
mitsuami-megane 5a8f0b0d99 update ja locale 2026-05-06 08:54:04 +02:00
Patrick Nicolas 1420c167fe Add back COMP_TARGET_TIMING_POINT_SUBMIT_END 2026-05-05 15:19:33 +02:00
Cláudio 'Patola' Sampaio e2e2c6526b Updated 3 new translations in pt_BR 2026-05-04 18:48:33 +02:00
Patrick Nicolas e6996d168f fr, it locales 2026-05-03 17:28:23 +02:00
Patrick Nicolas 590adfe566 Add warnings for extended values 2026-05-03 10:50:39 +02:00
Patrick Nicolas 7e81f23f0f Add missing includes 2026-05-02 20:39:37 +02:00
Patrick Nicolas 077a6552ef Replace vk::RemainingArrayLayers with values 2026-05-02 14:11:53 +02:00
Patrick Nicolas 6d70dca173 Configurable app pacer margin 2026-04-30 20:16:24 +02:00
Patrick Nicolas 7722ed45b3 pacer: adjust phase on feedback instead of predict 2026-04-30 16:54:02 +02:00
Patrick Nicolas f1c02d8f68 Fix debug build 2026-04-30 16:04:15 +02:00
Patrick Nicolas 74c360ebe1 Fix nvenc max encode size check 2026-04-27 14:59:41 +02:00
Patrick Nicolas 5a205c15ae Manually reload selectgame 2026-04-27 14:03:00 +02:00
Patrick Nicolas 51e3dd5adc factorize post-processing GUI code 2026-04-27 11:22:44 +02:00
Patrick Nicolas 63a22d32db Allow headset timewarp 2026-04-27 10:48:26 +02:00
Patrick Nicolas e21b1adf1d Send both frame rate and refresh rate in description 2026-04-27 10:26:58 +02:00
Patrick Nicolas 775022d065 Remove useless semaphore wait (same queue) 2026-04-25 18:55:12 +02:00
Patrick Nicolas 28cffac9bd remove unused sem_value member 2026-04-25 18:55:12 +02:00
Patrick Nicolas e452488666 Fix refresh rate change 2026-04-25 18:55:12 +02:00
Sapphire 0e38707cac Update Monado 2026-04-22 08:02:16 +02:00
ZokuTe d910750387 Polish Simplified Chinese translations 2026-04-21 20:34:24 +02:00
Álvaro a4b3099113 Update es locale (#883) 2026-04-20 19:02:49 +02:00
BERADQ 502343d4af Update Simplified Chinese localization, close #599 2026-04-20 09:53:08 +02:00
mitsuami-megane fe40d578d7 update ja locale 2026-04-20 09:52:59 +02:00
Cláudio 'Patola' Sampaio bb01f396f2 updated pt_BR strings 2026-04-19 22:46:59 +02:00
Patrick Nicolas 28505f0e61 fr, it locales 2026-04-19 09:14:03 +02:00
Patrick Nicolas 10387b9b00 Separate framerate/refresh rate 2026-04-19 09:14:03 +02:00
Patrick Nicolas 6d072e30cd Simplify some preferred refresh rate logic 2026-04-19 09:14:03 +02:00
Patrick Nicolas 71a9793f9a Fix refresh_rate/period when ext is not present 2026-04-19 09:14:03 +02:00
Patrick Nicolas f57b5bc5fc Factorize refresh rate settings GUI 2026-04-19 09:14:03 +02:00
Patrick Nicolas 72dca53617 Add _cF translation macro 2026-04-19 09:14:03 +02:00
galister 3f732a70f8 omit "native" on refresh rate labels 2026-04-19 09:14:03 +02:00
galister 00f0553dc7 add option for half fps 2026-04-19 09:14:03 +02:00
Patrick Nicolas ecc2b19609 Use the qcoro module from the runtime 2026-04-18 11:49:51 +02:00
Patrick Nicolas 542b38365f Update monado, add chroma key support 2026-04-17 16:42:53 +02:00
Patrick Nicolas cf602beefb Update monado
move view_config from sys_info to callback
2026-04-17 16:42:53 +02:00
Patrick Nicolas 6aa7c9759a Update monado
fix u_system -> b_system rename
2026-04-17 16:42:53 +02:00
Patrick Nicolas 1f23c81cd5 Update monado
fix xdev -> static_xdev rename
2026-04-17 16:42:52 +02:00
Patrick Nicolas c2a234d48a Update monado
fix u_builders.h -> target_builder_helpers.h
2026-04-17 16:42:52 +02:00
abb128 51947c3aa1 Fix null pointer dereference in start_application (#878) 2026-04-17 16:42:22 +02:00
Patrick Nicolas 8f3f2d4900 Don't use extension for stream scale/bias 2026-04-13 16:23:07 +02:00
Patrick Nicolas 19c5285479 Respect NVIDIA constraints for vulkan encode input
Images can't have mutable flag for vulkan encode on NVIDIA, perform a
copy instead, as they allow transfer dst.
2026-04-12 16:03:05 +02:00
Patrick Nicolas 1f6e237f21 Only write alpha if useful 2026-04-11 16:55:02 +02:00
Patrick Nicolas 9bb39c4809 Drop staging buffer for foveation 2026-04-11 16:55:02 +02:00
Patrick Nicolas b3479eb418 Remove vkResetCommandBuffer 2026-04-11 16:55:02 +02:00
Patrick Nicolas 6ab58430e2 Mark command pools as transient 2026-04-11 16:55:02 +02:00
Patrick Nicolas d535f38938 Reintroduce renderdoc support 2026-04-11 16:55:02 +02:00
Patrick Nicolas 9c3615dd0b Log GPU and queues on vulkan instance creation 2026-04-11 16:55:02 +02:00
Patrick Nicolas a70caa529e Add compositor timings to debug GUI 2026-04-11 16:55:02 +02:00
Patrick Nicolas ce83e8fb03 Major synchronization rework
unify submit/post_submit encoder entrypoints
encoders must now wait for their command completion
use transfer queues for CPU -> GPU copy
2026-04-11 16:55:02 +02:00
Patrick Nicolas fe414c4450 Remove image layout transitions 2026-04-11 16:55:02 +02:00
Patrick Nicolas 74e94c75e8 FR locale 2026-04-11 08:04:59 +02:00
Patrick Nicolas 2180ec5784 Add directory picker for OpenVR library 2026-04-11 08:03:42 +02:00
Patrick Nicolas 6db5b8aeb3 Fix VmaAllocationCreateInfo usage 2026-04-10 14:39:09 +02:00
Patrick Nicolas e1f1e7b800 command line flag for debug gui 2026-04-10 14:39:04 +02:00
Patrick Nicolas a63aba7155 Smarter foveation subsampling 2026-04-10 14:38:51 +02:00
Patrick Nicolas bf510a0f76 Workaround sampling alpha between eyes 2026-04-09 12:29:07 +02:00
Patrick Nicolas e7450df991 Reload interfaces if we don't have multicast or link 2026-04-09 12:16:31 +02:00
Patrick Nicolas 6c6519fab5 Use VK_KHR_maintenance9 (drop queue transfer) 2026-04-04 13:40:47 +02:00
Patrick Nicolas 2ede05dafb Remove broken quads back face culling 2026-04-04 09:56:17 +02:00
Patrick Nicolas 3a6f4d0bdf Fix cylinder crop aspect ratio 2026-04-04 09:56:17 +02:00
caszuu d1cbb730a2 don't send frames before a clock offset is found 2026-04-03 19:50:05 +02:00
Patrick Nicolas eab4686fb1 Don't crash on non existent properties 2026-04-03 17:25:07 +02:00
Patrick Nicolas 6b58b63a33 Crop FOV in layer squasher 2026-04-03 14:19:54 +02:00
Patrick Nicolas 9d0bbdc357 Bind squasher pipeline only once 2026-04-03 14:19:54 +02:00
Patrick Nicolas 0aaf736b48 Return extent in do_layers() 2026-04-03 14:19:54 +02:00
Patrick Nicolas 3149ced724 request eye gaze in compositor 2026-04-03 07:15:40 +02:00
Patrick Nicolas b71a1eddf5 Add support for intra-refresh with vulkan video 2026-04-02 15:17:17 +02:00
Patrick Nicolas 392ed5c4dd Fix in-stream bitrate and foveation tabs 2026-04-02 14:39:48 +02:00
Patrick Nicolas cd9b3fc031 fix race condition in vulkan encoder 2026-04-02 14:39:48 +02:00
Patrick Nicolas 706f76b18d Prevent concurrent vulkan encode operations 2026-04-02 14:39:48 +02:00
Patrick Nicolas 14089200ab Unify vulkan encode checks 2026-04-02 14:39:48 +02:00
Patrick Nicolas 4f00287c6e Skip frame if encoders are still busy 2026-04-02 14:39:48 +02:00
chicco-carone eda77c9273 Add . button to number keyboard 2026-04-02 11:09:05 +02:00
Patrick Nicolas 2dd6f0e6f9 Fix layer squasher specialization constants 2026-04-01 18:20:21 +02:00
Patrick Nicolas 53d2079801 Print a warning if vrclient.so is not found 2026-03-31 21:00:06 +02:00
Patrick Nicolas 78b449e84b Fix doubled bitrate 2026-03-31 16:30:07 +02:00
Patrick Nicolas 6cabcfb047 fix fence status on skipped frames 2026-03-31 16:16:02 +02:00
Patrick Nicolas fc56ced616 Fill in refresh rates in compositor 2026-03-31 15:18:59 +02:00
Patrick Nicolas 1edae28630 Send video description on reconnect 2026-03-31 09:06:27 +02:00
Patrick Nicolas 91953fbef7 Remove now unused env vars 2026-03-31 09:06:27 +02:00
Patrick Nicolas 5c60d70d24 use reinterpret_cast 2026-03-31 09:06:27 +02:00
Patrick Nicolas 796ec69728 Ignore network error in refresh rate change 2026-03-31 09:06:27 +02:00
Patrick Nicolas 23689abaa7 Skip barrier in no-copy vulkan video encode 2026-03-31 09:06:27 +02:00
Patrick Nicolas 22a819b8c8 Implement main compositor
Replace the patches to Monado's main compositor with a local
implementation, reusing code when relevant.

The layer squasher is very close to comp_render_cs, while distortion is
completely replaced by foveation.
2026-03-31 09:06:27 +02:00
Sefa Eyeoglu b2f95938e6 Add wivrn-version dependency to common-base
This causes the packaging in nixpkgs-xr to fail. Not sure why other
builds aren't affected.

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2026-03-28 11:58:39 +01:00
Patrick Nicolas 36a0377dc8 fix build with spaces in directory 2026-03-27 12:58:03 +01:00
Patrick Nicolas fb7703cb76 Only enable AUTOMOC for dashboard 2026-03-24 10:50:54 +01:00
Sapphire 456d65ef8c Use method_pointer to initialise wivrn_session function pointers 2026-03-22 12:50:02 -05:00
Sapphire 902a665c36 Use u_str_xrt_result for pretty-printing xrt_result 2026-03-21 12:26:01 -05:00
Sapphire a491561271 Update Monado 2026-03-20 17:22:00 -05:00
Sapphire 78d7fc40f2 Update Monado 2026-03-20 17:17:50 -05:00
Sapphire 7164a7dbeb Fix build failure in debug 2026-03-20 17:17:48 -05:00
Patrick Nicolas 45907329c7 Set project name + version from git/GIT_DESC 2026-03-20 21:04:02 +01:00
Sapphire 515010aeab C++ify wivrn_comp_target 2026-03-18 21:06:00 -05:00
Patrick Nicolas caa191ff06 Fail on unset GIT_DESC/GIT_COMMIT 2026-03-17 14:41:51 +01:00
Patrick Nicolas 78addc1f22 Add tab interface to wivrnctl 2026-03-14 18:20:32 +01:00
Patrick Nicolas 26f21348f3 Export current client tab on dbus 2026-03-14 18:20:32 +01:00
Patrick Nicolas 7d9031e843 Rework stream tabs management 2026-03-14 17:29:21 +01:00
Patrick Nicolas 79df7370f3 Fix debug build 2026-03-14 17:29:01 +01:00
codedwrench 2b7409b363 fix: correct controller position on pico 2026-03-13 19:58:47 +01:00
Patrick Nicolas b3b2c49da4 Fix vulkan object naming 2026-03-11 18:39:55 +01:00
Patrick Nicolas 13a94f3dec Don't shard over TCP 2026-03-11 18:39:55 +01:00
galister 94ef8945cc add community links to readme 2026-03-06 22:11:06 +01:00
Patrick Nicolas 02d06562a6 Don't reset decoders if there's no change 2026-03-05 10:56:07 +01:00
Patrick Nicolas 9690633030 reset defoveator on decoder change 2026-03-05 10:56:07 +01:00
mitsuami-megane bc115b9969 update ja locale 2026-03-03 07:44:47 +01:00
Patrick Nicolas be75748d5c Fix connection rejecton on headset feature change 2026-03-02 11:52:03 +01:00
Patrick Nicolas 0ad6cf0507 use thread_safe wrapper for hmd battery 2026-03-02 11:47:22 +01:00
Patrick Nicolas 8a4edf46af Simplify decoded frame accessor 2026-03-02 11:26:52 +01:00
Patrick Nicolas 33fac50895 Probe supported codecs only once 2026-03-02 11:07:03 +01:00
Patrick Nicolas 6859db7c34 Add image() accessor in xr::swapchain 2026-03-02 10:57:46 +01:00
Patrick Nicolas f32d6f4710 Drop support for XR_FB_FOVEATION 2026-03-02 10:54:45 +01:00
Patrick Nicolas dfa0fff46d Simplify mdns client object lifetime 2026-03-02 10:32:36 +01:00
Patrick Nicolas 65cc572fde Remove obsolete lock/assertion 2026-03-02 10:18:13 +01:00
Patrick Nicolas ce3e54b2d0 default app_launcher destructor 2026-03-02 10:15:52 +01:00
Cláudio 'Patola' Sampaio 822f28ab23 Translated two 'disconnected' strings 2026-02-28 16:33:36 +01:00
BERADQ 3ac94dc320 Update Simplified Chinese localization -> close #599 2026-02-28 14:48:29 +01:00
BlackCherryCat 7f5d254d8e Update es locale 2026-02-28 09:24:05 +01:00
Patrick Nicolas 51855e195c FR locale 2026-02-27 16:12:46 +01:00
Patrick Nicolas 34ce871f2d IT locale 2026-02-27 16:11:37 +01:00
caszuu 4a1c58a137 fix tracking thread softlock on xr session begin 2026-02-27 16:03:18 +01:00
caszuu 1903d5c910 refuse pair enable requests while session is running 2026-02-27 16:03:18 +01:00
caszuu b96833cc9b semi-workaround for quest gpu memory corruption
From pure trial and error, is seems that swapchain
management on the quest platform is broken. After a
swapchain is destroyed, there is a _chance_ the
next created swapchain will be unusable.

This seems to happen no matter what, where or when
the client decides to clean up its resources and the
safest bet is to not recreate swapchains much.
2026-02-27 16:03:18 +01:00
caszuu 93ee0cc577 add minimal feedback to reconnect errors 2026-02-27 16:03:18 +01:00
caszuu 9a2f31e011 set user presence on session pause / resume 2026-02-27 16:03:18 +01:00
caszuu b5e93607df set refresh rate on session pause / resume 2026-02-27 16:03:18 +01:00
caszuu 9a81bc8213 ignore network errors instead of crashing
wrap some code paths which could cause uncaught
exceptions if called from one of the monado owned
threads.
2026-02-27 16:03:18 +01:00
caszuu a823df96d3 add server error messages 2026-02-27 16:03:18 +01:00
caszuu c44940d004 add server messages (with toasts!) 2026-02-27 16:03:18 +01:00
caszuu 7d11674b2a respect current client selection on session resume
this fixes a bug where non-current non-overlay
clients could get up to the focused session state
when a reconnect occured.
2026-02-27 16:03:18 +01:00
caszuu adf4b1fc84 verify headset compatibility on reconnect 2026-02-27 16:03:18 +01:00
caszuu 5b6e172b41 skip encoding when session paused
this is already done by `offset_est.reset()` as a
side-effect but it's implemented formally in case
that breaks by future changes.
2026-02-27 16:03:18 +01:00
caszuu a8504545e9 refactor reconnect logic
try to merge as much code between the first-time
connect and reconnects under `resume_session()`
without changing current behavior.
2026-02-27 16:03:18 +01:00
Sapphire e81393fe87 Use pose data from device for projection when layer is old 2026-02-27 09:55:07 +01:00
Patrick Nicolas bfe44c6b8d Drop norm > 0.9 assertion 2026-02-26 23:09:41 +01:00
Patrick Nicolas 9df870a7fa Project layers on the first projection one 2026-02-26 22:21:54 +01:00
Schmarni 8a7cc105cb Call openvrChanged instead of tcpOnlyChanged in set_openvr
Signed-off-by: Schmarni <marnistromer@gmail.com>
2026-02-26 15:00:39 +01:00
Schmarni 1e6937d4a4 Add port and hostname config options
Signed-off-by: Schmarni <marnistromer@gmail.com>
2026-02-26 15:00:39 +01:00
BERADQ 0f21191e9b Check NVENC intra-refresh capability before enabling the feature 2026-02-26 15:00:05 +01:00
BERADQ 6254386370 Set intra refresh period and count to fixed values. 2026-02-26 15:00:05 +01:00
BERADQ e32d3bbf36 Enable intra refresh for H264/HEVC/AV1 with period=fps and count=fps/2 2026-02-26 15:00:05 +01:00
Patrick Nicolas 63cb9ff179 Use same trigger threshold as in Monado 2026-02-25 21:08:18 +01:00
BERADQ a16a0df1c0 Update Simplified Chinese localization -> close #599 2026-02-25 14:56:26 +01:00
Patrick Nicolas f476f9a1db Default refresh rate < 100Hz 2026-02-23 19:14:44 +01:00
Gabriel ea84391ba3 Unacceptable and deplorable typo fixed 2026-02-22 15:33:33 +01:00
Sapphire 71ee653312 Update Monado 2026-02-21 17:11:22 +01:00
Sapphire 19ac929be9 Update Monado 2026-02-21 17:11:22 +01:00
Sapphire 4ff91f1e13 Update Monado 2026-02-21 17:11:22 +01:00
Sapphire e837396944 Update Monado 2026-02-21 17:11:22 +01:00
Patrick Nicolas 51ee0b46ac Be less strict for quaternions norm 2026-02-20 23:38:43 +01:00
Patrick Nicolas eddda44def Don't recreate hand trackers on each frame 2026-02-20 17:34:31 +01:00
Patrick Nicolas f8a6db5834 vk/video: fix crash on iGPU 2026-02-20 15:56:34 +01:00
Patrick Nicolas 42c64a6569 vk/video: don't copy the whole buffer 2026-02-19 13:43:08 +01:00
Patrick Nicolas b4349767ce vk/video: properly lock queues 2026-02-19 13:43:04 +01:00
Patrick Nicolas b8e9c79180 vk/video: don't query offset, it is always 0 2026-02-19 13:43:04 +01:00
Patrick Nicolas df6667fd0d vk/video: unify encoded image copy code 2026-02-19 13:42:51 +01:00
Patrick Nicolas 7732dc87df Add workaround for garbled image on Intel B580 2026-02-18 14:04:45 +01:00
Patrick Nicolas 1f42c0cfb8 CI: Update clang-format action 2026-02-18 12:17:50 +01:00
BlackCherryCat 01caa4e7c5 Update es locale 2026-02-18 09:52:37 +01:00
Patrick Nicolas e97618e99e Add try/catch when reading Steam VR manifest 2026-02-18 09:26:48 +01:00
Patrick Nicolas a651f1b252 Fix config reset when selecting app 2026-02-18 09:24:03 +01:00
mitsuami-megane 31e98fceab update ja locale 2026-02-17 09:41:26 +01:00
Cláudio 'Patola' Sampaio 07f50572ea Translated two messages to pt_BR 2026-02-16 23:28:31 +01:00
Patrick Nicolas a94edf52e2 Don't abort if Vulkan is not available 2026-02-16 21:54:48 +01:00
Patrick Nicolas 6b9e1e108c Update FR locale 2026-02-16 21:48:09 +01:00
Patrick Nicolas 749649d868 Add check for llvmpipe in dashboard 2026-02-16 21:47:13 +01:00
Patrick Nicolas 9353646b55 Support icons in ~/.local/share/icons 2026-02-16 20:32:34 +01:00
Patrick Nicolas 219146e763 Minimal fallback hicolor icon theme definition 2026-02-16 20:32:34 +01:00
Patrick Nicolas 6c202db59e Update derived poses 1s after interaction profile
Also ignore it for hand interaction
2026-02-15 00:02:17 +01:00
Patrick Nicolas df76543fb7 Don't store poses if timesync is not ready 2026-02-14 23:34:14 +01:00
Patrick Nicolas b09af79edc Don't return valid data if too far from know times 2026-02-14 09:50:28 +01:00
Patrick Nicolas 627e87c144 Ensure pose quaternions are normalized 2026-02-13 23:25:45 +01:00
Guillaume Meunier 66a56dac82 Work around HTC bugs 2026-02-13 17:26:53 +01:00
Guillaume Meunier 1158afdad5 Clip the imgui layers to only the useful part 2026-02-13 17:26:53 +01:00
Guillaume Meunier b5d4f67860 Put the tooltips in a different layer 2026-02-13 17:26:53 +01:00
Guillaume Meunier 067d3a7679 Store the name of custom shaders in the glTF file 2026-02-13 17:15:21 +01:00
Guillaume Meunier fc5f0b9c6c Tweak pointer appearance 2026-02-13 17:15:21 +01:00
Guillaume Meunier 17bae9459a Use custom clipping to clip controller rays 2026-02-13 17:15:21 +01:00
Guillaume Meunier b80814adb5 Fix ray brightness in stream scene 2026-02-13 17:15:21 +01:00
Guillaume Meunier bb6280a9c3 Add ray trail 2026-02-13 17:15:21 +01:00
Guillaume Meunier a1dad6962c Allow passing extra data to the vertex/fragment shader 2026-02-13 17:15:21 +01:00
Guillaume Meunier ed433905c0 Add WIVRN_DEBUG_SHADERS option 2026-02-13 17:15:21 +01:00
Patrick Nicolas 2d45d53cc7 Remove check for visualid and glxFBconfig 2026-02-13 16:31:09 +01:00
Patrick Nicolas 4cd6862c1a Remove environment variables for foveation center 2026-02-13 15:42:51 +01:00
Guillaume Meunier b34aa59876 Use inplace_vector in scene.cpp 2026-02-13 15:42:51 +01:00
Patrick Nicolas 2f54a74b05 Use inplace_vectors in stream.cpp 2026-02-13 15:42:51 +01:00
Patrick Nicolas 0b7cf25a93 Use inplace_vector for body trackers 2026-02-13 15:42:51 +01:00
Guillaume Meunier 3bbaf8b8e2 Add inplace_vector from https://github.com/bemanproject/inplace_vector, commit 72e9bab7cca228be63294823a4809723a6580716 2026-02-13 15:42:51 +01:00
Patrick Nicolas fe46fc4545 Replace some unique_ptr with optionals 2026-02-13 15:42:51 +01:00
Patrick Nicolas 5d1ba50e92 Refactor Steam libraries 2026-02-13 14:37:03 +01:00
Patrick Nicolas 74946403f0 Only read shortcuts file for current Steam user 2026-02-13 14:36:47 +01:00
Patrick Nicolas 9af70baa58 Add utility to guess Steam user ID 2026-02-13 14:36:47 +01:00
Patrick Nicolas c0a061b4be Rename wlx-overlay-s -> WayVR in metainfo 2026-02-13 09:51:35 +01:00
Patrick Nicolas c19056498d Switch flatpak/native recommendations, add notes 2026-02-12 12:27:28 +01:00
Patrick Nicolas 6f6ccefbf3 Move foveation config out of "if post processing" 2026-02-12 10:52:05 +01:00
Patrick Nicolas 06d771b89e Fix flickering screen after disconnect
Deleting the stream object has to be delayed until all Vulkan work is
done.
2026-02-11 23:36:17 +01:00
Patrick Nicolas 50ae773fec Don't log "error: " in mic change for no error 2026-02-11 20:40:01 +01:00
Patrick Nicolas 6cf46a6b73 Initialize view flags to 0 2026-02-11 19:38:11 +01:00
Sapphire f0e3e8d4ad Re-enable microphone on reconnect 2026-02-11 18:33:11 +01:00
Patrick Nicolas 399477edf5 Skip some memory copies in vulkan encode 2026-02-11 14:34:06 +01:00
Patrick Nicolas 0ec0de4509 Update vulkan memory allocator to 3.3.0 2026-02-11 14:34:06 +01:00
Patrick Nicolas a8657f7f91 Fix manual foveation window position 2026-02-11 12:30:56 +01:00
Sapphire 87b11d6817 Don't send empty HEAD pose on failed xrLocateSpace 2026-02-11 09:08:05 +01:00
Guillaume Meunier 6ccf6eaf26 Fix fr locale 2026-02-10 21:14:40 +01:00
Sapphire 375d06dee2 Update Monado 2026-02-10 09:07:17 +01:00
Patrick Nicolas 6b407a2d1c re-fix eye tracked foveation on Pico 2026-02-09 15:14:48 +01:00
Patrick Nicolas a712eec83a Update xrizer 2026-02-09 09:32:45 +01:00
Jonathan Steffan be96c4da4f fix(polynominal-interpolator): FTBFS on ppc64le 2026-02-08 19:40:03 +01:00
Jonathan Steffan 8b4b021048 fix(server-driver): add missing mutex includes 2026-02-08 18:26:09 +01:00
Patrick Nicolas a610fef6ac Fix APK not being attached to release 2026-02-08 16:36:35 +01:00
Hüseyin Fahri Uzun d81734f7e2 Updated TR translation (#771) 2026-02-08 15:03:54 +01:00
Patrick Nicolas 7166e06ada Prepare 26.2 release 2026-02-08 10:15:39 +01:00
Patrick Nicolas e1392fef3a Request gaze relative to world on Pico devices 2026-02-08 08:52:02 +01:00
BERADQ 1a3a81201b Update Simplified Chinese localization -> close #599 2026-02-08 08:49:59 +01:00
Jonathan Steffan 5ac1e06291 fix(encoder_settings): fix FTBFS when only WIVRN_USE_VULKAN 2026-02-07 20:57:00 +01:00
Patrick Nicolas 915aed8df1 Avoid showing both hand and controller in lobby 2026-02-07 10:21:32 +01:00
BlackCherryCat 3acf9f26f2 Update es locale 2026-02-07 09:15:23 +01:00
Patrick Nicolas 1398b9ebfd Fix raw encoding 2026-02-06 23:11:51 +01:00
Sapphire 5d87ce04fc Log result on failed calls 2026-02-06 13:56:08 -06:00
Sapphire a9b065df55 Fix assert with eye tracking in debug build 2026-02-06 13:42:00 -06:00
Sapphire 994f67d5fe Update SolarXR patches 2026-02-05 16:06:40 -06:00
Sapphire e1c12b8720 Update Monado 2026-02-05 16:01:07 -06:00
Patrick Nicolas 9e8f231714 Remove virtual property form pipewire devices 2026-02-05 18:41:31 +01:00
Patrick Nicolas 3fc3dfa575 Normalize elements in PATH for launch by systemd 2026-02-05 09:44:34 +01:00
8osm3rka ab7e497735 feat(translations): update ru translation (#762) 2026-02-05 09:33:19 +01:00
Sapphire 6d49f409ad Update Monado 2026-02-04 19:06:50 -06:00
Sapphire 2ec78da729 Use 5mbps step size for bitrate slider 2026-02-04 18:26:26 -06:00
Sapphire bb92a5e388 Fix possible client abort on startup 2026-02-04 18:26:25 -06:00
Bluscrn 2fdb21ed68 Improve README
Make the README nicer (in my opinion)
2026-02-04 23:07:44 +01:00
Sapphire e46e8f26b4 Catch exceptions when starting application via client app list 2026-02-04 14:45:30 -06:00
Sapphire a8148378d9 Skip directories we can't read when finding desktop files 2026-02-04 14:15:34 -06:00
Sapphire 48c480e303 Catch exceptions when reading desktop files 2026-02-04 14:15:34 -06:00
Guillaume Meunier edf00c5f35 Keep debug symbols in CI 2026-02-04 20:46:41 +01:00
Sapphire fe64caf273 Update Monado 2026-02-04 12:08:01 -06:00
Patrick Nicolas 363b487d74 Reset spinner when going back to launcher 2026-02-04 10:46:58 +01:00
Patrick Nicolas 3285a485e8 Send hand data even if hand is not visible 2026-02-04 10:25:32 +01:00
Patrick Nicolas dec566f3d2 Don't extrapolate when data become invalid 2026-02-04 10:25:32 +01:00
mitsuami-megane 628a19a3e1 update ja locale 2026-02-04 10:20:12 +01:00
galister e878896595 fix foveation for VIEW-relative gaze 2026-02-04 09:37:26 +01:00
Patrick Nicolas 30fddf7518 Prevent eye gaze extrapolation 2026-02-04 09:37:26 +01:00
Patrick Nicolas 67f4ced505 Store eye gaze relative to view 2026-02-04 09:37:26 +01:00
galister 02b212483c foveated encoding slider steps to 5 2026-02-04 09:05:55 +01:00
Patrick Nicolas 25f7a3dddb Better fix for fast-path 2026-02-03 22:11:26 +01:00
Patrick Nicolas 6bb842cc2d Fix layer used for fast-path data 2026-02-03 21:58:02 +01:00
Patrick Nicolas 5837fa3a12 Autoconnect only once 2026-02-03 20:56:58 +01:00
Sapphire bd7fd535fe Update Monado 2026-02-03 09:59:17 -06:00
Patrick Nicolas 829d7c0b7a CI: append timestamp for ccache 2026-02-03 08:02:45 +01:00
Patrick Nicolas 3a1f47285a Clear face tracking data in polling loop 2026-02-03 08:02:45 +01:00
Patrick Nicolas cda9595a27 Don't request extrapolated data for face tracking 2026-02-03 08:02:45 +01:00
Patrick Nicolas ead0150932 More coherent face tracking timestamps 2026-02-03 08:02:45 +01:00
Patrick Nicolas c0b78c1ec4 Don't drop face tracking packets 2026-02-03 08:02:45 +01:00
Patrick Nicolas c693993748 Revert "Remove simple_controller binding for hand interaction"
This reverts commit 1e2823c019.
2026-02-02 19:16:04 +01:00
Cláudio 'Patola' Sampaio 6961485430 2 new strings + formatting fix 2026-02-02 18:24:13 +01:00
Patrick Nicolas 0d5aa4d887 Hide USB text once connected 2026-02-02 14:05:42 +01:00
Patrick Nicolas 542b9822cf FR locale 2026-02-02 10:54:14 +01:00
Patrick Nicolas ef21074d29 Show exit confirmation if connection is active 2026-02-02 10:51:56 +01:00
Patrick Nicolas d5e4e3cfce Add a warning when closing the dashboard 2026-02-02 10:45:45 +01:00
Sapphire 18b00fde24 Update Monado 2026-02-01 19:38:40 +01:00
Jonathan Steffan 5aa90f5d0a fix(dashboard): add missing includes
The close() function requires <unistd.h> to be included. This was
not caught on older toolchains which transitively included it through
other headers, but newer GCC/glibc requires explicit includes.
2026-02-01 17:37:51 +01:00
Patrick Nicolas e3b4dfd29a Fix Android build with vulkan validation layers 2026-02-01 15:08:11 +01:00
Patrick Nicolas 7ae5dd2921 Don't enable validation layers in debug 2026-01-31 21:11:14 +01:00
Patrick Nicolas 7e50e6a38f Fix git desc/commit logic in cmakelists 2026-01-31 13:53:28 +01:00
Patrick Nicolas 370b7e87a8 Remove the "release" branch update in CI 2026-01-30 22:57:27 +01:00
Patrick Nicolas 6afa5fc67f Add -ffast-math 2026-01-30 21:10:08 +01:00
Patrick Nicolas bd264e23b6 Limit extrapolation based on production time 2026-01-30 16:43:54 +01:00
Patrick Nicolas 2919f7d820 Fix vulkan error on queue transfer
Queue transfer acquire was performed by each encoder, it needs to be
done only once, for the first one.
2026-01-30 16:29:53 +01:00
Patrick Nicolas f6d151c040 Fix 0 refresh rate used with Auto refresh rate 2026-01-30 15:18:06 +01:00
Patrick Nicolas 0efa540ce0 Use R16_UNORM, fixes 10bit encoding on NVIDIA 2026-01-30 15:00:21 +01:00
Patrick Nicolas f3cfa0d747 fix (hackish) for eye-tracked foveation 2026-01-29 22:06:03 +01:00
Patrick Nicolas 2d8c5002ec Add WIVRN_DUMP_* vars for dumping tracking data 2026-01-29 09:51:59 +01:00
Patrick Nicolas 3d24faa47a Remove WIVRN_DUMP_TRACKING 2026-01-29 09:51:59 +01:00
Guillaume Meunier 2d400d9314 Add CSV logger 2026-01-29 09:51:59 +01:00
Patrick Nicolas 30f472bdb4 Fix refresh resh adjusting after quitting an app 2026-01-29 09:51:59 +01:00
Patrick Nicolas f5597a81fd Don't extrapolate hands, interpolate wrist 2026-01-29 09:51:59 +01:00
Patrick Nicolas 47d7322070 Remove bool return from update_tracking 2026-01-29 09:51:59 +01:00
Patrick Nicolas 3f58345cf0 Catch exceptions when updating mic state 2026-01-29 09:51:59 +01:00
Patrick Nicolas fc01002317 Control the tracking loop from server side
On server side, collect each tracking request, create an explicit pattern
describing how the client shall execute them.
2026-01-29 09:51:52 +01:00
Patrick Nicolas 0a71756024 Don't ask for pose in compositor when using fast-path 2026-01-28 07:26:15 +01:00
Patrick Nicolas 4e3eff6505 Split net and worker threads 2026-01-27 17:32:34 +01:00
Patrick Nicolas 25c2449a5e Use polynomial interpolation for poses and views 2026-01-27 17:32:34 +01:00
Jonathan Steffan 97d6a19199 Merge pull request #743 from damaestro/add-debugging-docs
docs(debugging): add debugging documentation
2026-01-26 09:05:33 -07:00
Jonathan Steffan 254f32b262 docs(debugging): add debugging documentation 2026-01-25 18:33:31 -07:00
Patrick Nicolas c846cb1ed2 Don't force 10 bit for H.265 and AV1 2026-01-25 12:26:19 +01:00
Patrick Nicolas 20a81ed004 Add check for VAAPI 10 bit encoding 2026-01-25 12:21:50 +01:00
Patrick Nicolas 6fcc19d198 Fix version for debian package in CI 2026-01-24 21:54:13 +01:00
Patrick Nicolas cd614c2361 Fix error for shortcuts with no icon 2026-01-24 15:20:32 +01:00
Patrick Nicolas 4831e8847d case insensitive comparison for vdf files 2026-01-24 15:16:20 +01:00
Patrick Nicolas 2ee3306d6a Assign audio channel names for pipewire 2026-01-23 18:43:53 +01:00
Patrick Nicolas 2893ab857d Remove force-quantum for mic as well 2026-01-21 18:22:32 +01:00
Patrick Nicolas 94457a566a Remove incorrect force-quantum value for pipewire 2026-01-21 13:07:00 +01:00
Patrick Nicolas 740b255461 Only read relevant info from appcache 2026-01-20 15:06:18 +01:00
Patrick Nicolas cc773294e3 Read non-Steam games using shortcuts.vdf 2026-01-20 14:05:06 +01:00
Patrick Nicolas 514c44b0a1 Log command launched through systemd units 2026-01-20 12:46:07 +01:00
Patrick Nicolas 5e4108f1c1 Don't build libnotify in flatpak 2026-01-19 23:23:18 +01:00
Patrick Nicolas 62a626e35e Avoid memory allocation in UDP receive 2026-01-19 21:41:04 +01:00
Patrick Nicolas e06d0d0943 Optimize away a memory allocation 2026-01-19 21:41:04 +01:00
Guillaume Meunier b632502da5 Fix missing starry background in nightly builds published on the Meta store 2026-01-19 21:40:34 +01:00
Patrick Nicolas 25a532bc15 Handle Path= argument in .desktop files 2026-01-19 10:40:37 +01:00
Patrick Nicolas 70adbafdc9 shared_ptr -> unique_ptr for audio handle 2026-01-18 16:23:17 +01:00
Guillaume Meunier 317cd6bb91 Compress quaternions in hand tracking packets 2026-01-16 18:01:05 +01:00
Patrick Nicolas 3702cc05b8 Fix dissector for big vectors 2026-01-15 09:28:27 +01:00
Patrick Nicolas eeb624875e Fix dissector TCP support 2026-01-15 09:28:27 +01:00
Patrick Nicolas a49cc3dea8 Cleanup some files during ct-ng build (flatpak) 2026-01-13 19:07:37 +01:00
Patrick Nicolas cd8abacd7b Update crostool-ng 2026-01-13 14:09:42 +01:00
Patrick Nicolas 6a49861b50 Update eigen for Flatpak build 2026-01-12 23:43:49 +01:00
Patrick Nicolas 061039b645 glm hash was changed once again 2026-01-12 23:41:57 +01:00
Patrick Nicolas f963d336ab update Monado 2026-01-12 23:39:32 +01:00
Antti Keränen bf0a1bc184 Update flake to latest nixpkgs
- invalidateFetcherByDrvHash is now under testers
- Trim monado-rev to not break fetchFromGitlab if the file has trailing
  whitespace
2026-01-11 18:02:26 -06:00
BERADQ cdc4a8f3d6 Update Simplified Chinese localization -> close #599 2026-01-10 09:27:21 +01:00
Patrick Nicolas 5bb7310093 Fix possible crash on stream init 2026-01-09 18:04:46 +01:00
Patrick Nicolas 1de1b19201 Spawn children using systemd by default 2026-01-09 09:43:49 +01:00
Patrick Nicolas ae740acbb5 Update libnotify 2026-01-09 09:16:13 +01:00
BlackCherryCat f58f9c7e0b Update es locale 2026-01-07 18:18:33 +01:00
Patrick Nicolas 0b134102d2 Fix app data overriden by about data 2026-01-07 09:11:40 +01:00
Patrick Nicolas 7870cc6484 fix typo in configuration doc 2026-01-06 21:28:06 +01:00
Patrick Nicolas 43bbb8b0f8 Add check for 10 bit GPU image support 2026-01-06 18:48:47 +01:00
Cláudio 'Patola' Sampaio 2c9928db63 12 strings translated to pt-br 2026-01-06 18:30:16 +01:00
Patrick Nicolas 81363b3602 FR locale 2026-01-06 17:57:54 +01:00
Patrick Nicolas a291226a46 Add About page 2026-01-06 17:57:54 +01:00
Patrick Nicolas 2e1e5571d6 Left align server/headset info 2026-01-06 17:57:54 +01:00
Patrick Nicolas d6768d59a7 Rework dashboard main page 2026-01-06 17:57:54 +01:00
Patrick Nicolas 12cddd4d6f Add connected headset SystemName property in dbus 2026-01-06 13:07:32 +01:00
Cláudio 'Patola' Sampaio b284daca6a Translated 1 message to pt-br 2026-01-06 11:25:05 +01:00
Francesco d4854d77b0 Fix pipewire sink setup (#717) 2026-01-06 10:28:01 +01:00
InconsolableCellist caba985ce1 705: Add version number to main tab (#719) 2026-01-05 22:05:35 +01:00
Patrick Nicolas 26bdd6e85b Ensure proper configuration is loaded in Main page 2026-01-05 15:53:17 +01:00
InconsolableCellist 867c78d826 Fix infinite loop in find_dir when reaching root directory (#708)
The previous loop condition `not copy.empty()` would never terminate
at the filesystem root since root paths (e.g., "/" or "C:\") are never
empty and their parent_path() returns themselves.
2026-01-03 13:10:56 +01:00
Patrick Nicolas 1e488a8a9c Prevent going back after first page 2026-01-01 23:03:18 +01:00
Patrick Nicolas 6be85971ea Fix invisible buttons when going back 2026-01-01 23:03:18 +01:00
Patrick Nicolas fe8c320d67 Revert "Fix pipewire sink setup (#716)"
This reverts commit eb99b474ae.
2026-01-01 22:09:43 +01:00
Francesco eb99b474ae Fix pipewire sink setup (#716) 2026-01-01 18:46:25 +01:00
Rose/Wren 857e5fce2c Fix glm hash after repacking 2026-01-01 10:17:55 +01:00
BERADQ f383eb8e8d Update Simplified Chinese localization -> close #599 2025-12-31 11:35:09 +01:00
Sapphire a3c7a604e0 Pass session and stop token through reconnect flow 2025-12-31 00:59:36 -06:00
Sapphire 416297f232 Change refresh rate and bitrate on connect 2025-12-31 00:59:36 -06:00
Sapphire 205c84b273 Don't listen to stdin in accept_connection
Fixes reconnect when server is spawned by systemd
2025-12-31 00:59:36 -06:00
Sapphire 727d4fab4d Use ipc_server_stop to exit during reconnect 2025-12-31 00:59:33 -06:00
Sapphire 21c04be1f8 Transition app to STOPPING state on requested app quit 2025-12-30 05:21:34 -06:00
Sapphire 08ebe00a4d Update monado 2025-12-30 05:21:34 -06:00
Sapphire 1c3b6dd2e3 Update monado 2025-12-30 05:21:34 -06:00
Sapphire 9df93b2cad Update monado 2025-12-30 05:21:34 -06:00
Cláudio 'Patola' Sampaio 1ec4340c74 Added 5 new strings, corrected an older one 2025-12-30 09:32:09 +01:00
Patrick Nicolas 6356f37f4d Remove outdated build informations 2025-12-29 20:21:17 +01:00
Patrick Nicolas c217577b81 CI: cache git clones too 2025-12-29 18:11:59 +01:00
Patrick Nicolas ea7ab55198 Fix software encoding configuration 2025-12-29 18:03:09 +01:00
Patrick Nicolas 01bc6e8804 FR, IT locales 2025-12-29 15:56:57 +01:00
Patrick Nicolas 0393f7cb07 Extended configuration value toggle 2025-12-29 15:56:57 +01:00
Patrick Nicolas e41410bcc9 Hide unsupported features in lobby config 2025-12-29 15:56:57 +01:00
Patrick Nicolas dce89d655f Replace stream resolution with foveation 2025-12-29 15:56:57 +01:00
Sawkez 832df65d17 Add controller offsets for Pico Neo 3 (#696) 2025-12-28 20:23:59 +00:00
Patrick Nicolas d1d6c343a3 Update xrizer to 0.4 2025-12-28 09:43:40 +00:00
Sapphire 3df615cb8a Fix nvenc build without vaapi 2025-12-26 19:43:58 -06:00
Patrick Nicolas 2e1ed8d87e Add README section about application list 2025-12-22 20:48:35 +01:00
akazdayo 9d8f64e6f2 fix: translation typo 'thumbstick' 2025-12-22 10:29:26 +01:00
Sapphire da9392c791 Enable local dimming 2025-12-21 13:54:14 -06:00
Patrick Nicolas 291ab85bd6 remove some leftover bitrates in docs 2025-12-21 15:21:41 +01:00
Sapphire 1e2823c019 Remove simple_controller binding for hand interaction 2025-12-21 12:04:19 +01:00
peelz 1a35e1f7fc Add SolarXR support 2025-12-20 21:01:09 +01:00
Patrick Nicolas f4c4021e20 Fix build with old vulkan_hpp 2025-12-20 18:50:12 +01:00
Patrick Nicolas 6fc48c7d4f Fix crash on "start by USB" 2025-12-20 08:32:03 +01:00
Guillaume Meunier 52eef0e02e Fix christmas logo shading 2025-12-19 20:27:06 +01:00
Patrick Nicolas 2095ab6f7e Prepare 25.12 release 2025-12-19 11:33:52 +01:00
Sapphire 65a02bb04f Fix setting active runtime in Flatpak 2025-12-19 02:24:13 -06:00
Patrick Nicolas fc6fcda0cd Default to power saving on Quests only 2025-12-17 22:58:27 +01:00
Patrick Nicolas 366792cf46 Mention xrizer in readme, tweak Steam flatpak info 2025-12-16 23:31:20 +01:00
Patrick Nicolas a1f186eb23 Hide avahi not installed warning if it's running
This may happen if we don't have permissions to read files, but the
daemon is available through dbus
2025-12-16 23:15:52 +01:00
Patrick Nicolas 8940220fc2 Add support for per-ABI OpenXR manifest 2025-12-16 23:11:28 +01:00
Patrick Nicolas 4c2e24536d Enable lighthouse by default 2025-12-16 21:40:09 +01:00
Guillaume Meunier 172ef89dea Add christmas logo 2025-12-16 21:27:34 +01:00
Patrick Nicolas bb4d12ef33 Fix plot labels translations
They wouldn't change on settings changes
2025-12-16 17:26:13 +01:00
Guillaume Meunier 06ad530e2f Use vertex colors, use normal maps 2025-12-15 19:00:23 +01:00
Guillaume Meunier a32a4e4182 Don't display an error message when cancelling a file picking operation 2025-12-15 19:00:23 +01:00
Guillaume Meunier 5329bfd28c Add missing vibes 2025-12-15 19:00:23 +01:00
BlackCherryCat e4df4191ce Update es locale 2025-12-15 17:28:39 +01:00
galister f89606f8a9 building.md: Lighthouse driver
Add Lighthouse driver support for lighthouse-tracked devices and mention absolute paths in OpenXR runtime manifest.
2025-12-15 17:03:25 +01:00
Patrick Nicolas d43d864dee Prevent assertion failure in nvenc probe 2025-12-15 14:28:51 +01:00
mitsuami-megane 2b9e267fc8 add instructions to help with steamvr_lh confusion 2025-12-15 11:00:34 +01:00
Mitsuami 24faf2cd3b update ja locale (#674) 2025-12-15 05:17:57 +00:00
BERADQ 8e7192c767 Update Simplified Chinese localization -> close #599 2025-12-14 13:45:38 +01:00
Patrick Nicolas 2585754497 Update OpenXR to 1.1.54 2025-12-14 10:06:50 +01:00
Guillaume Meunier c16478b940 aim_left and aim_right don't need offsets anymore on Quest 3 when using OpenXR 1.1.53 2025-12-13 17:16:39 +01:00
Cláudio 'Patola' Sampaio c0532ce6e4 Translated 3 new messages to pt_BR 2025-12-13 13:59:57 +01:00
Patrick Nicolas ba3d582c92 IT locale 2025-12-13 11:28:30 +01:00
Patrick Nicolas 741298be97 FR locale 2025-12-13 11:28:30 +01:00
Patrick Nicolas e6e32ce39d Move application configuration in settings 2025-12-13 11:28:30 +01:00
Patrick Nicolas 0d865ffc14 Start server after avahi "fix it" 2025-12-13 11:28:30 +01:00
Patrick Nicolas e46c317f87 Add link to db.vronlinux.org in troubleshoot 2025-12-13 11:28:30 +01:00
Patrick Nicolas 340c0d546b Remove autostart application from wizard 2025-12-13 11:28:30 +01:00
Patrick Nicolas ad31a8dfcc Add USB tooltip in wizard 2025-12-13 11:28:30 +01:00
BERADQ e1d5f0e636 Update Simplified Chinese localization -> close #599 2025-12-12 19:08:11 +01:00
marcin.mirski 225a0db69e Add STATUS mode to mode-less CMake message commands 2025-12-12 08:15:00 +01:00
Sapphire f340dc5940 Don't patch pinch_ext or pose_ext into non-controller interaction profiles 2025-12-11 22:59:05 -06:00
Cláudio 'Patola' Sampaio 2057aff195 Updated stream/foveation strings in pt_BR 2025-12-11 15:50:31 +01:00
Patrick Nicolas 7587b6ae84 Remove codec and bit-depth configuration from GUI 2025-12-11 13:42:16 +01:00
Patrick Nicolas 5a669e71f5 Allow simple string for encoder configuration 2025-12-11 13:42:16 +01:00
Sapphire 6f32f049d7 Add codec and 10-bit config in headset 2025-12-11 13:42:16 +01:00
Patrick Nicolas 9b4a26b5a8 Default stream resolution based on eye tracking 2025-12-10 14:32:44 +01:00
Patrick Nicolas db345c832d remove bit-depth for automatic codec 2025-12-10 14:32:05 +01:00
Patrick Nicolas 0b526cef9d configure bitrate on client only 2025-12-10 14:32:01 +01:00
Patrick Nicolas e0cbd202a8 stream resolution (foveation) config in headset 2025-12-10 14:30:40 +01:00
Patrick Nicolas b2f3b925d9 Prefer h265 over h264 2025-12-10 14:00:47 +01:00
Patrick Nicolas 5ab7731be3 Remove server foveation config, rework defaults 2025-12-10 14:00:47 +01:00
Patrick Nicolas 5c50b9a1ad WIP: fixed encoder layout 2025-12-10 14:00:47 +01:00
Patrick Nicolas bf811ac65d add obsolete interaction profile bindings 2025-12-09 17:49:31 +01:00
BERADQ 099d68a83d Update Simplified Chinese localization -> close #599 2025-12-09 15:35:47 +01:00
Sapphire db622b4252 Derive pinch and poke poses for non hand_interaction profiles from grip 2025-12-09 04:10:40 -05:00
Sapphire 6638cefb37 Unify wivrn_controller and wivrn_hand_interaction device code 2025-12-09 04:10:40 -05:00
Sapphire 740dcfdcfb Add poke_ext and pinch_ext poses to all profiles 2025-12-09 04:10:40 -05:00
perillamint 281dd6000e Fix GalaxyXR controller offset
Fix GalaxyXR controller offset to controller model properly overlap the
passthrough image
2025-12-08 15:05:29 +01:00
Guillaume Meunier bd907d8496 Add Pico 4 Ultra controller model 2025-12-08 14:59:35 +01:00
Guillaume Meunier 854e4c7b57 Download controller models at compile time, add Samsung Galaxy XR controller 2025-12-08 14:59:35 +01:00
Cláudio 'Patola' Sampaio e394cb0dcb updated 4 pt_BT strings 2025-12-07 17:47:04 +01:00
Sapphire 4553379d74 Hide GUI and use thumbstick for in-stream bitrate adjustment 2025-12-07 09:32:02 -05:00
Sapphire ca45eed21e Change stream GUI bitrate step size to 10% 2025-12-07 09:32:02 -05:00
Sapphire fad0a8feee In-stream GUI bitrate adjustment 2025-12-07 09:32:02 -05:00
Sapphire bb07e5afd7 Change resolution scale step size to 10% 2025-12-07 09:32:02 -05:00
Guillaume Meunier 0a2c374b52 Update imgui and entt 2025-12-06 19:56:42 +01:00
Patrick Nicolas fadaf7600a Remove more unused symbols in Android build 2025-12-06 19:24:18 +01:00
Patrick Nicolas afc9766840 Fix pink image on Intel GPUs
Somehow under spir-V 1.3 it behaves as if each shader is executed twice
2025-12-06 16:47:41 +01:00
Sapphire 2c7812069e Mention PRESSURE_VESSEL_IMPORT_OPENXR_1_RUNTIMES in steamvr docs page 2025-12-05 14:36:21 +01:00
Sapphire 007aed6310 Mention xrizer in steamvr docs page 2025-12-05 14:36:21 +01:00
Sapphire aef6c1bced Handle assignment of ANY_HAND_CONTROLLER devices from steamvr_lh 2025-12-05 09:39:55 +01:00
Sapphire 8874ea8753 Properly handle switching interaction profiles on controller disconnection 2025-12-05 09:37:57 +01:00
BERADQ d1308bfbb8 Update IDR handler to explicitly handle dropped IDR frames and ignore dropped non-reference frames. 2025-12-04 15:59:18 +01:00
BERADQ a37498eedf Optimize NVENC encoding configuration 2025-12-04 15:53:34 +01:00
Sapphire 24380867d4 Fix lobby GUI crashing on PC 2025-12-04 11:16:31 +01:00
Sapphire f2a202f29d Use std::ranges::copy for copying tracking data in face trackers 2025-12-04 11:16:31 +01:00
Sapphire 831bdf7a29 Return proper sample_time_ns in face trackers 2025-12-04 11:16:31 +01:00
Sapphire 53d94d6c04 Log unsupported input requests on face trackers 2025-12-04 11:16:31 +01:00
Sapphire b1aaeb78e8 Return XRT_ERROR_INPUT_UNSUPPORTED for unsupported input in trackers 2025-12-04 11:16:31 +01:00
Sapphire 51d8742029 Forward XR_ANDROID_face_tracking 2025-12-04 11:16:31 +01:00
Sapphire ac0a926811 Update to OpenXR 1.1.53 2025-12-04 11:16:31 +01:00
Sapphire a4e5475ff7 Update monado 2025-12-04 11:16:31 +01:00
Sapphire 804f85e7b8 Update monado 2025-12-04 11:16:31 +01:00
Sapphire eadd9a1813 Update monado 2025-12-04 11:16:31 +01:00
Sapphire f0ab1284f3 Update monado 2025-12-04 11:16:31 +01:00
Sapphire fc4a2bf49d Update monado 2025-12-04 11:16:31 +01:00
Sapphire e94901043b Update monado 2025-12-04 11:16:31 +01:00
Sapphire 3cf46e03e3 Update monado 2025-12-04 11:16:31 +01:00
Guillaume Meunier f12ebe14bc Fix assertion failure when reading controller state for imgui 2025-12-04 08:50:51 +01:00
Patrick Nicolas 85cde18718 Handle mismatched frames more gracefully
Use pose/fov/foveation from views individually, in case of dropped
frames, data may be different per eye
2025-12-04 07:59:49 +01:00
Patrick Nicolas 23b643422b fix ffmpeg handling of dropped frames 2025-12-04 07:43:20 +01:00
Cláudio 'Patola' Sampaio c183857113 translated 3 new msgs to pt_br 2025-12-03 20:08:25 +01:00
BERADQ c05104ba82 Update Simplified Chinese localization -> close #599 2025-12-03 14:32:13 +01:00
Patrick Nicolas 9eb3ecb4d5 Revert "Download monado by URL instead of git"
This reverts commit feecb97214.
Applying patches is more fragile when working on plain directories.
2025-12-03 11:21:34 +01:00
BlackCherryCat ab2ee24e90 Update es locale 2025-12-02 21:05:28 +01:00
Guillaume Meunier 20cf6ea2e0 Display errors in GUI when loading local environments 2025-12-02 19:57:11 +01:00
Guillaume Meunier 3621404e71 Convert Java exceptions to C++ exceptions 2025-12-02 19:57:11 +01:00
Guillaume Meunier e51d653bd7 Add the picked glTF model to the model list, create a screenshot 2025-12-02 19:57:11 +01:00
Guillaume Meunier 3afed5549e Remove unused argument 2025-12-02 19:57:11 +01:00
Guillaume Meunier 6317d77dba Remove unused includes 2025-12-02 19:57:11 +01:00
Guillaume Meunier 6f50ba3979 Use the correct texcoord 2025-12-02 19:57:11 +01:00
Guillaume Meunier f99fb8fa18 Add support for KHR_texture_transform 2025-12-02 19:57:11 +01:00
Guillaume Meunier ab82fb5866 Add proper support for 8 bit indices 2025-12-02 19:57:11 +01:00
Patrick Nicolas 91a41b306e Don't set pps_range_extension_flag 2025-12-02 15:23:08 +01:00
ZokuTe 8d531cbc53 Polish Simplified Chinese translation (#645) 2025-11-30 10:48:22 +01:00
BERADQ b907eb63ad Update Simplified Chinese localization -> close #599 2025-11-29 19:59:08 +01:00
Patrick Nicolas 8e60a03aaf Set default headset resolution to 100% 2025-11-25 19:41:33 +01:00
Patrick Nicolas a8fa6c3961 Use sustained_low instead of powersaving 2025-11-25 19:41:33 +01:00
Sapphire 3f37bd7570 Disable Blubur S1 driver 2025-11-23 09:49:00 +01:00
blamedrop 6cd65de21d Update locale/pl/wivrn-dashboard.po 2025-11-22 20:06:16 +01:00
blamedrop 34a4ffcb59 Update locale/pl/wivrn.po 2025-11-22 20:06:16 +01:00
Guillaume Meunier 5bdcf783cf Remove dimension in gradle and don't display the 'v' in version numbers 2025-11-20 22:41:47 +01:00
mitsuami-megane 1939ed027c update ja locale 2025-11-20 08:45:11 +01:00
BlackCherryCat 6273a54776 Update es locale 2025-11-19 20:46:00 +01:00
Patrick Nicolas 658d4997f2 fix APK repo synchronization 2025-11-19 15:17:37 +01:00
Cláudio 'Patola' Sampaio f28d70e7b3 updated 3 new strings to pt_BR 2025-11-19 14:56:54 +01:00
Patrick Nicolas bc1c0b9e93 Drop cap_sys_nice check 2025-11-19 14:16:15 +01:00
Patrick Nicolas 7c2057ec9e Add message to restart server after config change 2025-11-19 14:16:15 +01:00
Patrick Nicolas 01c4f0343a disable ccache summary, disable cache for dashboard 2025-11-19 14:16:15 +01:00
Patrick Nicolas aff498bc2d Add check for snap/flatpak Steam 2025-11-19 14:16:15 +01:00
BERADQ 9a55178b41 Update Simplified Chinese localization -> close #599 2025-11-19 08:02:13 +01:00
KresnyandPatrick Nicolas ead740a8d5 Fix text for 10-bit checkbox in SettingsPage.qml (#621)
* Fix text for 10-bit checkbox in SettingsPage.qml

* "10 bits" instead of "10-bit" for checkbox

---------

Co-authored-by: Patrick Nicolas <patricknicolas@laposte.net>
2025-11-18 15:10:58 +01:00
patrlim 60563ef0de Added Polish locale (#611) 2025-11-18 15:10:26 +01:00
Patrick Nicolas c31d3537d8 Cache APT packages 2025-11-18 13:50:06 +01:00
Patrick Nicolas 518d4b24d0 Fix downstream update condition 2025-11-18 13:47:37 +01:00
Patrick Nicolas 59cab00c52 CI: Merge all linux jobs in one matrix 2025-11-18 12:35:49 +01:00
Patrick Nicolas 65894401c1 rsvg-convert is not required for dashboard 2025-11-18 12:35:49 +01:00
Patrick Nicolas 231e4c1cc0 Remove wivrnctl from non-systemd cmake presets 2025-11-18 12:35:49 +01:00
Patrick Nicolas 91c72de89c Add vulkan dependency for imgui build 2025-11-18 12:35:49 +01:00
Patrick Nicolas 2264b68553 Split client/server ffmpeg dependencies 2025-11-18 12:35:49 +01:00
Patrick Nicolas 0b368aed08 Remove untranslated it dashboard 2025-11-18 12:24:16 +01:00
Cláudio 'Patola' Sampaio 3ba9fae20d Updated 1 string 2025-11-17 22:32:09 +01:00
Sapphire 7bcad7804b Update monado 2025-11-17 21:54:51 +01:00
Guillaume Meunier b5e59dabfa Add missing translatable string, replace %s with braces 2025-11-17 21:03:22 +01:00
Patrick Nicolas 98bb0c56c5 Activate controllers by scrolling 2025-11-17 19:53:56 +01:00
Sapphire 9edb8fd2ae Extend session loss timer
Give applications a reasonable amount of time to quit before losing the instance.
2025-11-17 19:21:43 +01:00
Guillaume Meunier 1393ff0f11 Cache the Vulkan SDK in CI 2025-11-16 15:31:22 +01:00
Guillaume Meunier bca2e29dd8 Cache the Vulkan validation layers in CI 2025-11-16 15:19:16 +01:00
Patrick Nicolas 1e1c6c4075 match SDK and cmake versions with github images 2025-11-16 14:57:39 +01:00
Patrick Nicolas ec88bbf8b0 update Android NDK 2025-11-16 14:57:39 +01:00
Patrick Nicolas f8ca5a9161 build APK on Ubuntu 24.04 2025-11-16 14:57:39 +01:00
Patrick Nicolas 6a6a8ad473 Tweak ccache keys 2025-11-16 14:57:32 +01:00
Patrick Nicolas 5caebf6067 download KTX-Software in fetchcontent dir 2025-11-16 14:57:32 +01:00
Patrick Nicolas e9b8fddac1 build freetype/harfbuzz in fetchcontent dir 2025-11-16 14:57:32 +01:00
Patrick Nicolas c0cfcbecc7 build OpenSSL in fetchcontent dir 2025-11-16 14:57:32 +01:00
Patrick Nicolas feecb97214 Download monado by URL instead of git 2025-11-16 14:57:32 +01:00
Patrick Nicolas fd514bda6a CI: Cache cmake fetchcontent downloads 2025-11-16 14:55:01 +01:00
Guillaume Meunier f5f917dfe0 Update dependencies 2025-11-16 14:34:59 +01:00
Guillaume Meunier 2dd07da12d Remove the screenshots in CI 2025-11-16 12:26:15 +01:00
Guillaume Meunier 33e8016048 Add fading between hand interaction profile and hand tracking 2025-11-15 23:09:23 +01:00
Sapphire 11abd8d9fe Update monado 2025-11-15 20:34:57 +01:00
Sapphire 2e9c380f78 Update monado 2025-11-15 20:34:57 +01:00
Sapphire ee8d6229b3 Update monado 2025-11-15 20:34:57 +01:00
Sapphire fb3f7a1599 Update monado 2025-11-15 20:34:57 +01:00
Sapphire 57ba039f51 Update monado 2025-11-15 20:34:57 +01:00
Sapphire 186362f4f5 Update monado 2025-11-15 20:34:57 +01:00
Patrick Nicolas f880a987b2 Update Monado 2025-11-15 20:34:57 +01:00
Sapphire 1af4ae760c Update monado 2025-11-15 20:34:57 +01:00
Sapphire 673d55e8a7 Update monado 2025-11-15 20:34:57 +01:00
Patrick Nicolas 8c131c7ef4 Show application list by default 2025-11-15 15:48:44 +01:00
Patrick Nicolas e1ecca7e0a Move Start button out of application list 2025-11-15 15:45:04 +01:00
Patrick Nicolas a08d35d404 Tweak unfocused greying values 2025-11-15 15:40:21 +01:00
Patrick Nicolas 114f15c4f3 fix broken asserts 2025-11-15 08:23:40 +01:00
Patrick Nicolas 6a40aa46f4 Drop debug symbols in toolchain build 2025-11-15 00:03:00 +01:00
Patrick Nicolas 59281c970b Update flatpak dependencies/SDK 2025-11-14 12:16:48 +01:00
Patrick Nicolas c12d16ef86 use palm for close/far threshold 2025-11-13 21:48:10 +01:00
Patrick Nicolas 1f3e7d7b86 thinner rays 2025-11-13 21:48:10 +01:00
Patrick Nicolas 4edac2143f Remove some unused fields 2025-11-13 21:48:10 +01:00
Patrick Nicolas 3e8a78002e Switch between poke and pointer interaction in lobby 2025-11-13 21:48:10 +01:00
Cláudio 'Patola' Sampaio a9907e0810 Corrected pt-br strings to better fit the idiom 2025-11-13 07:42:04 +01:00
Cláudio 'Patola' Sampaio c3b4ebd446 Two new pt_BR strings 2025-11-13 07:42:04 +01:00
BERADQ f26bf12c38 Update Simplified Chinese localization & close #599 2025-11-12 17:31:18 +01:00
BlackCherryCat 85fb560ad1 Update es locale 2025-11-12 09:09:39 +01:00
akaz eb3b89dc21 fix: correct typo in Japanese text (変わり → 代わり) (#603) 2025-11-12 08:05:02 +00:00
Sapphire 015b242e27 Allow changing refresh rate during stream 2025-11-11 22:09:04 +01:00
Sapphire 68f6bf5e48 Update gradle 2025-11-11 22:09:04 +01:00
galister 2063cae3ae keyboard & mouse forwarding 2025-11-11 21:12:01 +01:00
Patrick Nicolas efde4bf247 Remove byte counters from sockets 2025-11-11 21:12:01 +01:00
perillamintandPatrick Nicolas ffd5cf882a Initial Galaxy XR port (#585)
Co-authored-by: Patrick Nicolas <patricknicolas@laposte.net>
2025-11-10 22:19:21 +01:00
Patrick Nicolas d79ee4c43b Fix use system freetype 2025-11-10 20:46:37 +01:00
Patrick Nicolas 286278dde0 update libktx in CI 2025-11-10 20:46:37 +01:00
Patrick Nicolas c1be3d08af Allow system libktx for Linux client 2025-11-10 20:46:37 +01:00
Patrick Nicolas c83956748d Update libktx, use binary version on Android build 2025-11-10 20:46:37 +01:00
Patrick Nicolas 09031b9aa5 prepare 25.11.1 release 2025-11-10 18:44:06 +01:00
Patrick Nicolas 1d481f7b77 Fix dashboard crash with empty configuration 2025-11-09 23:45:27 +01:00
ZokuTe 87d024e78b Add Simplified Chinese translation (#594) 2025-11-09 16:26:48 +01:00
Patola b1a325c102 Better PT_br translation (#593) 2025-11-09 09:08:43 +01:00
Luna 5337af4c56 fix typo on AV_PROFILE_AV1_MAIN definition 2025-11-09 09:07:51 +01:00
Patrick Nicolas 793b0c8d81 Update description in metainfo 2025-11-08 12:29:08 +01:00
Patrick Nicolas 99b883d747 prepare v25.11 release 2025-11-08 11:18:55 +01:00
Guillaume Meunier 39d50479b1 Tweak some numbers 2025-11-08 11:15:46 +01:00
Patrick Nicolas 0ffd998896 Fix race condition on ipc_server init 2025-11-08 09:16:09 +01:00
Patrick Nicolas 391f69ba17 force sustained high level in lobby 2025-11-07 20:29:28 +01:00
Patrick Nicolas 59e3d41305 unordered_map heterogeneous access 2025-11-06 21:38:09 +01:00
Guillaume Meunier dee36472ef Fix fr locale 2025-11-06 21:31:47 +01:00
BlackCherryCat 24847eb88f Update es locale 2025-11-06 19:33:33 +01:00
mitsuami-megane 234ce61e23 update ja locale 2025-11-06 17:04:51 +01:00
Cláudio 'Patola' Sampaio dcf44dbf9b new pt_BR translations 2025-11-06 13:20:05 +01:00
Patrick Nicolas 23d7067985 FR locale 2025-11-06 12:48:34 +01:00
galister 46b6f39a41 more descriptive vulkan encoder option 2025-11-06 12:45:27 +01:00
Patrick Nicolas f5393d4fae FR, IT locales 2025-11-06 10:54:30 +01:00
Patrick Nicolas 6656547e6b User configurable power level 2025-11-06 10:54:30 +01:00
Patrick Nicolas 7b23715310 Request powersaving performance 2025-11-06 10:08:10 +01:00
Patrick Nicolas 78ee60620a disable foveation 2025-11-05 20:31:15 +01:00
Patrick Nicolas 12ecede0e7 Fix vaapi/nvenc only sending IDR 2025-11-05 18:40:31 +01:00
mitsuami-megane a971949c9b update ja locale 2025-11-04 08:23:03 +01:00
Patrick Nicolas 4e296d780a Load refresh rate functions on session creation 2025-11-03 21:05:28 +01:00
Patrick Nicolas 6e4f69b327 Sort extensions 2025-11-03 21:05:28 +01:00
Hüseyin Fahri Uzun 775f386db6 [TR] Updated translations (#577) 2025-11-03 20:34:28 +01:00
Patrick Nicolas 09e787493c IT locale 2025-11-03 17:47:56 +01:00
Patrick Nicolas c9f8e6a542 Add debian Steam path 2025-11-02 23:12:56 +01:00
Patrick Nicolas 2696fa3b24 fix 10-bit checkbox being ignored 2025-11-02 21:25:04 +01:00
Patrick Nicolas 5d0b87afce If bitrate was higher than max, replace the max 2025-11-02 17:58:21 +01:00
Patrick Nicolas b383aa4c20 Discard changed events until settings are loaded 2025-11-02 17:58:21 +01:00
Patrick Nicolas a67673327b Fix system checks self-disabling in dashboard 2025-11-02 17:58:21 +01:00
Guillaume Meunier c4265d80a5 Update hand gesture for GUI repositioning to require that the hand is opened 2025-11-02 17:51:59 +01:00
Guillaume Meunier dd874eea4b Change GUI pitch depending on its height relative to the user 2025-11-02 17:51:59 +01:00
Patrick Nicolas b9c1320823 Refresh application list 2025-11-02 15:38:10 +01:00
Patrick Nicolas 833e405060 More reliable reconnect (especially vulkan video) 2025-11-02 15:38:10 +01:00
Patrick Nicolas e6c8488283 Add note about Steam launch commands not always being needed 2025-11-02 12:53:29 +01:00
galister 505de3d625 vulkan h265 /w 10-bit + fix encoder hang (#565) 2025-11-02 11:21:10 +01:00
Sapphire 631025a513 Send session state on connection
On Quest, quitting WiVRn from the system menu while connected, then opening the app again and
reconnecting wouldn't send the session state to the server, causing compositors to keep dropping frames
until the session state is changed again (e.g. by opening the system menu again).
2025-11-02 08:38:49 +01:00
Guillaume Meunier c0dc193247 Stick the index to the closest imgui window, register click only when the finger is 1cm inside the window 2025-11-01 20:58:06 +01:00
Patrick Nicolas aa3a1808f8 really fix crash when vulkan video is not supported 2025-11-01 20:11:21 +01:00
Patrick Nicolas 07bc8c9bac Fix crash when vulkan video is not supported 2025-11-01 09:33:55 +01:00
Patrick Nicolas e23b571d7e Don't revert refresh rate on scene change 2025-10-31 18:26:45 +01:00
aomiki 7e014a7a33 update ru locale 2025-10-31 13:58:36 +01:00
BlackCherryCat 6553036a73 Update es locale 2025-10-30 23:25:28 +01:00
Cláudio 'Patola' Sampaio a4201481aa Updated newer pt_BR strings 2025-10-30 11:39:30 +01:00
Patrick Nicolas 209acc793d FR locale 2025-10-30 09:56:55 +01:00
Patrick Nicolas 16076a05c8 Rework settings GUI
Only allow simple encoder configuration in GUI, now with 10-bit encoding
checkbox.
2025-10-29 23:59:18 +01:00
aomiki 3c91e4eca8 nvenc: support for changing framerate at runtime 2025-10-29 19:19:22 +01:00
aomiki 1635bdabce use idr param & deal with narrowing conversion warns 2025-10-29 19:19:22 +01:00
aomiki 4908f50a00 reset internal rate control states 2025-10-29 19:19:22 +01:00
aomiki 442e09dcfc meaningful names for all other nvenc params 2025-10-29 19:19:22 +01:00
aomiki 855539fab0 formatting 2025-10-29 19:19:22 +01:00
aomiki ba39b4da0b remove bitrate variable 2025-10-29 19:19:22 +01:00
aomiki 13ff9231f0 nvenc: ability to set bitrate at runtime 2025-10-29 19:19:22 +01:00
Patrick Nicolas 1696512385 Update clang-format 2025-10-29 15:30:35 +01:00
Álvaro 4604b061d7 Update es locale (#562) 2025-10-29 08:39:26 +01:00
Sefa Eyeoglu 2204fdd396 Fix build against Qt 6.10
Since Qt 6.10, private APIs are now gated behind their own package
components. To make the build work again, we need to add QmlPrivate as
a required component, as QtCoro relies on it.

See https://doc.qt.io/qt-6/whatsnew610.html#build-system-changes

Closes https://github.com/WiVRn/WiVRn/issues/556

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2025-10-26 21:02:57 +01:00
Patrick Nicolas 7bf9bac094 FR dashboard locale 2025-10-26 13:49:27 +01:00
Patrick Nicolas 38e345025e Add checks and fixes for avahi daemon 2025-10-26 13:46:03 +01:00
Patrick Nicolas e7c0c008a3 remove "precompiled" from unavailable APK message 2025-10-26 13:46:03 +01:00
Patrick Nicolas c2c70e0469 Fix steam tooltips showing when not required 2025-10-26 13:46:03 +01:00
Patrick Nicolas b687f83950 Remove full stops from inline messages 2025-10-26 13:46:03 +01:00
Patrick Nicolas 9b6531908c common find_executable function 2025-10-26 13:46:03 +01:00
Guillaume Meunier 9b9a7b6f3f Update fr locale 2025-10-26 13:31:05 +01:00
Guillaume Meunier c7b94b6524 Handle errors when opening QFile 2025-10-26 12:25:13 +01:00
Guillaume Meunier 93bf067139 Change the environments URL 2025-10-26 11:02:47 +01:00
Guillaume Meunier b6b3a4da80 Add support for relative URLs in environments list 2025-10-26 10:33:49 +01:00
Guillaume Meunier 41abd36e33 Don't compress GLB files by default 2025-10-25 22:49:04 +02:00
Guillaume Meunier 725aa9d9a8 Fix client crash at connection 2025-10-25 22:42:00 +02:00
Guillaume Meunier 24d718f916 Fix WIVRN_COMPRESS_GLB 2025-10-25 22:42:00 +02:00
Patola bdec1f85cd updates pt_BR strings for WIVRn's last update (#552) 2025-10-25 20:36:57 +02:00
BlackCherryCat 7e5b9a7e4f Update es locale 2025-10-25 19:11:21 +02:00
Patrick Nicolas de32f6e24f Fix apk-release build 2025-10-25 11:21:02 +02:00
Guillaume Meunier 4adfe21987 Display the environment loading popup only after 50ms 2025-10-25 10:30:29 +02:00
Guillaume Meunier 149de4eeab Set KTX_GIT_VERSION_FULL to avoid warnings when building libktx 2025-10-25 10:30:29 +02:00
Guillaume Meunier cb1d0d7c2c Add a screen to download gltf models 2025-10-25 10:30:29 +02:00
Guillaume Meunier 33a5bf7494 More fine grained locking of vulkan queues when loading a ktx texture 2025-10-25 10:30:29 +02:00
Guillaume Meunier f1b80a1ebd Fix wrong usage of ImGui table when adding/editing a server 2025-10-25 10:30:29 +02:00
Guillaume Meunier 038622fd46 Add renderdoc support in lobby scene 2025-10-25 10:30:29 +02:00
Guillaume Meunier a9ad5195b7 Cache transcoded textures 2025-10-25 10:30:29 +02:00
Guillaume Meunier 7d76367d2c Add progress callback when loading gltf 2025-10-25 10:30:29 +02:00
Guillaume Meunier 1e03b6e672 Avoid global variables for the shader cache 2025-10-25 10:30:29 +02:00
Guillaume Meunier a9f774c67c Use the mapped_file class instead of asset for assets 2025-10-25 10:30:27 +02:00
Guillaume Meunier 7963efc034 Misc renderer improvements:
- Use VK_KHR_multiview
- Compute bounding boxes, use them to sort primitives
- Add shader reflection
- Add debug drawer
2025-10-25 10:25:53 +02:00
Guillaume Meunier 17ac7ab7d9 Use the fragment density map in the lobby 2025-10-25 10:25:53 +02:00
Guillaume Meunier b8c08f1feb Add support for fragment density map 2025-10-25 10:25:52 +02:00
Guillaume Meunier 045036f3a2 Add libcurl 2025-10-25 10:25:51 +02:00
Guillaume Meunier 9fe7c5829b Add mmap wrapper 2025-10-25 10:23:58 +02:00
Guillaume Meunier 52be025d51 Wait 3s when the session is not running before calling on_unfocused 2025-10-23 21:39:12 +02:00
Guillaume Meunier e584d9607f Fix the reset when the lobby is unfocused 2025-10-23 21:39:12 +02:00
Guillaume Meunier aad1bb6a1b Misc renderer improvements:
- Reuse renderer and gltf loader between scenes
- Use puish descriptors to simplify the management of descriptor sets in the scene renderer
- Don't keep the imgui swapchain in the scene classes
- Fix alpha blending, add alpha masking
- Fix mipmaps not being used in renderer
- Add cache when loading images and models
- Only premultiply the colours if required
- Add support for gltTF animations

Allow removing an object and its descendants from the scene, allow loading from a memory buffer
2025-10-23 21:39:12 +02:00
Patrick Nicolas 1f6ea0d4ca Allow enumerate with tuples (structure chains) 2025-10-23 21:39:12 +02:00
Guillaume Meunier e526d572c2 Update ImGui to 1.92.3 2025-10-23 21:39:12 +02:00
Guillaume Meunier e0ff42800f Update fastgltf to 0.9.0 2025-10-23 21:39:12 +02:00
Guillaume Meunier 7243092682 Pin gltf-transform version to 4.1.1 in CI 2025-10-23 21:39:12 +02:00
Guillaume Meunier be6028982e Update libktx to 4.4.0
- Use UASTC textures instead of ASTC, transcode to ASTC or BC7 at load time
- Add cmake helpers to generate assets, optimize controller models
- Textures are resized to 512x512 and compressed in UASTC
- Always use libktx
2025-10-23 21:39:12 +02:00
Guillaume Meunier 8854b1b548 Add helper for starting an activity on Android 2025-10-23 21:39:12 +02:00
Guillaume Meunier fb509361b6 Silence spurious OpenXR validation error 2025-10-23 21:39:12 +02:00
Guillaume Meunier 60226e5346 Remove empty files 2025-10-23 21:39:12 +02:00
Guillaume Meunier a90ee6a018 Fix path for default_icon.png 2025-10-23 21:39:12 +02:00
Patrick Nicolas 44a5a889e1 Fix setting 0 refresh rate 2025-10-23 18:49:53 +02:00
Alexander Afanasenko 61c5c871c1 Reflect in docs support for 10-bit on NVENC (#548)
* docs on 10-bit using nvenc

* docs: note on supported codecs for nvidia gpus
2025-10-23 12:24:30 +02:00
Alexander Afanasenko 50e1ecab37 10-bit encoding on NVENC (#532) 2025-10-23 09:42:33 +02:00
Guillaume Meunier b1ee9bad47 List missing translations in issue body 2025-10-21 22:00:02 +02:00
aomiki 0e5b339b68 update ru locale 2025-10-21 13:57:36 +02:00
mitsuami-megane 219d251d1b update ja locale 2025-10-21 09:45:47 +02:00
BlackCherryCat ab2671633a Update es locale 2025-10-21 09:45:28 +02:00
Cláudio 'Patola' Sampaio 51c25624b7 Updated 1 message 2025-10-20 21:41:48 +02:00
Morand Axel 275a8195eb Fix typo in ufw allow command for ports
Corrected a typo in the firewall instructions for ufw.
2025-10-20 20:56:28 +02:00
aomiki 4061119aef fix typo in wizard 2025-10-20 20:55:13 +02:00
Jayden 3e0f6bf6fa updated zh-TW translation 2025-10-19 21:10:59 +02:00
Patrick Nicolas 1dd0ed4fe3 Add note to load translations from build folder 2025-10-13 23:19:52 +02:00
Patrick Nicolas 56f32f4ae6 Remove flags in locale CI check 2025-10-13 23:13:08 +02:00
Alexander Afanasenko e3f35aad54 Russian translation (#525) 2025-10-13 23:07:56 +02:00
mitsuami-megane c1111fe036 update ja locale 2025-10-12 08:44:55 +02:00
BlackCherryCat 14333ce208 Update es locale 2025-10-11 21:15:25 +02:00
Cláudio 'Patola' Sampaio 2d5b619429 Translated one new string 2025-10-11 20:55:11 +02:00
Patrick Nicolas 38efb9ff28 Fix typo, add \n in ufw config file 2025-10-11 19:53:59 +02:00
Patrick Nicolas 12e3df5b9c Update fr locale 2025-10-11 19:52:20 +02:00
Patrick Nicolas 56a94bfc10 Add toggle to hide system checks 2025-10-11 19:51:12 +02:00
Patrick Nicolas 19d46db554 Skip broken OpenXR 1.1 support on HTC 2025-10-08 16:29:59 +02:00
galister c6e05754c8 update monado 2025-10-07 09:52:57 +02:00
mitsuami-megane 26f087c906 update ja locale 2025-10-07 09:49:29 +02:00
Kresny 903a02d881 More documentation improvements (#521) 2025-10-06 20:19:32 +02:00
Kresny 1365f4f527 Documentation improvements (#517)
* Fixed flatpack info
* logs
* ufw instructions
* fixed Pico name
2025-10-06 15:02:01 +02:00
Patrick Nicolas cb7e6dabfc Update encoder configuration printing 2025-10-06 14:09:11 +02:00
Patrick Nicolas e4acf2401e Default passthrough encoder to encoder[0] settings 2025-10-06 13:47:28 +02:00
Patrick Nicolas 5f373460a1 Silence qml "Created graphical object..." warning 2025-10-06 12:57:25 +02:00
Patrick Nicolas 25a81b6f5f Don't fail locales if issues are disabled 2025-10-06 09:39:58 +02:00
BlackCherryCat 70ec7acbec Update es locale 2025-10-06 09:17:15 +02:00
Cláudio 'Patola' Sampaio 421d935dde fixed message that should not be translated 2025-10-05 22:51:33 +02:00
Cláudio 'Patola' Sampaio 7ea256a4c2 Updated pt_BR strings 2025-10-05 22:51:33 +02:00
Patrick Nicolas db91edf4c1 Update fr locale 2025-10-05 20:26:07 +02:00
Patrick Nicolas aca45420dd Show server error on GUI (encoders currently) 2025-10-05 20:26:07 +02:00
Patrick Nicolas 98fc4ad4bb firewalld support 2025-10-05 20:26:07 +02:00
Patrick Nicolas 8e4e4c9596 Add ufw detection and setup 2025-10-05 20:26:07 +02:00
Patrick Nicolas 34494f18e6 Split firewall troubleshoot messages 2025-10-05 20:26:07 +02:00
Patrick Nicolas f4d66eb4e7 Default foveation to 50% when switching to manual 2025-10-05 20:26:07 +02:00
Patrick Nicolas 39b7c6c45a Move default port into wivrn_config.h 2025-10-05 20:26:07 +02:00
Patrick Nicolas b81d010841 Fix build with ffmpeg 8 2025-10-04 23:16:22 +02:00
Patrick Nicolas db70d3975c Update spdlog 2025-10-03 17:03:43 +02:00
Guillaume Meunier 64355ff916 Fix dependency handling when compiling shaders 2025-10-02 11:53:25 +02:00
Patrick Nicolas ed51bcc3b6 Fix leftover active_runtime.json after crash
If the server hard crashes (kill -9, system reboot etc), the
active_runtime.json remains there and will be preserved thanks to the
backup mechanism. If this happens, detect that it's already a symlink
and prevent doing the backup instead.
2025-10-01 14:17:52 +02:00
galister 4baa98c8f1 fix index controller mapping 2025-10-01 20:29:58 +09:00
Patrick Nicolas 4516beb2a5 Update Monado 2025-09-29 18:44:06 +02:00
Patrick Nicolas 092dbc893d Update Monado 2025-09-29 18:44:06 +02:00
Patrick Nicolas 2c1996eca1 Update Monado 2025-09-29 18:44:06 +02:00
Sapphire fb3786fc2d Disable Rift driver build 2025-09-29 08:43:39 +02:00
Sapphire 190f4ae8bb Remove stale overrides from nix package 2025-09-29 08:43:13 +02:00
Sapphire 79a34bcdd5 Print full nix build logs in CI 2025-09-29 08:43:13 +02:00
Sapphire 0ec2cd5a3e Filter src in flake 2025-09-29 08:43:13 +02:00
Sapphire db66b0dbb7 Update flake inputs 2025-09-29 08:43:13 +02:00
Mitsuami ba18eac4a7 update ja local (#508) 2025-09-29 00:17:05 +00:00
BlackCherryCat b0573c4265 Update es locale 2025-09-28 22:34:35 +02:00
Patola 46a36fcd55 Updated pt_BR strings (#506)
* Updated pt_BR strings

* Better tranlation

* Better tranlation 2
2025-09-27 22:40:28 +02:00
Patrick Nicolas a5bb9c2678 Fix imgui error for duplicate app name 2025-09-27 17:11:17 +02:00
Patrick Nicolas 5b6e20bdbe fr, it locales 2025-09-27 16:58:20 +02:00
Patrick Nicolas 1667065084 Add app launcher in stream gui 2025-09-27 16:57:23 +02:00
Patrick Nicolas 67918b7fe7 Move app launcher out of lobby_gui 2025-09-27 16:53:25 +02:00
Patrick Nicolas f03c460aa6 Return to last screen on thumbstick press 2025-09-27 16:28:59 +02:00
Patrick Nicolas e7c69e9464 Support stopping application 2025-09-27 16:28:59 +02:00
Patrick Nicolas 6e64dd03b3 Select active application from stream GUI 2025-09-27 10:08:51 +02:00
Patrick Nicolas 7fb8f4c1a8 List running applications 2025-09-27 10:08:51 +02:00
Patrick Nicolas fcbdda9908 Don't fake user presence, use focused instead 2025-09-27 10:08:51 +02:00
Patrick Nicolas 4e5eca204f Disable fragment shading rate
Causes artifacts due to triangle edges, the performance gain is not
worth it
2025-09-26 16:33:01 +02:00
Patrick Nicolas 6932f9461d Add support for raw video 2025-09-26 16:33:01 +02:00
Patrick Nicolas 7861d508c7 Fix double UTC offset 2025-09-24 22:57:14 +02:00
Patrick Nicolas 1290a15b7f Fix fr typo 2025-09-24 22:52:14 +02:00
Patrick Nicolas 5873de80b8 Don't shard when using TCP 2025-09-24 20:53:03 +02:00
Patrick Nicolas 66ca73981d Fix tagged version download 2025-09-24 07:53:21 +02:00
Patrick Nicolas a193b4084c Fix null byte written in json file 2025-09-23 18:01:33 +02:00
Patrick Nicolas f159e58c12 Abbreviate pressure vessel variable in flatpak 2025-09-23 16:36:56 +02:00
Patrick Nicolas 8bc6a3f388 Update Monado 2025-09-23 00:00:26 +02:00
Patrick Nicolas e3356acc16 Update Monado 2025-09-22 23:35:28 +02:00
Patrick Nicolas 6e9afab96b Update Monado 2025-09-22 22:56:48 +02:00
Patrick Nicolas 13c7f8fbc2 Drop GNU c++ extensions 2025-09-22 22:29:26 +02:00
Patrick Nicolas 668a94bae0 Update OpenComposite (sync with flathub version) 2025-09-22 22:05:00 +02:00
Patrick Nicolas d8707e0b4c Add ~/.steam to flatpak permissions 2025-09-22 21:37:16 +02:00
Marc Meier 6f696a92fb Add missing stdlib includes to improve portability (#499) 2025-09-22 14:58:09 +02:00
mitsuami-megane 3e6c407406 update ja locale 2025-09-21 08:22:34 +02:00
Patrick Nicolas 98347fc832 Request again OpenXR 1.1 2025-09-19 19:27:22 +02:00
BlackCherryCat 6ddde98714 Update es locale 2025-09-18 17:42:33 +02:00
Cláudio 'Patola' Sampaio 1477120888 updated pt_BR strings concerning language changes 2025-09-18 16:58:58 +02:00
Patrick Nicolas 5edc7f2f56 Add language names
source https://en.wikipedia.org/wiki/List_of_language_names
2025-09-18 15:50:08 +02:00
Patrick Nicolas b411afb946 Add option to manually set language 2025-09-18 15:50:08 +02:00
Patrick Nicolas f33dc57ec9 Prepare 25.9 release 2025-09-17 20:00:53 +02:00
Patrick Nicolas 509311604c Fix off-by-one in imgui call 2025-09-15 14:36:52 +02:00
Jayden 88ae120c52 upate zh-TW translation 2025-09-14 09:03:40 +02:00
Patrick Nicolas ea54031627 Don't try OpenXR 1.1
The promoted extension mechanism is flawed: it should use the new names
for FB interaction profiles, but keep the BD ones with the original name
2025-09-13 18:15:30 +02:00
Patrick Nicolas 8b9beb272d Silence cmake warning for unused variable 2025-09-12 19:30:45 +02:00
Patrick Nicolas 0e5a09cc45 Update libktx, switch to https download 2025-09-12 18:38:28 +02:00
BlackCherryCat b0144b96fc Update es translations 2025-09-12 17:35:42 +02:00
Hüseyin Fahri Uzun 3269fecef2 TR updated translation 2025-09-12 16:51:21 +02:00
mitsuami-megane 7e2b0cb973 update ja locale 2025-09-12 16:21:53 +02:00
Patrick Nicolas 608cf0c7b2 Drop Ubuntu oracular 2025-09-12 15:22:37 +02:00
Patrick Nicolas bd820a4f4a Update dashboard default encoder presets 2025-09-12 14:54:47 +02:00
Patrick Nicolas 891a087ccc Correctly handle larger swapchains 2025-09-10 22:23:02 +02:00
Patrick Nicolas adc07e8f50 Fix alpha channel in no-blit path 2025-09-10 22:21:48 +02:00
Patrick Nicolas 200586a0af Remove Snapdragon Game Super Resolution 2025-09-10 21:44:22 +02:00
Patrick Nicolas 80933a3392 Fix visibility mask (fixes UE games)
The returned mask type was offset, changing its meaning
2025-09-09 19:21:19 +02:00
Patrick Nicolas 3c08a3de2f Fix defoveation for low scale values
The effective image size may be different from the size in description,
we have to only consider the useful size
2025-09-09 19:00:08 +02:00
Patrick Nicolas ccf430d26a Fix width/height typo 2025-09-09 18:08:38 +02:00
Jonathan Steffan 5405176890 Update render type for Vulkan Info in bug report template 2025-09-08 17:47:16 +02:00
Jonathan Steffan b1c7160bba Update bug_report.yml to include plain render type
Added render type as plain for multiple fields in bug report template.
2025-09-08 17:47:16 +02:00
Patrick Nicolas 9a5af1a0ca Default to 2 encoder split 2025-09-04 17:26:08 +02:00
Patrick Nicolas 6b99cf4cc3 Use inheritance for decoder implementations 2025-09-04 17:15:29 +02:00
Patrick Nicolas cc5990a513 Run spirv-opt when compiling shaders 2025-09-04 17:06:19 +02:00
Patrick Nicolas c80ba550eb Fix defoveator descriptor pool size 2025-09-04 13:54:26 +02:00
Patrick Nicolas 9186bafd28 Pack shading rate in position variable 2025-09-04 10:43:44 +02:00
Patrick Nicolas 633f7feeb1 Skip blit when possible 2025-09-02 15:24:04 +02:00
Patrick Nicolas 435c2be127 Add renderdoc support in stream scene 2025-09-02 15:24:04 +02:00
Sapphire 692d4dec04 Enable XRT_FEATURE_OPENXR_LAYER_COLOR_SCALE_BIAS by default 2025-09-02 08:30:32 +02:00
Patrick Nicolas 5ff85ef7a7 Limit number of foveation samples per pixel 2025-08-31 17:08:45 +02:00
Guillaume Meunier 74ff55d5cb Fix gradle deprecation warnings 2025-08-27 20:56:30 +02:00
Patrick Nicolas f97c241f9f Don't request promoted extensions 2025-08-27 19:36:13 +02:00
Patrick Nicolas 9f2aa0157c Squash foveation Monado patches 2025-08-26 23:17:39 +02:00
Patrick Nicolas 2f91217e02 Update Monado 2025-08-26 23:12:25 +02:00
Patrick Nicolas d4665eb713 Update Monado 2025-08-26 22:58:33 +02:00
Patrick Nicolas 8f8e583eb6 Remove imageviews from xr::swapchain 2025-08-24 21:13:56 +02:00
Patrick Nicolas 05c8de4733 Don't abort on runtime's validation errors 2025-08-24 21:13:16 +02:00
Patrick Nicolas 90fa63a8fb Update vulkan validation layers 2025-08-24 21:05:47 +02:00
Patrick Nicolas 33f343e454 Update gradle 2025-08-24 20:46:11 +02:00
Patrick Nicolas cdd6064f2f Update validation layers 2025-08-24 19:42:06 +02:00
Patrick Nicolas d8d623fd7b Fix apk CI 2025-08-24 15:49:24 +02:00
Patrick Nicolas dd7bd8469e Fix shader fragment rate vulkan validation error 2025-08-24 14:22:48 +02:00
Patrick Nicolas 348a5a8313 Add glslang from vulkan tools 2025-08-24 14:22:48 +02:00
Patrick Nicolas 66b7b1fabb Return image to swapchain after encode is done
Vulkan video encode may use the original image, only mark it as free
once it is done encoding.
2025-08-23 11:07:48 +02:00
Patrick Nicolas aade274777 Search for flatpak Steam before system Steam 2025-08-23 10:27:31 +02:00
Patrick Nicolas b5c94c24a4 Fix crash on connection 2025-08-22 20:20:28 +02:00
Patrick Nicolas 211922ea02 Remove all AUTO options in cmake 2025-08-22 13:42:46 +02:00
Patrick Nicolas 959661c830 Fix const char* comparison 2025-08-21 20:46:49 +02:00
Patrick Nicolas 4a2c83a70d Use variable shading rate if supported by headset 2025-08-21 20:46:49 +02:00
Patrick Nicolas b5e5586ef6 Fix HTC face tracker
The tracker must be created precisely between the session creation and
session begin, or else it would fail when we access it with
XR_RUNTIME_FAILURE.
As it is not possible to recreate one later, disable the destroy and
store the handles in static variables so we can access them later,
behaving as if we were actually destroying and recreating one.
2025-08-20 22:11:43 +02:00
Patrick Nicolas bebd2cd97e Fix incorrect error reported on socket creation 2025-08-20 22:11:43 +02:00
Patrick Nicolas fadec7a7a0 Move generic tracker active status in own class 2025-08-20 22:11:43 +02:00
Patrick Nicolas 87b68aaa7b Prevent negative deltatime in imgui 2025-08-20 22:11:43 +02:00
Patrick Nicolas 1e6d8b5a95 Remove application::path_to_string/string_to_path 2025-08-20 22:11:43 +02:00
Patrick Nicolas 8dd3c75139 Remove xr_extensions from application.h 2025-08-20 22:11:43 +02:00
Patrick Nicolas ec4a95efb2 Remove application::get_xr_extensions() 2025-08-20 22:11:43 +02:00
Patrick Nicolas 1390ade131 Remove application::get_device() 2025-08-20 22:11:43 +02:00
Patrick Nicolas d18d33a615 Remove application::get_physical_device() 2025-08-20 22:11:43 +02:00
Patrick Nicolas 1574f82b8e Remove application::now() 2025-08-20 22:11:43 +02:00
Patrick Nicolas a82ee8c038 Remove application::queue_family_index() 2025-08-20 22:11:43 +02:00
Patrick Nicolas 5c397e125c Don't include application.h in xr/session.cpp 2025-08-20 22:11:43 +02:00
Patrick Nicolas 48c9bf0726 Remove xr.h 2025-08-20 22:11:43 +02:00
Patrick Nicolas cb5a7ad9cd Allow handles to hold the pointer to destructor 2025-08-20 22:11:40 +02:00
Patrick Nicolas ae75d95d7c Fix debug utils not enabled 2025-08-20 22:07:08 +02:00
Patrick Nicolas 68edc66fb7 Move *_supported into xr::system 2025-08-20 22:07:08 +02:00
Patrick Nicolas d2ea30e70f Remove unused variable 2025-08-20 22:07:08 +02:00
Patrick Nicolas 9f80c1da7c Remove body trackers from application.h 2025-08-20 22:07:06 +02:00
Patrick Nicolas 4b8295b7c7 Remove face tracker from application.h 2025-08-19 19:14:10 +02:00
Patrick Nicolas 1e37261cfa Use macros for interaction profile extension names 2025-08-19 19:14:10 +02:00
Patrick Nicolas 0acfe7cd24 Remove hand tracker from application.h 2025-08-19 19:14:10 +02:00
Patrick Nicolas 5f6641c38f load_icons: read files only once 2025-08-19 19:14:10 +02:00
Guillaume Meunier c2f23223a2 Don't trust the file extension when loading icons
Fixes #439
2025-08-18 21:16:08 +02:00
Patola 94aceb3f0f Update pr_BR strings for small GUI activation option change (#460) 2025-08-17 21:18:47 +02:00
Patrick Nicolas bce3e498e8 Fix destruction of textures still in use 2025-08-16 14:15:29 +02:00
Patrick Nicolas b9052c6ebb controller/hand_interaction: fix ODR, race condition 2025-08-16 14:15:29 +02:00
Patrick Nicolas c15de9bf27 Automatically name image/buffer allocations 2025-08-16 14:15:29 +02:00
Patrick Nicolas dc04f7edcc Add utility to write specialization constants 2025-08-16 14:15:29 +02:00
Patrick Nicolas b1d6d50a4a Replace unused frames() method with empty() 2025-08-15 23:40:40 +02:00
Patrick Nicolas 5784cbd4fa remove unused include 2025-08-15 23:28:35 +02:00
Patrick Nicolas 757e0fd97b merge tracking control and its mutex 2025-08-15 23:27:44 +02:00
Patrick Nicolas 31c347475e Cleanup some redundant variables 2025-08-15 23:20:11 +02:00
Patrick Nicolas 6d0cc60626 Use subgroups in distortion shader 2025-08-14 21:02:56 +02:00
Patrick Nicolas 50c44c8422 Add iGPU no-copy for distortion UBO 2025-08-14 17:04:09 +02:00
Patrick Nicolas a5b3178f36 Fix uninitialized data in foveation params 2025-08-14 17:04:09 +02:00
Guillaume Meunier 49ab1af542 Avoid showing the spinner when the predicted display time is close to 0 2025-08-12 20:17:35 +02:00
Patrick Nicolas c7fc144a66 Add simple controller binding for hand interaction 2025-08-12 17:36:17 +02:00
Patrick Nicolas c8b8d798d1 Update fr, it locale 2025-08-12 13:42:49 +02:00
Patrick Nicolas 5e4edc9857 Fix lang issue closing for no reason 2025-08-11 15:56:18 +02:00
Patrick Nicolas 461de7c540 Remove "v" at the beginning of the version 2025-08-11 15:31:23 +02:00
Patrick Nicolas a2e470799e Add --version option 2025-08-11 14:53:32 +02:00
Patrick Nicolas d2191a354e Improve issue template
Add an installation method entry
Recommend file attachments for long entries
2025-08-11 14:45:08 +02:00
Patrick Nicolas 9725ae7fc0 Add an option to disable in-stream GUI 2025-08-11 10:44:44 +02:00
BlackCherryCat e7b218bfb6 Simplify es locale 2025-08-11 09:16:53 +02:00
Patrick Nicolas 93ba9b8367 Add required to libarchive and png dependencies 2025-08-10 23:01:46 +02:00
Patrick Nicolas 30ceab5b30 Forward PATH when starting application in systemd mode 2025-08-10 22:06:59 +02:00
Patrick Nicolas 810c9bd2fa Manage localisation issues from CI 2025-08-10 15:15:13 +02:00
Patrick Nicolas 869911fcd5 pythonize check_messages (merged into check_po) 2025-08-10 15:15:13 +02:00
Patrick Nicolas e744a91488 prepare 25.8 release 2025-08-10 10:48:50 +02:00
Patrick Nicolas e603e30229 Reduce flatpak permissions 2025-08-10 10:21:48 +02:00
Patrick Nicolas 5ccc725ef7 Hide Steam launch options in wizard if empty 2025-08-09 22:47:00 +02:00
Guillaume Meunier 03cfe1c12d Keep the GUI locked to the controller that started repositionning in the lobby 2025-08-09 15:50:48 +02:00
Guillaume Meunier acea81c13f Allow dragging with hand tracking in the app list 2025-08-09 15:44:47 +02:00
Guillaume Meunier 8dcd14b168 Unbreak CI 2025-08-09 15:09:18 +02:00
Guillaume Meunier 45d5d6dd7a Read Linux steam icons 2025-08-09 15:02:28 +02:00
Guillaume Meunier d5ef8c1a85 Added checks and try-catch when attempting to load icons
Fixes #437
2025-08-09 10:12:58 +02:00
Patrick Nicolas b036731b51 Hide Steam info when not needed 2025-08-09 00:07:35 +02:00
Patrick Nicolas e02d115a4e Use PRESSURE_VESSEL_IMPORT_OPENXR_1_RUNTIMES 2025-08-09 00:07:35 +02:00
epsypolym 00e979065b Update slovak translation (#436)
* Update slovak translation

- Replaced multiple instances of informal form with formal form, also by extension replaced some cases of gendered form with gender neutral version.
- Fixed a few typos

* additional adjustments to sk locale

- re-added a space i accidentally removed (oops)
- fixed other miscellaneous typos found during 2nd review
- removed instance of word "fičura" - informal slang translation of word "feature" - replaced with "funkcia" - ie: function as direct translation of "feature" doesn't exist
2025-08-08 23:03:55 +02:00
Hüseyin Fahri Uzun c7b7bc6fbd added TR translation 2025-08-08 21:40:35 +02:00
Guillaume Meunier 58b6b9d19f Remove useless newline in fr and it locales 2025-08-08 21:09:39 +02:00
Guillaume Meunier 230e102f36 Only request the app list when the stream is stalled 2025-08-08 20:41:46 +02:00
Guillaume Meunier 963205908f Add spinner when an app is starting 2025-08-08 20:41:46 +02:00
Guillaume Meunier 1b11594c3e Send app list ASAP 2025-08-08 20:41:46 +02:00
Guillaume Meunier 1b78180d73 Send app icons one by one 2025-08-08 20:41:46 +02:00
Patrick Nicolas 669b06e982 typo in translating.md 2025-08-08 20:10:18 +02:00
myghi63 3c82c2db84 Fix welcome translation and file comments 2025-08-08 19:48:32 +02:00
Patrick Nicolas 5d58af95e4 Add note about Lokalize mailing list setting 2025-08-08 18:15:59 +02:00
myghi63 a1bf1de910 Update pt_BR locale (#433) 2025-08-08 17:31:10 +02:00
ჼ 73390c2035 Small fixes in sk translation (#432) 2025-08-08 16:53:42 +02:00
Patrick Nicolas 9c599206d6 Working NVIDIA h264 vulkan video encode!
NVIDIA fails with initalization failed error if no
VkVideoEncodeH264RateControlLayerInfoKHR structure is provided
2025-08-08 16:22:11 +02:00
Patrick Nicolas f91c7222db Fix NVIDIA crash in vulkan video encoder creation 2025-08-08 16:15:49 +02:00
Patrick Nicolas 4f0daa0a63 Don't show wizard on first run if server failed 2025-08-08 14:38:49 +02:00
Patrick Nicolas e0608f0c68 Don't crash if server failed to start 2025-08-08 14:34:42 +02:00
Patrick Nicolas 34036c6b9e Fail if path command does not exist 2025-08-08 14:16:46 +02:00
Patrick Nicolas 19ad856e59 Use VK_KHR_video_maintenance1 2025-08-08 14:06:01 +02:00
Jayden 5097ecef3b added new translation 2025-08-07 17:54:53 +02:00
Patrick Nicolas c6a1f3abc9 Set Lighthouse hand tracking as "conforming" 2025-08-07 09:31:55 +02:00
Patrick Nicolas 46ffc444f0 Default to xrizer 2025-08-06 20:19:59 +02:00
BlackCherryCat f63892119d Update es locale 2025-08-06 20:18:54 +02:00
Patrick Nicolas c485bcb015 Update Monado 2025-08-06 17:27:46 +02:00
Patrick Nicolas 677d303d43 Update Monado 2025-08-06 17:27:46 +02:00
Patrick Nicolas d624f74f83 Update Monado 2025-08-06 17:27:46 +02:00
Patrick Nicolas 89c5921fc8 Update Monado 2025-08-06 17:27:46 +02:00
Patrick Nicolas 443de59d73 Update Monado 2025-08-06 17:27:46 +02:00
Patrick Nicolas 81abdfee3e Update Monado 2025-08-06 17:27:46 +02:00
Patrick Nicolas 2c65b43969 Update Monado 2025-08-06 17:27:46 +02:00
mitsuami-megane 5efc92efee update ja locale 2025-08-06 12:40:08 +02:00
Guillaume Meunier a867c1da45 Fix serialization of vectors of more than 65535 elements 2025-08-04 21:51:39 +02:00
Guillaume Meunier 2327eacbeb Synchronize all uses of the command queue 2025-08-04 15:49:42 +02:00
Patrick Nicolas 55def29a10 Update fr locale 2025-08-04 09:42:23 +02:00
Patrick Nicolas 88f5f2ace4 Show warning if no OpenVR library is detected 2025-08-04 09:40:09 +02:00
Guillaume Meunier 9a53aaa205 Add support for paletted icons, fix misc ico loading bugs 2025-08-04 09:13:51 +02:00
Guillaume Meunier de810d1eea Don't crash the client when the icon cannot be loaded 2025-08-04 09:13:51 +02:00
Guillaume Meunier 06240858fd Avoid loading app icons in the dashboard, add error handling when loading steam icon 2025-08-04 09:13:51 +02:00
Guillaume Meunier fddfb8eb57 Check sizes for overflow before serializing vectors, strings, and spans 2025-08-04 09:13:51 +02:00
Jayden d9a86cb1c8 updated zh_TW translation (#423) 2025-08-03 14:58:10 +02:00
ჼ 79139b38bc Add Slovak translation (#420) 2025-08-03 14:56:49 +02:00
Guillaume Meunier fc3d13ca9d Position the text correctly in the app list 2025-08-03 11:03:33 +02:00
Guillaume Meunier 22757c99ad Don't load too many textures in the same frame 2025-08-03 10:50:22 +02:00
Guillaume Meunier 993adbb651 Drag to scroll, even when hovering a widget 2025-08-03 10:50:22 +02:00
Guillaume Meunier 18f38b575d Cache the loaded icons 2025-08-03 10:50:22 +02:00
Sapphire 5d427f1464 Add librsvg and libpng to nix build inputs 2025-08-03 10:50:22 +02:00
Guillaume Meunier 51b1b3efeb Premultiply alpha when loading images 2025-08-03 10:50:22 +02:00
Guillaume Meunier a144f88f95 Fix horizontal scrolling 2025-08-03 10:50:22 +02:00
Guillaume Meunier fed26b0675 Improve scrolling with the thumbstick 2025-08-03 10:50:22 +02:00
Guillaume Meunier 02c3da3f9f Use a growable descriptor pool in imgui 2025-08-03 10:50:22 +02:00
Guillaume Meunier 1fa4ac0231 Avoid using boost::property_tree for ini parsing 2025-08-03 10:50:22 +02:00
Guillaume Meunier d830d3bdd0 Support older libstdc++ 2025-08-03 10:50:22 +02:00
Guillaume Meunier ce21f578a1 Fix Ubuntu package in CI 2025-08-03 10:50:22 +02:00
Guillaume Meunier 46ad809d56 Add dependency to librsvg2 in CI and docs 2025-08-03 10:50:22 +02:00
Guillaume Meunier 9ded9d37f7 Send packet size on 32 bits instead of 16 bits in TCP 2025-08-03 10:50:22 +02:00
Guillaume Meunier 8aca33e0a4 Set imgui textures to clamp to edge 2025-08-03 10:50:22 +02:00
Guillaume Meunier f3c668a331 Display app icons in lobby 2025-08-03 10:50:22 +02:00
Guillaume Meunier 5e93c87403 Send application icons to the headset 2025-08-03 10:50:22 +02:00
Guillaume Meunier 5435513da2 Allow loading texture from memory buffer for imgui 2025-08-03 10:50:22 +02:00
Patrick Nicolas e67c071be6 Dump velocities with WIVRN_DUMP_TRACKING 2025-08-03 10:48:44 +02:00
Patrick Nicolas 1370942833 Fix controller velocities with xrLocateSpaces 2025-08-03 10:15:28 +02:00
Patrick Nicolas cd47a331de Bump xrizer to v0.3 2025-08-02 09:16:40 +02:00
Patrick Nicolas 315c2f4d82 Change mpc download mirror 2025-08-02 09:11:19 +02:00
Patrick Nicolas c8dc545198 Improve locale check summary 2025-08-02 09:06:23 +02:00
BlackCherryCat 8eaa62c3f8 Update es locale 2025-08-02 08:33:52 +02:00
mitsuami-megane 7884893ccc ja locale line breaks 2025-08-02 08:32:36 +02:00
mitsuami-megane d7d91cd84d update ja locale 2025-07-31 09:18:01 +02:00
Patrick Nicolas 2b9287c042 Reduce log spam for foveation 2025-07-30 23:31:30 +02:00
mitsuami-megane dcc1c82f54 update ja locale 2025-07-30 18:50:17 +02:00
Patrick Nicolas dda5c94051 Update IT locale 2025-07-30 14:53:11 +02:00
Patrick Nicolas 6f47b7669c Update FR locale 2025-07-30 14:53:11 +02:00
Patrick Nicolas ce77a67354 Add explicit language list to update_messages.sh 2025-07-30 09:41:31 +02:00
Patrick Nicolas 3648224f09 Suggest bindings for Pico 4s controller on stream 2025-07-30 09:32:30 +02:00
Patrick Nicolas b72554ea02 Enable split nvenc encoders by default 2025-07-28 17:18:26 +02:00
Patrick Nicolas 4fa33b183f Tweak stream GUI texts, positions 2025-07-27 23:36:13 +02:00
Patrick Nicolas f8f4b8643e Tweak display of foveation config 2025-07-27 23:36:13 +02:00
Kierek e5ba1f7394 Share CUDA context between all nvenc encoder instances 2025-07-27 23:32:41 +02:00
Patrick Nicolas 25ca41cfcf Sort applications alphabetically 2025-07-27 10:06:19 +02:00
Patrick Nicolas 066d195c83 Add "connected" screen with buttons for apps 2025-07-27 08:55:14 +02:00
Patrick Nicolas 45e0fce476 Add packet to start an application 2025-07-26 20:05:35 +02:00
Patrick Nicolas 93a2f1c10b Add packets to list applications 2025-07-26 19:35:26 +02:00
Patrick Nicolas ec63c8a395 Remove unused includes 2025-07-26 15:46:41 +02:00
Guillaume Meunier ac2044dffc Allow enabling the debug menu from gradle.properties 2025-07-26 11:44:01 +02:00
Guillaume Meunier adbbd71557 Fade when dimming the video stream, override session state when the stream GUI is interactable, move the lobby plots to the debug tab 2025-07-26 11:29:06 +02:00
Guillaume Meunier aa4f9ac265 Add first run screen 2025-07-26 11:29:03 +02:00
Guillaume Meunier c3ec979dde Overrideable foveation center 2025-07-26 11:18:58 +02:00
Guillaume Meunier ce437ce2b4 Add compact view in the stream scene 2025-07-26 11:18:58 +02:00
Guillaume Meunier 3a04c52484 Rename stream_stats.cpp -> stream_gui.cpp 2025-07-26 11:18:58 +02:00
Guillaume Meunier a04a0f5d03 Avoid unrealistic frame times when accumulating metrics 2025-07-26 11:18:58 +02:00
Guillaume Meunier 344cb7e572 Don't send controller data when the GUI is interactable 2025-07-26 11:18:58 +02:00
Guillaume Meunier 794f2e3468 Update imgui 1.91.3 -> 1.92.1 2025-07-26 11:18:58 +02:00
Guillaume Meunier 96083cd02e Add interactable GUI in stream scene 2025-07-26 11:18:58 +02:00
Guillaume Meunier 366bc2c793 Fix typo in the dithering Bayer matrix 2025-07-26 11:18:58 +02:00
Guillaume Meunier db3832aadc Sort OpenXR/Vulkan extensions alphabetically 2025-07-26 11:18:58 +02:00
Guillaume Meunier f25aa9d7d2 Use grip instead of A/X to move the GUI 2025-07-26 11:18:58 +02:00
Guillaume Meunier 54f91405a6 Refactor the client GUI 2025-07-26 11:18:58 +02:00
Patrick Nicolas a69bd596d1 Add common-server CMake library 2025-07-25 22:10:47 +02:00
Patrick Nicolas 62894b178d Read host /usr/share/applications in flatpak 2025-07-25 22:10:47 +02:00
Patrick Nicolas e414c82d6c Access real .local/share from flatpak 2025-07-25 22:10:47 +02:00
Patrick Nicolas 6f039a6bac Use common app list for dashboard 2025-07-25 22:10:47 +02:00
Patrick Nicolas f0e625e095 don't build application list binary 2025-07-25 22:10:47 +02:00
Patrick Nicolas 74ea5cfe19 Support flatpak Steam 2025-07-25 22:10:47 +02:00
Patrick Nicolas 8b42be80ee Add flatpak permissions to enumerate applications 2025-07-25 22:10:47 +02:00
Patrick Nicolas b2d49dddb3 WIP application enumeration 2025-07-25 22:10:47 +02:00
Patrick Nicolas fa6e768783 Cache is_flatpak result 2025-07-25 22:10:47 +02:00
Patrick Nicolas 44bbf00bf1 Remove obsolete code 2025-07-25 22:10:47 +02:00
Sapphire e358230a25 Move face/body tracker creation logic into constructors 2025-07-23 19:19:44 +02:00
Patrick Nicolas a1cdbbe0ba Update xrizer (flatpak) 2025-07-23 15:18:48 +02:00
Patrick Nicolas d3e10dc31b Rewrite child application management
Forked applications are managed by a class, which can track more than
one child.
Systemd mode uses transient units, libsystemd is replaced by
gdbus-codegen, the management objects shares the interface with forked
application.
2025-07-22 20:49:32 +02:00
Patrick Nicolas 2f5496c06e Give application to launch instead of reading conf 2025-07-17 15:28:41 +02:00
Patrick Nicolas 286268d2c6 Start application in transient unit in systemd mode 2025-07-16 22:07:03 +02:00
Patrick Nicolas b845f30454 Increase minimum cmake version to 3.28
required for EXCLUDE_FROM_ALL in fetchcontent
2025-07-16 13:12:40 +02:00
Patrick Nicolas 84ef968dc3 Prevent crash on very strong foveation 2025-07-15 17:31:48 +02:00
Patrick Nicolas d8c8020d84 Change isl mirror 2025-07-15 10:31:05 +02:00
galister 5307f2fe62 pass bit_depth to probe_nvenc 2025-07-14 08:47:45 +02:00
galister ec42db83bc change encode_10bit → bit-depth 2025-07-11 23:09:37 +02:00
galister ed32676299 10-bit encoding as a global setting 2025-07-11 23:09:37 +02:00
galister d64d5909ee vaapi: 10-bit hevc/av1 encoding 2025-07-11 23:09:37 +02:00
Patrick Nicolas c5dab27f3c Fix binding to OpenXR 1.1 touch plus interaction profile 2025-07-09 21:09:26 +02:00
Sapphire 717e93846a Unset derived poses for hand interaction 2025-07-09 10:33:32 +02:00
Sapphire c682f8cd9f Make hand interaction a different xdev
* Don't override hands from other drivers on interaction profile change

* Rename *_hand to *_controller

* Fix derived pose and tracking control desync with hand interaction

* Reset pose history on switch from hand interaction, code cleanup
2025-07-09 10:33:32 +02:00
Sapphire 8f0ca7b04c Forward XR_EXT_hand_interaction
* Fix binds

* hand_interaction tids
2025-07-09 10:33:32 +02:00
Sapphire 74befe1f4a Bump flake inputs, add wireshark dissector build to flake 2025-07-09 10:33:32 +02:00
Sapphire 6f22068c42 Bump dissector OpenXR version, fix openxr found check 2025-07-09 10:33:32 +02:00
Patrick Nicolas a6660434e9 Fix disconnect button 2025-07-08 15:30:13 +02:00
Patrick Nicolas ecf6dfd215 Reallocate swapchains if a bigger one is needed 2025-07-08 08:59:17 +02:00
Sapphire 88f03acfbf Resolve symlinks when getting configuration file paths 2025-07-06 20:00:23 +02:00
Guillaume Meunier 8686233b49 Fix depth test in lobby on Quest 3 2025-07-06 10:26:12 +02:00
Patrick Nicolas 11cd9235d9 Allow multiple configuration files
Will merge contents from
@CMAKE_INSTALL_PREFIX@/share/wivrn/config.json
/etc/wivrn/config.json
~/.config/wivrn.config.json (XDG_CONFIG_DIR in fact)

If -f option is provided, just parse that file, don't merge anything
2025-07-06 10:22:25 +02:00
Sapphire fbe5430dc2 Skip Nix CI step for apk repo 2025-07-06 09:59:14 +02:00
Guillaume Meunier be504b5944 Add controller offset for Quest 3 2025-07-06 09:42:51 +02:00
Guillaume Meunier c9e078bd47 Avoid segfault if xrCreatePassthroughFB fails 2025-07-06 09:12:41 +02:00
Guillaume Meunier fafe01b76a Enable passthrough in splash screen 2025-07-05 21:39:41 +02:00
Patrick Nicolas b66ca2e561 Ignore visibility mask errors on connection 2025-07-05 19:53:49 +02:00
Sapphire 5bfc9ed942 Forward session state to server
Closes #395
2025-07-05 15:41:22 +02:00
Patrick Nicolas 8e2719ff30 Update NDK to 28 2025-07-04 23:43:39 +02:00
Sapphire 3ac31fe5cc Forward XR_EXT_user_presence
Closes #258
2025-07-04 23:43:06 +02:00
Sapphire f43ee229f1 update monado 2025-07-04 23:43:06 +02:00
Patrick Nicolas a1c262808d update monado 2025-07-04 23:43:06 +02:00
Patrick Nicolas 1698f4aba6 update monado 2025-07-04 23:43:06 +02:00
Patrick Nicolas 90f49e579b update monado 2025-07-04 23:43:06 +02:00
Patrick Nicolas 56e68825ef typo developper -> developer 2025-07-04 20:30:00 +02:00
Patrick Nicolas af69dc1f4e Fix flatpak CI on pull requests 2025-07-03 11:13:41 +02:00
Sapphire 42c57b61e2 Revert "Fix meta handtracking thumb rotation offset"
Thumb joint rotations are correct when requesting OpenXR 1.1 on Quest,
this is no longer needed.

This reverts commit e0a1598ac5.
2025-07-03 09:26:02 +02:00
Sapphire 88f0f52afe Use grip_surface pose for palms when supported 2025-07-03 09:26:02 +02:00
Sapphire 66878a259d fix add_space locate_spaces check, load xrLocateSpacesKHR on OpenXR 1.0 if supported 2025-07-03 09:26:02 +02:00
Patrick Nicolas 1ad015ff65 Use xrLocateSpaces when runtime has OpenXR 1.1 2025-07-02 22:13:35 +02:00
Patrick Nicolas 3a33adbd86 Remove Quest/simple_controller hack
Just don't suggest bindings for simple controller on Quest
2025-07-02 21:55:27 +02:00
Patrick Nicolas 2ba3d78cd4 Try to request OpenXR 1.1 2025-07-02 21:55:27 +02:00
Guillaume Meunier a2837904cc Fix ray visibility 2025-07-01 21:45:33 +02:00
Patrick Nicolas 29b445e984 Don't build common when only building openxr lib 2025-07-01 21:26:24 +02:00
Sapphire f2760df4b7 bump protocol revision 2025-06-30 11:34:34 +02:00
Sapphire 8dc2b7a5e0 Store face tracker in variant 2025-06-30 11:34:34 +02:00
Sapphire dd4d442f43 Fix set_mic_state typo 2025-06-30 11:34:34 +02:00
Patrick Nicolas eacca07857 25.6.1 release notes 2025-06-29 10:51:08 +02:00
Patrick Nicolas 55b7f0e6c7 Fix foveation with negative offsets
H3VR uses negative y extents so that y axis is flipped, previous code
assumed all extents would be positive.
2025-06-28 15:15:53 +02:00
Sapphire 2250143f00 Don't send poses for khr/simple_controller on Quest when hand tracking data is invalid 2025-06-28 10:29:46 +02:00
Sapphire 795d88d9dc Use method_pointer for function pointer initialisation in eye tracker 2025-06-28 10:29:46 +02:00
Sapphire 6377f21b99 Return appropriate error and use logging helper when unsupported input is requested 2025-06-28 10:29:46 +02:00
Patrick Nicolas 8691be2677 fix release python packages 2025-06-26 21:25:23 +02:00
Patrick Nicolas 857e3af6cc Prepare 25.6 release 2025-06-26 19:19:41 +02:00
Patrick Nicolas 4e53406ec5 Failsafe in foveation for weird application FoV 2025-06-26 18:54:09 +02:00
Patrick Nicolas dbcf4f99f7 Add missing right/squeeze for touch pro controller 2025-06-25 19:20:30 +02:00
Patrick NicolasandBaplar 6ad4e8ae51 Multiple foveation fixes
fix math for center and convergence calculation
add WIVRN_FOVEATION_OFFSET variable to change the vertical center offset
set default vertical center offset to 10° below horizontal
add WIVRN_FOVEATION_DISTANCE variable to set convergence distance
set default convergence distance to 1m
fix cache invalidation condition

Co-authored-by: Baplar <baplar@gmail.com>
2025-06-25 18:27:24 +02:00
ჼ d459c9489e Update hardware.cpp 2025-06-25 12:33:09 +02:00
Patrick Nicolas b75714c936 Unify tracked and non tracked foveation 2025-06-24 15:29:12 +02:00
LuckShiba 9e3951da78 Fix pt_BR locale tooltip width 2025-06-24 14:29:42 +02:00
LuckShiba d6cc209e76 Update pt_BR locale 2025-06-24 14:29:42 +02:00
LuckShiba 4b0d53fa58 Fix pt_BR locale tooltip length 2025-06-24 14:29:42 +02:00
LuckShiba 2ef30ce778 Update pt_BR locale 2025-06-24 14:29:42 +02:00
Patrick Nicolas 6e8af7bb9a Fix absolute manifest build instructions 2025-06-24 10:03:03 +02:00
Patrick Nicolas b9752276b7 read DBUS env variables for --systemd mode 2025-06-23 18:30:27 +02:00
535 changed files with 112438 additions and 47942 deletions
+1 -1
View File
@@ -106,6 +106,6 @@ SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
Standard: Latest
TabWidth: 8
UseTab: ForIndentation
+15 -26
View File
@@ -9,7 +9,10 @@ body:
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is.
placeholder: Please describe the bug here...
placeholder: |
Please describe the bug here...
*** Do NOT use AI to generate a bug report ***
Write down what is wrong, attach logs and screenshots when relevant.
validations:
required: true
@@ -22,12 +25,6 @@ body:
2. Click on '...'
3. See error
- type: input
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
placeholder: Please describe what you expected to happen.
- type: input
attributes:
label: WiVRn Version
@@ -36,35 +33,26 @@ body:
validations:
required: true
- type: textarea
- type: input
attributes:
label: Server Config
description: Provide the content of `config.json` for the server.
placeholder: Add the content of config.json here...
label: Installation method
description: Describe how WiVRn and OpenComposite/xrizer were installed
placeholder: flatpak --user, flatpak, AUR, Gentoo/Guru, built from sources...
- type: textarea
attributes:
label: Server Logs
description: Provide the `wivrn-server` output.
placeholder: Add the output of the wivrn-server here...
- type: dropdown
id: gpu
attributes:
label: What GPU did the bug occur on?
options:
- NVIDIA
- AMD
- Intel
- Other
validations:
required: true
placeholder: |
Add the output of the wivrn-server here.
If more than a few lines, prefer file attachment.
- type: textarea
attributes:
label: Vulkan Info
description: Provide the output of `vulkaninfo --summary` command.
placeholder: Add the output of vulkaninfo command here...
render: text
placeholder: Attach the output as a file here.
- type: dropdown
id: hmd
@@ -90,4 +78,5 @@ body:
attributes:
label: ADB Logs
description: Provide the output of `adb logcat` command.
placeholder: Add the output of adb logcat command here...
render: text
placeholder: Attach the output of adb logcat as a file.
-114
View File
@@ -1,114 +0,0 @@
# Disable hand tracking
set left hand_tracking_active false
set right hand_tracking_active false
# Reset positions
set head position 0.0 1.5 0.2
set head rotation 0.0 0.0 0.0 1.0
set left position -0.2 1.3 -0.3
set left rotation 0.4 0 0 0.9
set right position 0.2 1.3 -0.3
set right rotation 0.4 0 0 0.9
# Server list
set right direction -1.8 1.55 -1
sleep 1
set right trigger_value 1
sleep 1
set right trigger_value 0
sleep 1
exec grim -g "0,0 2560x1440" ${LANG}/screenshot-01-list.png
# Connect to the first server
set right direction 0.2 1.42 -1
sleep 1
set right trigger_value 1
sleep 1
set right trigger_value 0
sleep 5
exec grim -g "0,0 2560x1440" ${LANG}/screenshot-02-connect.png
# Cancel
set right direction -0.3 1.25 -1
sleep 1
set right trigger_value 1
sleep 1
set right trigger_value 0
sleep 1
# Add server
set right direction -1.45 1.55 -1
sleep 1
set right trigger_value 1
sleep 1
set right trigger_value 0
sleep 1
set right rotation 0.4 0 0 0.9
set head position 0.0 1.5 0.5
set left position -0.2 1.4 0.2
set left direction -0.1 -0.3 -1
set right position 0.2 1.4 0.2
set right direction -0.1 -0.3 -1
sleep 1
exec grim -g "0,0 2560x1440" ${LANG}/screenshot-03-add-server.png
set head position 0.0 1.5 0.2
set left position -0.2 1.3 -0.3
set left rotation 0.4 0 0 0.9
set right position 0.2 1.3 -0.3
set right rotation 0.4 0 0 0.9
# Cancel
set right direction -2.2 1.05 -1
sleep 1
set right trigger_value 1
sleep 1
set right trigger_value 0
sleep 1
# Settings
set right direction -1.9 1.5 -1
sleep 1
set right trigger_value 1
sleep 1
set right trigger_value 0
sleep 1
set right rotation 0.4 0 0 0.9
sleep 1
exec grim -g "0,0 2560x1440" ${LANG}/screenshot-04-settings.png
# Post-processing
set right direction -1.95 1.45 -1
sleep 1
set right trigger_value 1
sleep 1
set right trigger_value 0
sleep 1
set right rotation 0.4 0 0 0.9
sleep 1
exec grim -g "0,0 2560x1440" ${LANG}/screenshot-07-post-processing.png
# About
set right direction -2.4 0.45 -1
sleep 1
set right trigger_value 1
sleep 1
set right trigger_value 0
sleep 1
set right rotation 0.4 0 0 0.9
sleep 1
exec grim -g "0,0 2560x1440" ${LANG}/screenshot-05-about.png
# Licences
set right direction -2.4 0.32 -1
sleep 1
set right trigger_value 1
sleep 1
set right trigger_value 0
sleep 1
exec grim -g "0,0 2560x1440" ${LANG}/screenshot-06-licence.png
+21 -21
View File
@@ -10,34 +10,36 @@ env:
jobs:
build-android-only:
name: Android
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
if: ${{ vars.APK_ONLY != '' }}
strategy:
matrix:
hmd: ['Standard']
buildtype: ['Release', 'Debug', 'DebugWithValidationLayer']
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
# Checkout from upstream instead of WiVRn-APK to ensure the GIT_DESC variable is set correctly
repository: 'WiVRn/WiVRn'
ref: ${{ github.sha }}
fetch-depth: 0
- name: set up JDK
uses: actions/setup-java@v4
# Gradle distribution and the Android plugin's dependencies.
- uses: actions/cache@v5
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
key: gradle-android-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'build.gradle') }}
path: |
~/.gradle/caches
~/.gradle/wrapper
restore-keys: gradle-android-
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install glslang-tools librsvg2-bin gettext
wget https://github.com/KhronosGroup/KTX-Software/releases/download/v4.3.2/KTX-Software-4.3.2-Linux-x86_64.deb
sudo dpkg --install KTX-Software-4.3.2-Linux-x86_64.deb
sudo apt-get update && sudo apt-get install glslang-tools spirv-tools librsvg2-bin gettext npm
wget https://github.com/KhronosGroup/KTX-Software/releases/download/v4.4.0/KTX-Software-4.4.0-Linux-x86_64.deb
sudo dpkg --install KTX-Software-4.4.0-Linux-x86_64.deb
npm install --global @gltf-transform/cli@4.1.1
- name: Check for Secret availability
id: secret-check
@@ -60,10 +62,8 @@ jobs:
- name: Build
run: |
sudo rm /usr/local/bin/cmake
"${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager" --install "cmake;3.30.3"
chmod +x gradlew
./gradlew -Psuffix=".github.nightly" -Pwivrn_css=images/wivrn-nightly.css -Pwivrn_app_name="WiVRn Nightly" assemble${{ matrix.hmd }}${{ matrix.buildtype }}
./gradlew -Psuffix=".github.nightly" -Pwivrn_css=images/wivrn-nightly.css -Pwivrn_app_name="WiVRn Nightly" -Pwivrn_compress_glb=ON assemble${{ matrix.buildtype }}
- name: Prepare before archiving artifacts
run: |
@@ -74,17 +74,17 @@ jobs:
find debug -name libopenxr_loader.so -delete
- name: Archive APK
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: apk-${{ matrix.hmd }}-${{ (github.event_name == 'pull_request' && matrix.buildtype == 'Release') && 'Release-unsigned' || matrix.buildtype }}
name: apk-${{ (github.event_name == 'pull_request' && matrix.buildtype == 'Release') && 'Release-unsigned' || matrix.buildtype }}
path: apk/*.apk
retention-days: 7
- name: Archive debug symbols
if: ${{ matrix.buildtype != 'Release' }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: symbols-${{ matrix.hmd }}-${{ matrix.buildtype }}
name: symbols-${{ matrix.buildtype }}
path: debug/**/*.so
retention-days: 7
@@ -96,7 +96,7 @@ jobs:
steps:
- name: Download APK artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
path: apk
pattern: 'apk-*'
@@ -111,7 +111,7 @@ jobs:
done
- name: Download APK debug artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
path: symbols
pattern: 'symbols-*'
@@ -123,7 +123,7 @@ jobs:
zip -r ../debug-symbols.zip .
- name: APK Release
uses: softprops/action-gh-release@v2
uses: softprops/action-gh-release@v3
with:
token: ${{ secrets.DOWNSTREAM_GITHUB_TOKEN }}
tag_name: "apk-${{ github.sha }}"
+249 -260
View File
@@ -5,41 +5,84 @@ on:
pull_request:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
SERVER_DEPS: libx264-dev libavcodec-dev libavutil-dev libbsd-dev libavahi-client-dev libavahi-glib-dev libeigen3-dev nlohmann-json3-dev librsvg2-dev libdrm-dev libglib2.0-dev-bin libpipewire-0.3-dev libcli11-dev libnotify-dev libarchive-dev libudev-dev
CSS: images/wivrn-${{(github.ref_type == 'tag' && 'release') || 'nightly'}}.css
jobs:
build-server:
name: Linux server
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-24.04
build-linux:
name: Linux
runs-on: ubuntu-26.04
if: ${{ vars.APK_ONLY == '' }}
strategy:
fail-fast: false
matrix:
cmake_preset: ['server', 'server-no-systemd', 'server-no-system-boost']
config:
- preset: 'client-no-system-boost'
packages: libharfbuzz-dev libfreetype-dev libavcodec-dev libavutil-dev libswscale-dev librsvg2-bin gettext libcurl4-openssl-dev libfontconfig-dev libpipewire-0.3-dev
- preset: 'dashboard'
packages: extra-cmake-modules libarchive-dev libboost-all-dev libkf6coreaddons-dev libkf6qqc2desktopstyle-dev libkf6iconthemes-dev libkirigami-dev librsvg2-dev nlohmann-json3-dev qcoro-qt6-dev qml6-module-org-kde-kirigamiaddons-formcard
- preset: 'dissector-no-system-boost'
packages: libboost-all-dev wireshark-dev
- preset: 'server'
packages: libboost-all-dev libsystemd-dev
# tracing is opt-in and rarely built; build it here so the instrumentation and the
# Perfetto SDK glue don't bitrot (WIVRN_TRACE_MONADO needs percetto, not packaged in CI)
- preset: 'server-tracing'
packages: libboost-all-dev libsystemd-dev
- preset: 'server-no-systemd'
packages: libboost-all-dev
- preset: 'server-no-system-boost'
packages: libsystemd-dev
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Apt dependencies
uses: awalsh128/cache-apt-pkgs-action@v1.6.1
with:
fetch-depth: 0
packages: ccache libvulkan-dev glslang-tools spirv-tools libwayland-dev libxrandr-dev ${{matrix.config.packages}} ${{ startsWith(matrix.config.preset, 'server') && env.SERVER_DEPS || ''}}
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
uses: hendrikmuhs/ccache-action@v1.2.24
with:
create-symlink: true
# The trailing "." keeps one preset's key from being a prefix of another's
key: linux-${{matrix.config.preset}}.
verbose: 1
job-summary: ''
evict-old-files: job
save: ${{ github.ref == 'refs/heads/master' }}
- uses: actions/cache@v5
with:
key: cmake-linux-${{matrix.config.preset}}
path: |
${{github.workspace}}/cmake-fetch/*-subbuild/*-populate-prefix/src/*.tar.*
${{github.workspace}}/cmake-fetch/*-subbuild/*-populate-prefix/src/*.zip
${{github.workspace}}/cmake-fetch/*.tar.*
${{github.workspace}}/cmake-fetch/*.tgz
${{github.workspace}}/cmake-fetch/*-src/.git
restore-keys: cmake-linux-
- name: Install dependencies
run: >
sudo apt-get update && sudo apt-get install libvulkan-dev libcjson-dev libx264-dev libavcodec-dev libavutil-dev libswscale-dev libavfilter-dev libbsd-dev libavahi-client-dev libavahi-glib-dev libeigen3-dev glslang-tools libudev-dev libwayland-dev libx11-xcb-dev libxrandr-dev libxcb-randr0-dev libgl-dev libglx-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libsystemd-dev libva-dev nlohmann-json3-dev libpulse-dev xz-utils libpipewire-0.3-dev libcli11-dev libboost-all-dev librsvg2-bin libssl-dev libnotify-dev
- name: Prepare Vulkan SDK
uses: humbletim/setup-vulkan-sdk@286ed76c72de45dbf50c515779cf4ca2f6aa3944
with:
vulkan-query-version: 1.3.283.0
vulkan-components: Vulkan-Headers
vulkan-use-cache: true
if: ${{ startswith(matrix.config.preset, 'client') }}
run: |
wget https://github.com/KhronosGroup/KTX-Software/releases/download/v4.4.2/KTX-Software-4.4.2-Linux-x86_64.deb
sudo dpkg --install KTX-Software-4.4.2-Linux-x86_64.deb
npm install --global @gltf-transform/cli@4.1.1
- name: Fetch Perfetto SDK
if: ${{ matrix.config.preset == 'server-tracing' }}
# The amalgamated SDK is two files; install them where server/CMakeLists.txt looks.
env:
PERFETTO_TAG: v51.0
run: |
sudo mkdir -p /usr/share/perfetto/sdk
for f in perfetto.h perfetto.cc; do
sudo curl -fsSL -o /usr/share/perfetto/sdk/$f \
https://raw.githubusercontent.com/google/perfetto/${PERFETTO_TAG}/sdk/$f
done
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
@@ -47,102 +90,166 @@ jobs:
run: >
cmake -B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DCMAKE_INSTALL_PREFIX=/usr
--preset ${{ matrix.cmake_preset }}
-DFETCHCONTENT_BASE_DIR=${{github.workspace}}/cmake-fetch
-DCMAKE_C_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
--preset ${{ matrix.config.preset }}
-DWIVRN_USE_SYSTEM_OPENXR=OFF
- name: Package build dependencies
if: ${{ matrix.cmake_preset == 'server' }}
if: ${{ matrix.config.preset == 'server' }}
# For easier packaging, build dependencies are made available as a separate archive
run: (cd ${{github.workspace}}/build/_deps/ ; tar --create --xz *-src) > ${{github.workspace}}/server-build-deps.tar.xz
run: cd ${{github.workspace}}/cmake-fetch ; tar --create --xz --exclude .git --file ${{github.workspace}}/server-build-deps.tar.xz *-src
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Publish build dependencies
if: ${{ matrix.cmake_preset == 'server' }}
uses: actions/upload-artifact@v4
if: ${{ matrix.config.preset == 'server' }}
uses: actions/upload-artifact@v7
with:
name: server-build-deps
path: server-build-deps.tar.xz
- name: Release build dependencies
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/') && matrix.cmake_preset == 'server'
if: startsWith(github.ref, 'refs/tags/') && matrix.config.preset == 'server'
with:
tag_name: ${{ inputs.ref }}
generate_release_notes: true
draft: true
files: server-build-deps.tar.xz
build-dashboard:
name: Linux dashboard
runs-on: ubuntu-24.04
container: ubuntu:oracular
build-steam-frame:
name: Steam Frame
runs-on: ubuntu-24.04-arm
if: ${{ vars.APK_ONLY == '' }}
container:
image: registry.gitlab.steamos.cloud/steamrt/steamrt4/sdk/arm64:4.0.20260805.254769
volumes:
- ${{github.workspace}}/install:/tmp/install
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true
- name: Apt dependencies
uses: awalsh128/cache-apt-pkgs-action@v1.6.1
with:
packages: librsvg2-bin npm
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2.24
with:
key: steam-frame
verbose: 1
job-summary: ''
evict-old-files: job
save: ${{ github.ref == 'refs/heads/master' }}
restore-keys: steam-frame
- uses: actions/cache@v5
with:
key: cmake-frame
path: |
${{github.workspace}}/cmake-fetch/*-subbuild/*-populate-prefix/src/*.tar.*
${{github.workspace}}/cmake-fetch/*-subbuild/*-populate-prefix/src/*.zip
${{github.workspace}}/cmake-fetch/*.tar.*
${{github.workspace}}/cmake-fetch/*.tgz
${{github.workspace}}/cmake-fetch/*-src/.git
- name: Install dependencies
run: >
apt-get update && apt-get install --yes libvulkan-dev libcjson-dev libx264-dev libavcodec-dev libavutil-dev libswscale-dev libavfilter-dev libbsd-dev libwayland-dev libx11-xcb-dev libxrandr-dev libxcb-randr0-dev libgl-dev libglx-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libsystemd-dev libva-dev nlohmann-json3-dev qt6-base-dev qt6-tools-dev libcap-dev pkexec libboost-all-dev librsvg2-bin libssl-dev libnotify-dev qt6-declarative-dev extra-cmake-modules libkirigami-dev libkf6i18n-dev libkf6coreaddons-dev libkf6qqc2desktopstyle-dev libkf6iconthemes-dev jq sudo cmake gcc g++ git qcoro-qt6-dev
# runtime: qml6-module-qtqml-workerscript qml6-module-qtquick-dialogs
- name: Prepare Vulkan SDK
uses: humbletim/setup-vulkan-sdk@286ed76c72de45dbf50c515779cf4ca2f6aa3944
with:
vulkan-query-version: 1.3.283.0
vulkan-components: Vulkan-Headers
vulkan-use-cache: true
run: |
wget https://github.com/KhronosGroup/KTX-Software/releases/download/v4.4.2/KTX-Software-4.4.2-Linux-arm64.deb
sudo dpkg --install KTX-Software-4.4.2-Linux-arm64.deb
npm install --global @gltf-transform/cli@4.1.1
- name: Configure CMake
run: >
cmake -B ${{github.workspace}}/build
cmake -B "$GITHUB_WORKSPACE/build"
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DWIVRN_CSS=${{env.CSS}}
-DFETCHCONTENT_BASE_DIR="$GITHUB_WORKSPACE/cmake-fetch"
-DCMAKE_C_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_INSTALL_PREFIX=/usr
--preset dashboard
--preset frame
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
cd "$GITHUB_WORKSPACE/build"
DESTDIR="$GITHUB_WORKSPACE/install" ninja install
- name: Archive
uses: actions/upload-artifact@v7
with:
name: wivrn-frame-client.zip
path: install/usr
if-no-files-found: error
retention-days: 30
build-server-flatpak:
name: Linux server (flatpak)
runs-on: ubuntu-24.04
if: ${{ vars.APK_ONLY == '' }}
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.8
# Tag matches runtime-version in the manifest.
image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.11
options: --privileged
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/cache/restore@v5
id: cache
with:
path: |
flatpak/monado-*.tar.gz
flatpak/xrizer-gen-src-*.json
.flatpak-builder
key: flatpak-build-${{ hashFiles('flatpak/io.github.wivrn.wivrn.yml.in', 'flatpak/ct-ng-x86_64.config', 'flatpak/ct-ng-aarch64.config', 'monado-rev') }}
restore-keys: flatpak-build-
- name: Create the flatpak manifest
run: |
git config --global --add safe.directory $(pwd)
pip install toml aiohttp
tools/gen_flatpak_manifest.py --git https://github.com/${{github.repository}}.git --out flatpak
tools/gen_flatpak_manifest.py --gitlocal --out flatpak
cat flatpak/io.github.wivrn.wivrn.yml
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6.4
- name: Update flatpak runtimes
run: |
for i in 1 2 3; do
flatpak update -y --noninteractive && exit 0
echo "flatpak update failed (attempt $i), retrying"
sleep 20
done
exit 1
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6.8
with:
manifest-path: flatpak/io.github.wivrn.wivrn.yml
bundle: wivrn-server.flatpak
upload-artifact: false
restore-cache: false
save-cache: false
# Upload manually instead of using flatpak/flatpak-github-actions/flatpak-builder because
# it uses upload-artifact@v3
- name: Publish artifact
uses: actions/upload-artifact@v4
- uses: actions/cache/save@v5
if: success() && steps.cache.outputs.cache-hit != 'true'
with:
name: wivrn-flatpak-x86_64
path: wivrn-server.flatpak
path: |
flatpak/monado-*.tar.gz
flatpak/xrizer-gen-src-*.json
.flatpak-builder
key: flatpak-build-${{ hashFiles('flatpak/io.github.wivrn.wivrn.yml.in', 'flatpak/ct-ng-x86_64.config', 'flatpak/ct-ng-aarch64.config', 'monado-rev') }}
- name: Debug bundle
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
if: failure()
with:
name: flatpak-debug
@@ -153,189 +260,67 @@ jobs:
nix-test:
name: Test Nix package and devshell
runs-on: ubuntu-24.04
if: ${{ vars.APK_ONLY == '' }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: cachix/install-nix-action@v31
- run: nix flake check
- run: nix build
build-test-client:
name: Linux client
runs-on: ubuntu-24.04
if: ${{ vars.APK_ONLY == '' }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
create-symlink: true
- name: Prepare Vulkan SDK
uses: humbletim/setup-vulkan-sdk@286ed76c72de45dbf50c515779cf4ca2f6aa3944
with:
vulkan-query-version: 1.3.283.0
vulkan-components: Vulkan-Headers
vulkan-use-cache: true
- name: Install dependencies
run: >
sudo apt-get update && sudo apt-get install libvulkan-dev libcjson-dev libx264-dev libavcodec-dev libavutil-dev libswscale-dev libavfilter-dev libbsd-dev libavahi-client-dev libeigen3-dev glslang-tools libudev-dev libwayland-dev libx11-xcb-dev libxrandr-dev libxcb-randr0-dev libgl-dev libglx-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libsystemd-dev libva-dev libxcb-glx0-dev gettext libfontconfig-dev libboost-all-dev librsvg2-bin libssl-dev sway grim mesa-vulkan-drivers wayland-protocols fonts-noto-cjk fonts-roboto
- name: install server dependencies
run: >
sudo apt-get update && sudo apt-get install libavahi-glib-dev nlohmann-json3-dev libpulse-dev xz-utils libpipewire-0.3-dev libcli11-dev qt6-base-dev qt6-tools-dev libcap-dev pkexec libnotify-dev
- name: Configure CMake
run: >
cmake -B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DCMAKE_INSTALL_PREFIX=/usr
--preset everything
-DWIVRN_BUILD_DASHBOARD=OFF
-DWIVRN_BUILD_DISSECTOR=OFF
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Build Monado
# Disable XRT_FEATURE_OPENXR_VISIBILITY_MASK because of https://gitlab.freedesktop.org/monado/monado/-/issues/480
run: |
mkdir monado
curl https://gitlab.freedesktop.org/Meumeu/monado/-/archive/5bdb51697685320e3f5d494210f25fb2967c9fc3/monado-main.tar.gz | tar -xz -C monado --strip-components=1
patch --directory=${{github.workspace}}/monado --strip=1 < ${{github.workspace}}/patches/monado-ci/0001-remote-resolution.patch
DRIVERS=$(grep -oE "XRT_BUILD_DRIVER_[A-Z0-9_]*" monado/CMakeLists.txt | sort -u | grep -v XRT_BUILD_DRIVER_REMOTE | sed 's/\(.*\)/-D\1=OFF/')
cmake monado -B ${{github.workspace}}/build-monado -DCMAKE_BUILD_TYPE=Release -DXRT_FEATURE_SERVICE_SYSTEMD=OFF -DXRT_FEATURE_SERVICE=OFF -DXRT_BUILD_DRIVER_REMOTE=ON -DXRT_MODULE_COMPOSITOR_MAIN=ON -DXRT_HAVE_WAYLAND=ON $DRIVERS -DXRT_MODULE_MONADO_REMOTECTL=ON -DBUILD_TESTING=OFF -DXRT_FEATURE_OPENXR_VISIBILITY_MASK=OFF
cmake --build ${{github.workspace}}/build-monado
- name: Take screenshots
continue-on-error: true
env:
WLR_BACKENDS: headless
WLR_RENDERER: pixman
WLR_LIBINPUT_NO_DEVICES: 1
XR_RUNTIME_JSON: ${{github.workspace}}/build-monado/openxr_monado-dev.json
P_OVERRIDE_ACTIVE_CONFIG: remote
WIVRN_CONTROLLER: meta-quest-touch-plus
WIVRN_GRIP_LEFT_OFFSET: '0 0 0 0 45 0'
WIVRN_GRIP_RIGHT_OFFSET: '0 0 0 0 45 0'
XRT_COMPOSITOR_SCALE_PERCENTAGE: '100'
run: |
echo "xwayland disable" > sway-config
echo -e "output HEADLESS-1 {\n mode 2560x1440@60Hz\n}" >> sway-config
sway -c sway-config &
sleep 10
export WAYLAND_DISPLAY=$(cd "${XDG_RUNTIME_DIR}" && ls -tr wayland* | tail -1)
mkdir -p ~/.config/fontconfig
cp ${{github.workspace}}/.github/fonts.conf ~/.config/fontconfig/fonts.conf
${{github.workspace}}/build/server/wivrn-server --no-encrypt --no-publish-service &
WIVRN_SERVER_PID=$!
mkdir -p ~/.config/wivrn
echo '{"servers": [{"autoconnect": false, "manual": true, "pretty_name": "Deep Thought", "hostname": "localhost", "port": 9757, "tcp_only": false, "cookie": ""}]}' > ~/.config/wivrn/client.json.in
for LANG in en $(basename -a ${{github.workspace}}/locale/*)
do
mkdir ${LANG}
if [ ${LANG} = fr ]
then
cat ~/.config/wivrn/client.json.in | jq .virtual_keyboard_layout=\"AZERTY\" > ~/.config/wivrn/client.json
else
cat ~/.config/wivrn/client.json.in | jq .virtual_keyboard_layout=\"QWERTY\" > ~/.config/wivrn/client.json
fi
${{github.workspace}}/build/bin/wivrn &
WIVRN_PID=$!
sleep 10
${{github.workspace}}/build-monado/src/xrt/targets/remotectl/monado-remotectl 127.0.0.1 4242 < ${{github.workspace}}/.github/screenshot-script.txt
killall wivrn
wait $WIVRN_PID || true
done
killall wivrn-server
wait $WIVRN_SERVER_PID || true
- name: Upload screenshots
uses: actions/upload-artifact@v4
with:
name: Screenshots
path: "*/screenshot-*.png"
build-dissector:
name: Wireshark dissector
runs-on: ubuntu-24.04
if: ${{ vars.APK_ONLY == '' }}
strategy:
matrix:
# Ubuntu 24.04 has boost 1.83, the dissector requires 1.84
# cmake_preset: ['dissector', 'dissector-no-system-boost']
cmake_preset: ['dissector-no-system-boost']
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Prepare Vulkan SDK
uses: humbletim/setup-vulkan-sdk@286ed76c72de45dbf50c515779cf4ca2f6aa3944
with:
vulkan-query-version: 1.3.268.0
vulkan-components: Vulkan-Headers
vulkan-use-cache: true
- name: Install dependencies
run: >
sudo apt-get update && sudo apt-get install libvulkan-dev libopenxr-dev wireshark wireshark-dev libssl-dev
- name: Configure CMake
run: >
cmake -B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DCMAKE_INSTALL_PREFIX=/usr
--preset ${{ matrix.cmake_preset }}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- run: nix build --print-build-logs
build-android:
name: Android
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
if: ${{ vars.APK_ONLY == '' }}
strategy:
matrix:
hmd: ['Standard']
buildtype: ['Release', 'Debug', 'DebugWithValidationLayer', 'Oculus']
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: set up JDK
uses: actions/setup-java@v4
- uses: actions/cache@v5
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
key: cmake-android-${{matrix.buildtype}}
path: |
${{github.workspace}}/cmake-fetch/*-subbuild/*-populate-prefix/src/*.tar.*
${{github.workspace}}/cmake-fetch/*-subbuild/*-populate-prefix/src/*.zip
${{github.workspace}}/cmake-fetch/*.tar.*
${{github.workspace}}/cmake-fetch/*.zip
${{github.workspace}}/cmake-fetch/*.tgz
restore-keys: cmake-android-
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2.24
with:
# The trailing "." keeps one build type's key from being a prefix of another's
key: android-${{matrix.buildtype}}.
verbose: 1
job-summary: ''
evict-old-files: job
save: ${{ github.ref == 'refs/heads/master' }}
# Gradle distribution and the Android plugin's dependencies.
- uses: actions/cache@v5
with:
key: gradle-android-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'build.gradle') }}
path: |
~/.gradle/caches
~/.gradle/wrapper
restore-keys: gradle-android-
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install glslang-tools librsvg2-bin gettext
sudo apt-get update && sudo apt-get install glslang-tools spirv-tools librsvg2-bin gettext
wget https://github.com/KhronosGroup/KTX-Software/releases/download/v4.3.2/KTX-Software-4.3.2-Linux-x86_64.deb
sudo dpkg --install KTX-Software-4.3.2-Linux-x86_64.deb
npm install --global @gltf-transform/cli
- name: Check for Secret availability
id: secret-check
@@ -362,8 +347,11 @@ jobs:
echo "$APK_KEYSTORE_BASE64" | base64 --decode --ignore-garbage > ks.keystore
- name: Build
env:
# Paths under the workspace are hashed relative to it
CCACHE_BASEDIR: ${{github.workspace}}
run: |
VERSION=$(git describe --tags --always)
VERSION=$(git describe --tags --always | sed "s/^v\([0-9]\)/\1/")
if [ ${{ matrix.buildtype }} = 'Oculus' ]
then
SUFFIX=""
@@ -373,7 +361,6 @@ jobs:
VERSION_CODE=$(( $VERSION_CODE + 1 ))
fi
CSS=images/wivrn-release.css
APPNAME=WiVRn
else
VERSION_CODE=1
@@ -381,26 +368,30 @@ jobs:
if [ ${{ github.ref_type }} = 'tag' ]
then
SUFFIX=".github"
CSS=images/wivrn-release.css
APPNAME="WiVRn"
else
SUFFIX=".github.testing"
CSS=images/wivrn-nightly.css
APPNAME="WiVRn Testing"
fi
fi
sudo rm /usr/local/bin/cmake
"${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager" --install "cmake;3.30.3"
echo Setting version $VERSION and version code $VERSION_CODE in manifest
echo Using stylesheet $CSS and name $APPNAME
echo Using stylesheet ${{env.CSS}} and name $APPNAME
chmod +x gradlew
./gradlew -Pwivrn_version=$VERSION -Pwivrn_versionCode=$VERSION_CODE -Psuffix=$SUFFIX -Pwivrn_css=$CSS -Pwivrn_app_name="$APPNAME" assemble${{ matrix.hmd }}${{ matrix.buildtype }}
./gradlew \
-Pwivrn_version=$VERSION \
-Pwivrn_versionCode=$VERSION_CODE \
-Psuffix=$SUFFIX \
-Pwivrn_css=${{env.CSS}} \
-Pwivrn_app_name="$APPNAME" \
-Pwivrn_compress_glb=ON \
-Pfetchcontent_base_dir=${{github.workspace}}/cmake-fetch \
-Pcompiler_launcher=ccache \
assemble${{ matrix.buildtype }}
- name: Upload build dir
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
if: failure()
with:
name: android-cxx-debug-${{ matrix.buildtype }}
@@ -417,20 +408,18 @@ jobs:
find debug -name libopenxr_loader.so -delete
- name: Archive APK
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
if: ${{ matrix.buildtype != 'Oculus' }}
with:
name: apk-${{ matrix.hmd }}-${{ (steps.secret-check.outputs.available == 'false' && matrix.buildtype == 'Release') && 'Release-unsigned' || matrix.buildtype }}
name: apk-${{ (steps.secret-check.outputs.available == 'false' && matrix.buildtype == 'Release') && 'Release-unsigned' || matrix.buildtype }}
path: apk/*.apk
retention-days: 30
- name: Archive debug symbols
if: ${{ matrix.buildtype != 'Release' && matrix.buildtype != 'Oculus' }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: symbols-${{ matrix.hmd }}-${{ matrix.buildtype }}
name: symbols-${{ matrix.buildtype }}
path: debug/**/*.so
retention-days: 30
- name: Push to Oculus store
if: ${{ matrix.buildtype == 'Oculus' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master') && steps.secret-check.outputs.oculus-token == 'true' }}
@@ -449,7 +438,7 @@ jobs:
IS_DRAFT=
fi
./ovr-platform-util upload-quest-build --app-id 7959676140827574 --token $OCULUS_TOKEN --apk apk/WiVRn-standard-oculus.apk --channel $CHANNEL --age-group TEENS_AND_ADULTS $IS_DRAFT --debug_symbols_dir debug/ --debug-symbols-pattern '*.so'
./ovr-platform-util upload-quest-build --app-id 7959676140827574 --token $OCULUS_TOKEN --apk apk/WiVRn-oculus.apk --channel $CHANNEL --age-group TEENS_AND_ADULTS $IS_DRAFT --debug_symbols_dir debug/ --debug-symbols-pattern '*.so'
build-ubuntu:
name: Build Ubuntu package
@@ -457,7 +446,7 @@ jobs:
strategy:
fail-fast: false
matrix:
distro: ['oracular', 'plucky']
distro: ['plucky']
runs-on: ubuntu-24.04
container: ubuntu:${{ matrix.distro }}
steps:
@@ -465,9 +454,13 @@ jobs:
- name: Install dependencies
run: |
apt update
apt install --yes libcjson-dev libx264-dev libavcodec-dev libavutil-dev libswscale-dev libavfilter-dev libbsd-dev libavahi-client-dev libavahi-glib-dev libeigen3-dev glslang-tools libudev-dev libwayland-dev libx11-xcb-dev libxrandr-dev libxcb-randr0-dev libgl-dev libglx-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libsystemd-dev libva-dev nlohmann-json3-dev libpulse-dev xz-utils libpipewire-0.3-dev libcli11-dev qt6-base-dev qt6-tools-dev libcap-dev pkexec libboost-all-dev librsvg2-bin dpkg-dev pkg-config debhelper-compat build-essential lintian cmake libnotify-dev qt6-declarative-dev extra-cmake-modules libkirigami-dev libkf6i18n-dev libkf6coreaddons-dev libkf6qqc2desktopstyle-dev libkf6iconthemes-dev jq sudo cmake gcc g++ git wget libssl-dev qcoro-qt6-dev
apt install --yes libcjson-dev libx264-dev libavcodec-dev libavutil-dev libswscale-dev libavfilter-dev libbsd-dev libavahi-client-dev libavahi-glib-dev libeigen3-dev glslang-tools libudev-dev libwayland-dev libx11-xcb-dev libxrandr-dev libxcb-randr0-dev libgl-dev libglx-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libsystemd-dev libva-dev nlohmann-json3-dev xz-utils libpipewire-0.3-dev libcli11-dev qt6-base-dev qt6-tools-dev pkexec libboost-all-dev librsvg2-bin dpkg-dev pkg-config debhelper-compat build-essential lintian cmake libnotify-dev qt6-declarative-dev extra-cmake-modules libkirigami-dev libkf6i18n-dev libkf6coreaddons-dev libkf6qqc2desktopstyle-dev libkf6iconthemes-dev jq sudo cmake gcc g++ git wget libssl-dev qcoro-qt6-dev librsvg2-dev libarchive-dev npm qml6-module-org-kde-kirigamiaddons-formcard
- uses: actions/checkout@v4
wget https://github.com/KhronosGroup/KTX-Software/releases/download/v4.3.2/KTX-Software-4.3.2-Linux-x86_64.deb
sudo dpkg --install KTX-Software-4.3.2-Linux-x86_64.deb
npm install --global @gltf-transform/cli
- uses: actions/checkout@v6
with:
fetch-depth: 0
path: wivrn
@@ -482,10 +475,14 @@ jobs:
- name: Patch monado
working-directory: wivrn/monado-src
run: >
for p in ../patches/monado/*; do
patch -p1 --fuzz=0 --forward < "$p"
done
run: ../patches/apply.sh ../patches/monado/*
- name: Download stb
run: |
wget https://github.com/nothings/stb/archive/013ac3beddff3dbffafd5177e7972067cd2b5083.tar.gz -O stb.tar.gz
mkdir wivrn/stb-src
tar xzf stb.tar.gz --strip-components=1 -C wivrn/stb-src
- name: Edit changelog
working-directory: wivrn
@@ -502,7 +499,7 @@ jobs:
run: dpkg-buildpackage --build=binary --no-sign
- name: Publish package
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: wivrn-${{ matrix.distro }}
path: |
@@ -516,11 +513,11 @@ jobs:
release:
name: Create release
runs-on: ubuntu-22.04
needs: [build-server, build-android, build-test-client, build-dissector, build-server-flatpak, build-ubuntu, build-dashboard]
needs: [build-linux, build-android, build-server-flatpak, build-ubuntu]
if: success() && startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0
path: wivrn
@@ -535,7 +532,7 @@ jobs:
echo "available=false" >> $GITHUB_OUTPUT;
fi
- uses: actions/checkout@v4
- uses: actions/checkout@v6
if: ${{ steps.flathub-token-check.outputs.available == 'true' }}
with:
fetch-depth: 0
@@ -544,20 +541,19 @@ jobs:
token: ${{ secrets.FLATHUB_TOKEN }}
- name: Download artifacts (APK)
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: apk-Release
path: apk
pattern: '*-Release'
merge-multiple: true
- name: Download artifacts (flatpak)
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: wivrn-flatpak-x86_64
name: wivrn-server-x86_64.flatpak
path: flatpak
- name: Release
uses: softprops/action-gh-release@v2
uses: softprops/action-gh-release@v3
with:
tag_name: ${{ inputs.ref }}
generate_release_notes: true
@@ -574,7 +570,7 @@ jobs:
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
sudo apt-get install python-toml python-aiohttp
sudo apt-get install python3-toml python3-aiohttp
cd flathub
git remote add upstream https://github.com/flathub/io.github.wivrn.wivrn.git
@@ -592,18 +588,11 @@ jobs:
git show
- name: Update release branch
run: |
cd wivrn
if git fetch origin release; then
git push origin HEAD:release
fi
sync_fork_downstream:
name: Sync fork downstream
runs-on: ubuntu-24.04
needs: [build-server, build-android]
if: ${{ vars.APK_ONLY == '' }} && github.branch == 'master'
needs: [build-linux, build-android]
if: ${{ vars.APK_ONLY == '' && github.ref == 'refs/heads/master' }}
steps:
- name: Check for DOWNSTREAM_GITHUB_TOKEN
id: downstream-secret-check
+21 -3
View File
@@ -15,9 +15,27 @@ jobs:
- 'common'
- 'tools/wireshark'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Run clang-format style check for C/C++/Protobuf programs.
uses: jidicula/clang-format-action@v4.13.0
uses: jidicula/clang-format-action@v4.18.0
with:
clang-format-version: '18'
clang-format-version: '22'
check-path: ${{ matrix.path }}
python-format-check:
name: Python lint (ruff)
runs-on: ubuntu-24.04
if: ${{ vars.APK_ONLY == '' }}
steps:
- uses: actions/checkout@v6
# Scope set by `include` in ruff.toml.
- name: Run ruff lint check
uses: astral-sh/ruff-action@v4.1.0
with:
version: "0.16.0"
args: "check"
- name: Run ruff format check
uses: astral-sh/ruff-action@v4.1.0
with:
version: "0.16.0"
args: "format --check"
+19 -5
View File
@@ -6,13 +6,27 @@ jobs:
runs-on: ubuntu-24.04
if: ${{ vars.APK_ONLY == '' }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Apt dependencies
uses: awalsh128/cache-apt-pkgs-action@v1.6.1
with:
packages: gettext
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install gettext qt6-base-dev qt6-tools-dev qt6-l10n-tools qtchooser python3-polib
run: |
pip install polib PyGithub
- name: Check that .po files are up to date
env:
GH_TOKEN: ${{ github.token }}
run: |
qtchooser -install qt6 $(which qmake6)
export QT_SELECT=qt6
tools/check_messages.sh
if [[ "${{github.ref}}" == 'refs/heads/master' ]] ; then
tools/check_po.py --manage-issues --github-repository "${{ github.repository }}" --github-token "${{ github.token }}"
elif [[ "${{github.base_ref}}" != "" ]] ; then
FILES=$(gh api repos/${{github.repository}}/pulls/${{github.event.pull_request.number}}/files | jq --raw-output '[.[].filename | select(. | startswith("locale/"))] | join(",")')
echo "Locale files changed by pull request: ${FILES}"
tools/check_po.py --fail-on "${FILES}"
else
tools/check_po.py
fi
+7
View File
@@ -11,12 +11,19 @@ build/
build-*/
**/result
__pycache__/
*.so
a.out
*.pgm
*.zip
*.keystore
*.pftrace
gradle.properties
local.properties
compile_commands.json
!libopenxr_loader.so
# Generated by tools/gen_flatpak_manifest.py
flatpak/io.github.wivrn.wivrn.yml
flatpak/xrizer-gen-src-*.json
flatpak/monado-*.tar.gz
+5
View File
@@ -0,0 +1,5 @@
# PR instructions
You are not allowed to submit pull requests.
# Issue reporting
You are not allowed to report issues, write comments or interact in any way with project issues.
+26
View File
@@ -30,6 +30,7 @@
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<!-- Required for WiFi locking, see https://developer.android.com/reference/android/net/wifi/WifiManager.WifiLock -->
@@ -47,6 +48,9 @@
<uses-permission android:name="com.oculus.permission.FACE_TRACKING" />
<uses-permission android:name="com.picovr.permission.FACE_TRACKING" />
<uses-permission android:name="com.oculus.permission.BODY_TRACKING" />
<uses-permission android:name="android.permission.EYE_TRACKING_FINE" />
<uses-permission android:name="android.permission.FACE_TRACKING" />
<uses-permission android:name="android.permission.HAND_TRACKING" />
<!-- Required for XR_FB_render_model -->
<uses-feature android:name="com.oculus.feature.RENDER_MODEL" android:required="false" />
@@ -56,12 +60,21 @@
<!-- https://developer.oculus.com/documentation/native/android/mobile-passthrough/ -->
<uses-feature android:name="com.oculus.feature.PASSTHROUGH" android:required="false" />
<!-- Required for XR_META_boundary_visibility -->
<uses-permission android:name="com.oculus.permission.BOUNDARY_VISIBILITY" />
<!-- See https://hub.vive.com/storage/docs/en-us/ConfigureAppCapabilities.html -->
<uses-feature android:name="wave.feature.handtracking" android:required="false" />
<uses-feature android:name="wave.feature.eyetracking" android:required="false" />
<uses-feature android:name="wave.feature.lipexpression" android:required="false" />
<uses-feature android:name="wave.feature.tracker" android:required="false" />
<!-- See https://developer.android.com/develop/xr/get-started -->
<uses-feature android:name="android.software.xr.api.openxr" android:version="0x00010000" android:required="true" />
<uses-feature android:name="android.hardware.xr.input.controller" android:required="false" />
<uses-feature android:name="android.hardware.xr.input.hand_tracking" android:required="false" />
<uses-feature android:name="android.hardware.xr.input.eye_tracking" android:required="false" />
<application
android:allowBackup="false"
android:hasCode="true"
@@ -71,6 +84,9 @@
<profileable android:shell="true" />
<!-- https://developer.android.com/develop/xr/get-started#uses-native-library_openxr -->
<uses-native-library android:name="libopenxr.google.so" android:required="false" />
<meta-data android:name="pvr.app.type" android:value="vr" />
<meta-data android:name="pvr.sdk.version" android:value="OpenXR" />
<meta-data android:name="picovr.software.eye_tracking" android:value="true" />
@@ -88,6 +104,16 @@
<!-- https://developer.oculus.com/documentation/native/android/mobile-splash/ -->
<meta-data android:name="com.oculus.ossplash" android:value="true"/>
<!-- https://developers.meta.com/horizon/documentation/native/android/mobile-passthrough-loading-screens -->
<meta-data android:name="com.oculus.ossplash.background" android:value="passthrough-contextual"/>
<!-- https://developer.android.com/develop/xr/get-started#xr_activity_start_mode_full_space_unmanaged -->
<property
android:name="android.window.PROPERTY_XR_ACTIVITY_START_MODE"
android:value="XR_ACTIVITY_START_MODE_FULL_SPACE_UNMANAGED" />
<property
android:name="android.window.PROPERTY_XR_BOUNDARY_TYPE_RECOMMENDED"
android:value="XR_BOUNDARY_TYPE_LARGE" />
<!-- The activity is the built-in NativeActivity framework class. -->
<!-- launchMode is set to singleTask because there should never be multiple copies of the app running. -->
+170 -150
View File
@@ -1,14 +1,24 @@
cmake_minimum_required(VERSION 3.25)
cmake_minimum_required(VERSION 3.28)
project(WiVRn VERSION 0.0.0 LANGUAGES C CXX)
# Workaround for boost CMake error
function(source_group)
endfunction()
# Set default for FetchContent projects
set(CMAKE_POLICY_DEFAULT_CMP0069 NEW)
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_SCAN_FOR_MODULES OFF)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
if(ANDROID)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/android)
endif()
# Default to PIC code
include(CheckPIESupported)
check_pie_supported()
@@ -17,39 +27,67 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
include(FetchContent)
include(ExternalProject)
include(GNUInstallDirs)
include("cmake/AutoOption.cmake")
set(GIT_TAG "" CACHE STRING "Build for a tag (from git if empty)")
set(GIT_DESC "" CACHE STRING "Version to show in UI (from git if empty, exclusive with GIT_TAG)")
set(GIT_COMMIT "" CACHE STRING "Git SHA used to fetch client APK (from git if empty, exclusive with GIT_TAG)")
if (GIT_TAG AND (GIT_DESC OR GIT_COMMIT))
message(FATAL_ERROR "cannot use GIT_DESC or GIT_COMMIT when using GIT_TAG")
endif()
option(WIVRN_USE_SYSTEM_FREETYPE "Use system FreeType" ON)
auto_option(WIVRN_USE_SYSTEM_BOOST "Use system Boost headers" AUTO)
auto_option(WIVRN_USE_SYSTEM_OPENXR "Use system OpenXR headers" AUTO)
auto_option(WIVRN_USE_SYSTEMD "Use libsystemd" AUTO)
auto_option(WIVRN_USE_LIBKTX "Use libktx" AUTO)
option(WIVRN_USE_SYSTEM_BOOST "Use system Boost headers" ON)
option(WIVRN_USE_SYSTEM_OPENXR "Use system OpenXR headers" ON)
option(WIVRN_USE_SYSTEM_LIBKTX "Use system KTX-Software library" ON)
option(WIVRN_COMPRESS_GLB "Compress textures in GLB files with gltf-transform" OFF)
option(WIVRN_USE_ANDROID_VALIDATION_LAYER "Download the android version of the Vulkan validation layer" OFF)
option(WIVRN_USE_ANDROID_BIN_LIBKTX "Download the prebuilt libktx for android" OFF)
option(WIVRN_BUILD_CLIENT "Build WiVRn client" OFF)
option(WIVRN_BUILD_SERVER "Build WiVRn server" ON)
option(WIVRN_BUILD_SERVER_LIBRARY "Build OpenXR library for WiVRn server" ${WIVRN_BUILD_SERVER})
option(WIVRN_BUILD_DASHBOARD "Build WiVRn dashboard" OFF)
option(WIVRN_BUILD_WIVRNCTL "Build wivrnctl" ON)
option(WIVRN_BUILD_DISSECTOR "Build Wireshark dissector" OFF)
option(WIVRN_BUILD_TEST "Build test binaries" OFF)
option(WIVRN_WERROR "Treat warnings as errors" OFF)
option(WIVRN_OPTIMIZE_SHADERS "Run spirv-opt on compiled shaders" ON)
option(WIVRN_DEBUG_SHADERS "Compile shaders with debug information" OFF)
option(WIVRN_ADDRESS_SANITIZER "Use address sanitizer" OFF)
# V4L2 decoder on by default on Linux AArch64
set(_WIVRN_USE_V4L2_DEFAULT OFF)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" AND NOT ANDROID)
set(_WIVRN_USE_V4L2_DEFAULT ON)
endif()
option(WIVRN_USE_V4L2 "Enable V4L2 hardware video decoder" ${_WIVRN_USE_V4L2_DEFAULT})
unset(_WIVRN_USE_V4L2_DEFAULT)
if(WIVRN_OPTIMIZE_SHADERS AND WIVRN_DEBUG_SHADERS)
message(FATAL_ERROR "WIVRN_OPTIMIZE_SHADERS and WIVRN_DEBUG_SHADERS are incompatible")
endif()
option(WIVRN_USE_NVENC "Enable nvenc (Nvidia) hardware encoder" ON)
auto_option(WIVRN_USE_VAAPI "Enable vaapi (AMD/Intel) hardware encoder" AUTO)
auto_option(WIVRN_USE_VULKAN_ENCODE "Enable vulkan video encoder" AUTO)
auto_option(WIVRN_USE_X264 "Enable x264 software encoder" AUTO)
option(WIVRN_USE_VAAPI "Enable vaapi (AMD/Intel) hardware encoder" ON)
option(WIVRN_USE_VULKAN_ENCODE "Enable vulkan video encoder" ON)
option(WIVRN_USE_X264 "Enable x264 software encoder" ON)
auto_option(WIVRN_USE_PIPEWIRE "Enable pipewire backend" AUTO)
auto_option(WIVRN_USE_PULSEAUDIO "Enable pulseaudio backend" AUTO)
option(WIVRN_USE_PERFETTO "Enable Perfetto tracing via the Perfetto SDK (server only)" OFF)
option(WIVRN_TRACE_MONADO "Also instrument Monado (percetto) under the same WIVRN_TRACING switch; pulls in a second Perfetto runtime, system backend only. Requires WIVRN_USE_PERFETTO" OFF)
if(WIVRN_TRACE_MONADO AND NOT WIVRN_USE_PERFETTO)
message(FATAL_ERROR "WIVRN_TRACE_MONADO=ON requires WIVRN_USE_PERFETTO=ON")
endif()
set(OVR_COMPAT_SEARCH_PATH "/usr/local/lib/OpenComposite:/usr/lib/OpenComposite:/opt/OpenComposite:/opt/opencomposite:/opt/xrizer"
option(WIVRN_USE_PIPEWIRE "Enable pipewire backend" ON)
set(OVR_COMPAT_SEARCH_PATH "/opt/xrizer:/usr/local/lib/OpenComposite:/usr/lib/OpenComposite:/opt/OpenComposite:/opt/opencomposite:/opt/VapoR:/usr/local/lib/VapoR"
CACHE STRING "List of places to search for the OpenVR compatibility layer, separated by :")
option(WIVRN_FEATURE_DEBUG_GUI "Enable Monado debug GUI" OFF)
option(WIVRN_FEATURE_RENDERDOC "Support renderdoc" OFF)
set(WIVRN_FEATURE_SOLARXR OFF) # Will be added back when merged in upstream Monado
option(WIVRN_FEATURE_STEAMVR_LIGHTHOUSE "Enable SteamVR Lighthouse driver" OFF)
option(WIVRN_FEATURE_SOLARXR "Enable SolarXR driver" ON)
option(WIVRN_FEATURE_STEAMVR_LIGHTHOUSE "Enable SteamVR Lighthouse driver" ON)
option(WIVRN_CHECK_CAPSYSNICE "Check if CAP_SYS_NICE is available at startup" ON)
set(WIVRN_CSS "${CMAKE_SOURCE_DIR}/images/wivrn-local.css" CACHE STRING "Stylesheet to use to render SVGs" )
option(WIVRN_SHOW_IMGUI_DEMO_WINDOW "Show the Dear ImGui demo window in the client" OFF)
@@ -60,9 +98,18 @@ set(WIVRN_OPENXR_MANIFEST_TYPE "relative" CACHE STRING "How to reference librari
if (NOT WIVRN_OPENXR_MANIFEST_TYPE IN_LIST WIVRN_OPENXR_MANIFEST_TYPE_VALUES)
message(FATAL_ERROR "WIVRN_OPENXR_MANIFEST_TYPE must be one of ${WIVRN_OPENXR_MANIFEST_TYPE_VALUES}")
endif()
option(WIVRN_OPENXR_MANIFEST_ABI "Generate an ABI specific OpenXR manifest")
option(ENABLE_COLOURED_OUTPUT "Always produce ANSI-coloured output (GNU/Clang only)." ON)
set(WIVRN_ENVIRONMENTS_URL "https://github.com/WiVRn/WiVRn-environments/releases/latest/download/index.json" CACHE STRING "URL hosting the custom environments json file")
if (WIVRN_BUILD_CLIENT OR WIVRN_BUILD_SERVER OR WIVRN_BUILD_DASHBOARD OR WIVRN_BUILD_DISSECTOR)
set(NEED_COMMON TRUE)
else()
set(NEED_COMMON FALSE)
endif()
if(ENABLE_COLOURED_OUTPUT)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
add_compile_options(-fdiagnostics-color=always)
@@ -74,104 +121,38 @@ endif()
find_package(PkgConfig REQUIRED)
find_package(Vulkan REQUIRED)
find_package(Git)
if (NOT ANDROID)
if (NEED_COMMON)
find_package(OpenSSL REQUIRED)
endif()
include(VulkanVersion)
if (WIVRN_USE_SYSTEM_BOOST STREQUAL "AUTO")
if(WIVRN_BUILD_DISSECTOR)
find_package(Boost 1.84.0 COMPONENTS locale url)
if (WIVRN_USE_SYSTEM_BOOST AND NEED_COMMON)
if (WIVRN_BUILD_DISSECTOR OR WIVRN_BUILD_CLIENT)
find_package(Boost 1.84.0 REQUIRED COMPONENTS locale url iostreams)
else()
find_package(Boost 1.75.0 COMPONENTS locale url)
endif()
elseif(WIVRN_USE_SYSTEM_BOOST STREQUAL "ON")
if(WIVRN_BUILD_DISSECTOR)
find_package(Boost 1.84.0 REQUIRED COMPONENTS locale url)
else()
find_package(Boost 1.75.0 REQUIRED COMPONENTS locale url)
find_package(Boost 1.75.0 REQUIRED COMPONENTS locale url iostreams)
endif()
endif()
if (WIVRN_BUILD_SERVER)
find_program(GDBUS_CODEGEN gdbus-codegen REQUIRED)
if (Vulkan_VERSION VERSION_LESS "1.3.261")
message(FATAL_ERROR "Vulkan version must be at least 1.3.261, found ${Vulkan_VERSION}")
if (Vulkan_VERSION VERSION_LESS "1.4.304")
message(FATAL_ERROR "Vulkan version must be at least 1.4.304, found ${Vulkan_VERSION}")
endif()
if (NOT WIVRN_USE_NVENC AND NOT WIVRN_USE_VAAPI AND NOT WIVRN_USE_X264 AND NOT WIVRN_USE_VULKAN_ENCODE)
message(FATAL_ERROR "No encoder selected, use at least one of WIVRN_USE_NVENC, WIVRN_USE_VAAPI, WIVRN_USE_VULKAN_ENCODE or WIVRN_USE_X264")
endif()
if (WIVRN_USE_VAAPI STREQUAL "AUTO")
pkg_check_modules(LIBAV IMPORTED_TARGET libavcodec libavutil libswscale libavfilter)
pkg_check_modules(LIBDRM IMPORTED_TARGET libdrm)
if (LIBAV_FOUND AND LIBDRM_FOUND)
set(WIVRN_USE_VAAPI ON)
else()
set(WIVRN_USE_VAAPI OFF)
endif()
elseif (WIVRN_USE_VAAPI)
pkg_check_modules(LIBAV REQUIRED IMPORTED_TARGET libavcodec libavutil libswscale libavfilter)
if (WIVRN_USE_VAAPI)
pkg_check_modules(LIBAV REQUIRED IMPORTED_TARGET libavcodec libavutil)
pkg_check_modules(LIBDRM REQUIRED IMPORTED_TARGET libdrm)
endif()
if (WIVRN_USE_VULKAN_ENCODE STREQUAL "AUTO")
if (Vulkan_VERSION VERSION_GREATER_EQUAL 1.3.283)
set(WIVRN_USE_VULKAN_ENCODE ON)
else()
set(WIVRN_USE_VULKAN_ENCODE OFF)
endif()
elseif(WIVRN_USE_VULKAN_ENCODE)
if (Vulkan_VERSION VERSION_LESS 1.3.283)
message(FATAL_ERROR "Vulkan video encode requires 1.3.283, found ${Vulkan_VERSION}")
endif()
endif()
if (WIVRN_USE_X264 STREQUAL "AUTO")
pkg_check_modules(X264 IMPORTED_TARGET x264)
if (X264_FOUND)
set(WIVRN_USE_X264 ON)
else()
set(WIVRN_USE_X264 OFF)
endif()
elseif (WIVRN_USE_X264)
if (WIVRN_USE_X264)
pkg_check_modules(X264 REQUIRED IMPORTED_TARGET x264)
endif()
if (WIVRN_USE_SYSTEMD STREQUAL "AUTO")
pkg_check_modules(SYSTEMD IMPORTED_TARGET libsystemd)
if (SYSTEMD_FOUND)
set(WIVRN_USE_SYSTEMD ON)
else()
set(WIVRN_USE_SYSTEMD OFF)
endif()
elseif (WIVRN_USE_SYSTEMD)
pkg_check_modules(SYSTEMD REQUIRED IMPORTED_TARGET libsystemd)
endif()
if (WIVRN_USE_PIPEWIRE STREQUAL "AUTO")
pkg_check_modules(libpipewire IMPORTED_TARGET libpipewire-0.3)
if (libpipewire_FOUND)
set(WIVRN_USE_PIPEWIRE ON)
else()
set(WIVRN_USE_PIPEWIRE OFF)
endif()
elseif (WIVRN_USE_PIPEWIRE)
pkg_check_modules(libpipewire REQUIRED IMPORTED_TARGET libpipewire-0.3)
endif()
if (WIVRN_USE_PULSEAUDIO STREQUAL "AUTO")
pkg_check_modules(libpulse IMPORTED_TARGET libpulse)
if (libpulse_FOUND)
set(WIVRN_USE_PULSEAUDIO ON)
else()
set(WIVRN_USE_PULSEAUDIO OFF)
endif()
elseif (WIVRN_USE_PULSEAUDIO)
pkg_check_modules(libpulse REQUIRED IMPORTED_TARGET libpulse)
endif()
pkg_check_modules(AVAHI REQUIRED IMPORTED_TARGET avahi-client avahi-glib)
find_package(Eigen3 REQUIRED)
find_package(nlohmann_json REQUIRED)
@@ -182,9 +163,22 @@ if (WIVRN_BUILD_SERVER)
pkg_check_modules(libnotify REQUIRED IMPORTED_TARGET libnotify)
endif()
if (WIVRN_BUILD_DASHBOARD OR WIVRN_BUILD_SERVER)
pkg_check_modules(librsvg-2.0 REQUIRED IMPORTED_TARGET librsvg-2.0)
find_package(LibArchive REQUIRED)
find_package(PNG REQUIRED)
endif()
if (WIVRN_BUILD_DASHBOARD)
find_package(Qt6 REQUIRED COMPONENTS Core Quick Test Gui QuickControls2 Widgets Network)
if(Qt6_VERSION VERSION_GREATER_EQUAL 6.10.0)
# QtCoro needs this for Qt 6.10 and (currently) doesn't do this by itself
find_package(Qt6 REQUIRED COMPONENTS QmlPrivate)
endif()
# Prevent KDE cmake module from overwriting defaults
set(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT FALSE)
find_package(ECM 5.115 REQUIRED NO_MODULE)
list(APPEND CMAKE_MODULE_PATH "${ECM_MODULE_PATH}")
@@ -193,41 +187,42 @@ if (WIVRN_BUILD_DASHBOARD)
find_package(nlohmann_json REQUIRED)
find_package(QCoro6 REQUIRED COMPONENTS Core Network Qml)
qcoro_enable_coroutines()
if (WIVRN_CHECK_CAPSYSNICE)
pkg_check_modules(libcap REQUIRED IMPORTED_TARGET libcap)
endif()
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
endif()
if (WIVRN_BUILD_CLIENT OR WIVRN_BUILD_DASHBOARD)
find_program(RSVG_CONVERT rsvg-convert REQUIRED)
find_package(Gettext REQUIRED)
endif()
if (WIVRN_USE_PIPEWIRE AND (WIVRN_BUILD_SERVER OR (WIVRN_BUILD_CLIENT AND NOT ANDROID)))
pkg_check_modules(libpipewire REQUIRED IMPORTED_TARGET libpipewire-0.3)
endif()
if (WIVRN_BUILD_CLIENT)
if (WIVRN_USE_LIBKTX STREQUAL "AUTO")
if (ANDROID)
set(WIVRN_USE_LIBKTX ON)
else()
set(WIVRN_USE_LIBKTX OFF)
endif()
find_program(RSVG_CONVERT rsvg-convert REQUIRED)
find_program(KTX ktx REQUIRED)
if (WIVRN_COMPRESS_GLB)
find_program(GLTF_TRANSFORM gltf-transform REQUIRED)
endif()
if(NOT ANDROID)
find_package(CURL REQUIRED COMPONENTS HTTP HTTPS)
endif()
endif()
if (WIVRN_BUILD_CLIENT AND NOT ANDROID)
pkg_check_modules(LIBAV REQUIRED IMPORTED_TARGET libavcodec libavutil libswscale libavfilter)
if(NOT WIVRN_USE_V4L2)
pkg_check_modules(LIBAV_CLIENT REQUIRED IMPORTED_TARGET libavcodec libavutil libswscale)
endif()
find_package(Fontconfig REQUIRED)
if (WIVRN_USE_SYSTEM_OPENXR STREQUAL "AUTO")
find_package(OpenXR 1.1.48)
elseif(WIVRN_USE_SYSTEM_OPENXR STREQUAL "ON")
find_package(OpenXR 1.1.48 REQUIRED)
if (WIVRN_USE_SYSTEM_OPENXR)
find_package(OpenXR 1.1.59 REQUIRED)
endif()
if (WIVRN_USE_SYSTEM_LIBKTX)
find_package(Ktx REQUIRED)
endif()
endif()
if(ANDROID)
@@ -238,10 +233,8 @@ if(ANDROID)
endif()
if (WIVRN_BUILD_DISSECTOR)
if (WIVRN_USE_SYSTEM_OPENXR STREQUAL "AUTO")
find_package(OpenXR 1.0.34)
elseif(WIVRN_USE_SYSTEM_OPENXR STREQUAL "ON")
find_package(OpenXR 1.0.34 REQUIRED)
if (WIVRN_USE_SYSTEM_OPENXR)
find_package(OpenXR 1.1.53 REQUIRED)
endif()
find_package(Wireshark REQUIRED)
endif()
@@ -252,36 +245,42 @@ if (WIVRN_BUILD_WIVRNCTL)
endif()
# Common dependencies
FetchContent_Declare(boostpfr EXCLUDE_FROM_ALL SYSTEM URL https://github.com/boostorg/pfr/archive/refs/tags/2.2.0.tar.gz
URL_HASH SHA256=6f490ec1383de5855dcf801c23f0a967f888eb6e1440b6ca0bf36c12d4ae7ac7)
FetchContent_Declare(boost EXCLUDE_FROM_ALL SYSTEM URL https://github.com/boostorg/boost/releases/download/boost-1.84.0/boost-1.84.0.tar.xz
URL_HASH SHA256=2e64e5d79a738d0fa6fb546c6e5c2bd28f88d268a2a080546f74e5ff98f29d0e)
FetchContent_Declare(boost EXCLUDE_FROM_ALL SYSTEM URL https://github.com/boostorg/boost/releases/download/boost-1.89.0/boost-1.89.0-cmake.tar.xz
URL_HASH SHA256=67acec02d0d118b5de9eb441f5fb707b3a1cdd884be00ca24b9a73c995511f74)
# Client dependencies
FetchContent_Declare(simdjson EXCLUDE_FROM_ALL SYSTEM URL https://github.com/simdjson/simdjson/archive/refs/tags/v3.10.1.tar.gz
URL_HASH SHA256=1e8f881cb2c0f626c56cd3665832f1e97b9d4ffc648ad9e1067c134862bba060)
FetchContent_Declare(fastgltf EXCLUDE_FROM_ALL SYSTEM URL https://github.com/spnda/fastgltf/archive/refs/tags/v0.7.1.tar.gz
URL_HASH SHA256=44bcb025dd5cd480236a3bc7a3f8c9a708a801ed773b7859677440d22e0e1e7c)
FetchContent_Declare(glm EXCLUDE_FROM_ALL SYSTEM URL https://github.com/g-truc/glm/archive/refs/tags/1.0.1.tar.gz
URL_HASH SHA256=9f3174561fd26904b23f0db5e560971cbf9b3cbda0b280f04d5c379d03bf234c)
FetchContent_Declare(openxr_loader EXCLUDE_FROM_ALL SYSTEM URL https://github.com/KhronosGroup/OpenXR-SDK/archive/refs/tags/release-1.1.48.tar.gz
URL_HASH SHA256=c9372992dcdfac643e28796e41d4dbd36c4cdf0388d01fa89245628edae9d411)
FetchContent_Declare(spdlog EXCLUDE_FROM_ALL SYSTEM URL https://github.com/gabime/spdlog/archive/refs/tags/v1.14.1.tar.gz
URL_HASH SHA256=1586508029a7d0670dfcb2d97575dcdc242d3868a259742b69f100801ab4e16b)
FetchContent_Declare(simdjson EXCLUDE_FROM_ALL SYSTEM URL https://github.com/simdjson/simdjson/archive/refs/tags/v4.2.2.tar.gz
URL_HASH SHA256=3efae22cb41f83299fe0b2e8a187af543d3dda93abbb910586f897df670f9eaa)
FetchContent_Declare(fastgltf EXCLUDE_FROM_ALL SYSTEM URL https://github.com/spnda/fastgltf/archive/refs/tags/v0.9.0.tar.gz
URL_HASH SHA256=0bb564e127b14c22f062db50f89381dd2e0a20dbaf4987ca138a4ae8728712f9)
FetchContent_Declare(glm EXCLUDE_FROM_ALL SYSTEM URL https://github.com/g-truc/glm/releases/download/1.0.2/glm-1.0.2.zip
URL_HASH SHA256=77fff075c5ab0caf076fade41558c5458d9a242aba2b2076bb72008bdb51a35e)
FetchContent_Declare(openxr_loader EXCLUDE_FROM_ALL SYSTEM URL https://github.com/KhronosGroup/OpenXR-SDK/archive/refs/tags/release-1.1.59.tar.gz
URL_HASH SHA256=d45d12d71cbe381a6fc510ec95ec84a88fe30724674e63bb038dfc9a481d8885)
FetchContent_Declare(spdlog EXCLUDE_FROM_ALL SYSTEM URL https://github.com/gabime/spdlog/archive/refs/tags/v1.16.0.tar.gz
URL_HASH SHA256=8741753e488a78dd0d0024c980e1fb5b5c85888447e309d9cb9d949bdb52aa3e)
FetchContent_Declare(stb EXCLUDE_FROM_ALL SYSTEM URL https://github.com/nothings/stb/archive/013ac3beddff3dbffafd5177e7972067cd2b5083.zip
URL_HASH SHA256=b7f476902bbef1b30f8ecc2d9d95c459c32302c8b559d09b589b5955463b7af8)
FetchContent_Declare(libktx EXCLUDE_FROM_ALL SYSTEM
GIT_REPOSITORY https://github.com/KhronosGroup/KTX-Software
GIT_TAG 91ace88675ac59a97e55d0378a6602a9ae6b98bd)
FetchContent_Declare(implot EXCLUDE_FROM_ALL SYSTEM URL https://github.com/epezent/implot/archive/refs/tags/v0.16.tar.gz
URL_HASH SHA256=961df327d8a756304d1b0a67316eebdb1111d13d559f0d3415114ec0eb30abd1)
set(KTX_VERSION "4.4.2")
set(KTX_VERSION_FULL "v${KTX_VERSION}")
FetchContent_Declare(libktx EXCLUDE_FROM_ALL SYSTEM URL https://github.com/KhronosGroup/KTX-Software/archive/refs/tags/${KTX_VERSION_FULL}.tar.gz
URL_HASH SHA256=9412cb45045a503005acd47d98f9e8b47154634a50b4df21e17a1dfa8971d323
)
FetchContent_Declare(implot EXCLUDE_FROM_ALL SYSTEM URL https://github.com/epezent/implot/releases/download/v1.0/implot-v1.0.tar.gz
URL_HASH SHA256=20ca14d5a46f36a650746096c74eba8bea99c9432cd3c877343b96b17a6ae566)
file(GLOB IMGUI_PATCHES CONFIGURE_DEPENDS patches/imgui/*)
FetchContent_Declare(imgui EXCLUDE_FROM_ALL SYSTEM URL https://github.com/ocornut/imgui/archive/refs/tags/v1.91.3.tar.gz
URL_HASH SHA256=29949d7b300c30565fbcd66398100235b63aa373acfee0b76853a7aeacd1be28
FetchContent_Declare(imgui EXCLUDE_FROM_ALL SYSTEM URL https://github.com/ocornut/imgui/archive/refs/tags/v1.92.9.tar.gz
URL_HASH SHA256=af97ed649182c39314320514a672b82008ab462b9293fe23d37b30bfa5d05519
PATCH_COMMAND ${CMAKE_CURRENT_LIST_DIR}/patches/apply.sh ${IMGUI_PATCHES}
)
FetchContent_Declare(uni-algo EXCLUDE_FROM_ALL SYSTEM URL https://github.com/uni-algo/uni-algo/archive/v1.2.0.tar.gz
URL_HASH SHA256=f2a1539cd8635bc6088d05144a73ecfe7b4d74ee0361fabed6f87f9f19e74ca9)
FetchContent_Declare(entt EXCLUDE_FROM_ALL SYSTEM URL https://github.com/skypjack/entt/archive/refs/tags/v4.0.0.tar.gz
URL_HASH SHA256=32a2ff2c72cb047dfd57306006ef238820b70da7c6ce4e7e8a507ac63365212e)
FetchContent_Declare(curl EXCLUDE_FROM_ALL SYSTEM URL https://github.com/curl/curl/releases/download/curl-8_17_0/curl-8.17.0.tar.xz
URL_HASH SHA256=955f6e729ad6b3566260e8fef68620e76ba3c31acf0a18524416a185acf77992)
FetchContent_Declare(spirv-reflect EXCLUDE_FROM_ALL SYSTEM URL https://github.com/KhronosGroup/SPIRV-Reflect/archive/refs/tags/vulkan-sdk-1.4.328.1.tar.gz
URL_HASH SHA256=77f4b5b5630d960d7c17e39ddd5bf2e7dd62e6d8da24259ed14ca5b59783ea35)
file(GLOB MONADO_PATCHES CONFIGURE_DEPENDS patches/monado/*)
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS monado-rev)
@@ -295,29 +294,44 @@ FetchContent_Declare(monado
EXCLUDE_FROM_ALL
)
add_custom_target(wivrn-version ALL
COMMAND ${CMAKE_COMMAND}
-D GIT_EXECUTABLE=${GIT_EXECUTABLE}
-D INPUT_FILE=${CMAKE_CURRENT_SOURCE_DIR}/common/version.cpp.in
-D OUTPUT_FILE=${CMAKE_BINARY_DIR}/version.cpp
-D INPUT_FILE_1=${CMAKE_CURRENT_SOURCE_DIR}/server/u_git_tag.cpp.in
-D OUTPUT_FILE_1=${CMAKE_BINARY_DIR}/u_git_tag.cpp
-D GIT_TAG="${GIT_TAG}"
-D GIT_DESC="${GIT_DESC}"
-D GIT_COMMIT="${GIT_COMMIT}"
-P ${CMAKE_SOURCE_DIR}/cmake/GitVersion.cmake
BYPRODUCTS ${CMAKE_BINARY_DIR}/version.cpp ${CMAKE_BINARY_DIR}/u_git_tag.cpp
SOURCES common/version.cpp.in server/u_git_tag.cpp.in
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
add_subdirectory(external)
add_subdirectory(common)
if (NEED_COMMON)
add_subdirectory(common)
endif()
if (WIVRN_BUILD_CLIENT)
add_subdirectory(client)
endif()
if (WIVRN_BUILD_SERVER OR WIVRN_BUILD_SERVER_LIBRARY)
find_package(Python3 REQUIRED Interpreter)
add_subdirectory(server)
if (WIVRN_BUILD_SERVER)
message("Selected encoders:")
message("\tNVENC : ${WIVRN_USE_NVENC}")
message("\tVAAPI : ${WIVRN_USE_VAAPI}")
message("\tVulkan: ${WIVRN_USE_VULKAN_ENCODE}")
message("\tx264 : ${WIVRN_USE_X264}")
message("")
message("Audio backends:")
message("\tPipewire : ${WIVRN_USE_PIPEWIRE}")
message("\tPulseaudio: ${WIVRN_USE_PULSEAUDIO}")
message("")
message("Optional features:")
message("\tsystemd: ${WIVRN_USE_SYSTEMD}")
message(STATUS "Selected encoders:")
message(STATUS "\tNVENC : ${WIVRN_USE_NVENC}")
message(STATUS "\tVAAPI : ${WIVRN_USE_VAAPI}")
message(STATUS "\tVulkan: ${WIVRN_USE_VULKAN_ENCODE}")
message(STATUS "\tx264 : ${WIVRN_USE_X264}")
message(STATUS "")
message(STATUS "Audio backends:")
message(STATUS "\tPipewire : ${WIVRN_USE_PIPEWIRE}")
endif()
endif()
@@ -332,11 +346,12 @@ foreach(TARGET_NAME wivrn wivrn-server wivrn-dashboard wivrn-common wivrn-dissec
if(TARGET ${TARGET_NAME})
target_compile_options(${TARGET_NAME} PRIVATE
-fdiagnostics-color -Wall -Wextra -pedantic
-ffast-math
-fno-finite-math-only
-Wundef
-Wno-missing-field-initializers
-Wno-unused-parameter
-Wno-comment
-Wno-unused-variable
-Wno-sign-compare
$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wno-volatile -Wno-array-bounds>
$<$<COMPILE_LANG_AND_ID:CXX,Clang>:-Wno-deprecated-volatile -Wno-unneeded-internal-declaration -Wno-c99-extensions -Wno-unused-private-field>
@@ -346,5 +361,10 @@ foreach(TARGET_NAME wivrn wivrn-server wivrn-dashboard wivrn-common wivrn-dissec
target_compile_options(${TARGET_NAME} PRIVATE -Werror)
endif()
if (WIVRN_ADDRESS_SANITIZER AND NOT ${TARGET_NAME} STREQUAL wivrn-dissector)
target_compile_options(${TARGET_NAME} PRIVATE -fsanitize=address -fno-omit-frame-pointer)
target_link_options(${TARGET_NAME} PRIVATE -fsanitize=address)
endif()
endif()
endforeach()
+52 -1
View File
@@ -9,6 +9,7 @@
{
"name": "base",
"hidden": true,
"generator": "Ninja",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"CMAKE_INTERPROCEDURAL_OPTIMIZATION": "ON",
@@ -25,7 +26,6 @@
"WIVRN_USE_NVENC": "ON",
"WIVRN_USE_SYSTEMD": "ON",
"WIVRN_USE_SYSTEM_BOOST": "ON",
"WIVRN_USE_PULSEAUDIO": "ON",
"WIVRN_USE_PIPEWIRE": "ON",
"WIVRN_WERROR": "ON"
}
@@ -65,6 +65,24 @@
"WIVRN_BUILD_WIVRNCTL": "ON"
}
},
{
"name": "server-tracing",
"displayName": "Server with Perfetto tracing",
"inherits": "server",
"binaryDir": "${sourceDir}/build-server-tracing",
"cacheVariables": {
"WIVRN_USE_PERFETTO": "ON"
}
},
{
"name": "server-tracing-monado",
"displayName": "Server with Perfetto tracing (incl. Monado)",
"inherits": "server-tracing",
"binaryDir": "${sourceDir}/build-server-tracing-monado",
"cacheVariables": {
"WIVRN_TRACE_MONADO": "ON"
}
},
{
"name": "dashboard",
"displayName": "Dashboard only",
@@ -90,6 +108,7 @@
"inherits": "everything",
"binaryDir": "${sourceDir}/build-no-systemd",
"cacheVariables": {
"WIVRN_BUILD_WIVRNCTL": "OFF",
"WIVRN_USE_SYSTEMD": "OFF"
}
},
@@ -108,9 +127,19 @@
"inherits": "server",
"binaryDir": "${sourceDir}/build-server-no-systemd",
"cacheVariables": {
"WIVRN_BUILD_WIVRNCTL": "OFF",
"WIVRN_USE_SYSTEMD": "OFF"
}
},
{
"name": "client-no-system-boost",
"displayName": "Client only (no system Boost)",
"inherits": "client",
"binaryDir": "${sourceDir}/build-client-no-system-boost",
"cacheVariables": {
"WIVRN_USE_SYSTEM_BOOST": "OFF"
}
},
{
"name": "server-no-system-boost",
"displayName": "Server only (no system Boost)",
@@ -128,6 +157,28 @@
"cacheVariables": {
"WIVRN_USE_SYSTEM_BOOST": "OFF"
}
},
{
"name": "frame",
"generator": "Ninja",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"CMAKE_INTERPROCEDURAL_OPTIMIZATION": "ON",
"CMAKE_BUILD_TYPE": "Release",
"WIVRN_BUILD_CLIENT": "ON",
"WIVRN_BUILD_SERVER": "OFF",
"WIVRN_BUILD_SERVER_LIBRARY": "OFF",
"WIVRN_BUILD_DASHBOARD": "OFF",
"WIVRN_BUILD_DISSECTOR": "OFF",
"WIVRN_BUILD_WIVRNCTL": "OFF",
"WIVRN_USE_PIPEWIRE": "ON",
"WIVRN_USE_V4L2": "ON",
"WIVRN_USE_SYSTEM_BOOST": "OFF",
"WIVRN_USE_SYSTEM_LIBKTX": "OFF",
"WIVRN_USE_SYSTEM_OPENXR": "OFF",
"WIVRN_COMPRESS_GLB": "ON",
"WIVRN_WERROR": "ON"
}
}
],
"buildPresets": [
+20
View File
@@ -0,0 +1,20 @@
# Contributing to WiVRn
WiVRn is developed by volunteers and published under GPL-3 license.
Contributions are welcome, there are few rules that should be followed:
## Setup your development environment
Instructions on how to build the project are in [docs/building.md], for translations please follow [docs/translating.md].
## Acceptable contributions
The project is developed by humans, machine generated code will not be accepted unless it is for trivial changes.
For changes to be accepted, we have to ensure that we can maintain them in the future.
This means that we will be very careful in case of big pull requests. Changes that rely on specification violation or that violate specifications (especially OpenXR and Vulkan) will not be accepted.
## Conventions
The code does not have strict conventions, there is a clang-format file for formatting. Just try to write code that is correct, concise and easy to understand. Details can be discussed in code reviews.
+121 -54
View File
@@ -1,33 +1,71 @@
# WiVRn
<h1 align="center"> WiVRn </h1>
<div align="center">
[![License: GPL v3](images/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) ![CI](https://github.com/WiVRn/WiVRn/workflows/Build/badge.svg) ![Format](https://github.com/WiVRn/WiVRn/workflows/Format/badge.svg)
</div>
<p align="center"><img src="images/wivrn.svg" width="180"></p>
<h3 align="center">Fully FOSS PCVR streamer</h3>
WiVRn wirelessly connects a standalone VR headset to a Linux computer. You can then play PCVR games on the headset while processing is done on the computer.
# About
It supports a wide range of headsets such as Quest 1 / 2 / Pro / 3 / 3S, Pico Neo 4, HTC Vive Focus 3, HTC Vive XR elite and most other Android based headsets.
WiVRn is an application that wirelessly streams a virtual reality game to a standalone VR headset from a <b>Linux</b> computer.
WiVRn support a wide range of VR devices:
| Headset | Supported | Notes |
|:--------:|:--------:|:--------:|
| Quest 1 | ✓ | |
| Quest 2 | ✓ | |
| Quest 3 | ✓ | |
| Quest 3s | ✓ | |
| Quest Pro | ✓ | |
| Pico Neo 3 | ✓ | |
| Pico 4 | ✓ | |
| HTC Vive Focus 3 | ✓ | Laggy |
| HTC Vive XR Elite | ✓ | Laggy |
| Samsung Galaxy XR | ✓ | |
| Other Android VR | ? | Cannot know |
| Play for Dream | ✖ | https://github.com/WiVRn/WiVRn/issues/465 |
| Non-Android VR | ✖ | Not Android |
| Non-VR Android | ✖ | VR required |
<sup>A Linux client does exist, only for debugging. It has no audio or hardware decoding.</sup>
# Getting started
## Server and dashboard
## PC Server/Dashboard
We recommend using the flatpak package from Flathub:
We recommend using native packages if available for your distribution:
- [Arch User Repository](https://aur.archlinux.org/packages/wivrn-dashboard)
- [Fedora](https://packages.fedoraproject.org/pkgs/wivrn/wivrn/)
- [Gentoo Guru](https://gitweb.gentoo.org/repo/proj/guru.git/tree/media-libs/wivrn)
- [NixOS](https://search.nixos.org/packages?show=wivrn)
- [Ubuntu PPA](https://launchpad.net/~lvra/+archive/ubuntu/wivrn)
For OpenVR and Steam compatibility, you also need a compatibility library such as [xrizer](https://github.com/Supreeeme/xrizer/) or [OpenComposite](https://gitlab.com/znixian/OpenOVR/).
A Flatpak is available on Flathub for all distributions:
[![Flathub](https://flathub.org/api/badge)](https://flathub.org/apps/io.github.wivrn.wivrn)
Alternatively, packages are available:
- [AUR for Arch](https://aur.archlinux.org/packages/wivrn-dashboard)
- [Fedora](https://packages.fedoraproject.org/pkgs/wivrn/wivrn/)
- [Guru for Gentoo](https://gitweb.gentoo.org/repo/proj/guru.git/tree/media-libs/wivrn).
The Flatpak contains both xrizer and OpenComposite.
Note that due to Flatpak sandboxing, some features such as support for SteamVR tracked (Lighthouse) devices, or virtual gamepad/keyboard/input devices forwarded from the headset, may not be available.
## Headset app
## Headset Client/App
Follow the wizard in the dashboard to install the client app on the headset: it will either lead you to the [Meta Store](https://www.meta.com/experiences/7959676140827574/) or download the correct APK.
Follow the wizard in the PC dashboard to install the client on your VR headset.
⚠️ You will need to have a compatible version: if the headset fails to connect to your computer, see [troubleshooting](#troubleshooting).
It should either lead you to the [Meta Store](https://www.meta.com/experiences/7959676140827574/) (for Meta Quest headsets) or to download the correct APK (for other headsets).
> [!WARNING]
> The VR client and PC server must use the same WiVRn protocol. For development builds, compare the full version string, including the Git commit suffix (for example, `26.8-42-g1234afe`); the release prefix alone (for example, `26.8`) does not identify the build.
> [!TIP]
> If the headset fails to connect to the computer, see [troubleshooting](#troubleshooting).
@@ -41,52 +79,57 @@ Avahi must be running:
systemctl enable --now avahi-daemon
```
If a firewall is installed, open port 5353/UDP for avahi.
Open ports 9757/UDP+TCP for WiVRn itself.
On SteamOS, the Avahi configuration needs to be modified to allow user services such as WiVRn to publish services on the network; see https://github.com/WiVRn/WiVRn/issues/1001#issuecomment-4940906113 for instructions on how to do so.
### Running
- On your computer, run "WiVRn server" application, or `wivrn-dashboard` from the command line, it will show the connection wizard the first time you launch it.
- On your headset, run WiVRn from the App Library. If you are using a Quest and you have installed it from an APK instead of the Meta Store, it will be in the "unknown sources" section.
- You should now see your computer in the list: click connect, the screen will show "Connection ready. Start a VR application on **your computer's name**".
- If a firewall is installed, open port 5353/UDP for Avahi and ports 9757/UDP+TCP for WiVRn.
- For example, if using UFW run `ufw allow 5353/udp` and `ufw allow 9757`.
You can now start an OpenXR application on your computer. For Steam games, you will also need to set the launch options to be able to use WiVRn:
- Right-click on the game you want to play in VR in Steam and click "Properties".
- In the "General" tab, set the launch options to the value given in the dashboard.
### Start the PC server process
The graphical frontend is listed as "WiVRn server" in the application list, and is `wivrn-dashboard` on command line. On first start, a wizard will guide you through the initial steps.
You can set an application to be started automatically when you connect your headset in the dashboard settings or [manually](docs/configuration.md#application)
The actual server for headless usage is `wivrn-server`. When installed through your distribution's package manager, a systemd user service named `wivrn` is also installed, which can be enabled to automatically start on login with `systemctl --user enable --now wivrn`.
### OpenVR and Steam games
For Steam games, depending on the installation method, you may need to set launch options in the Steam properties for each game you want to run. Either the dashboard or command line output will display the launch command if it is required.
The flatpak also includes [OpenComposite](https://gitlab.com/znixian/OpenOVR/), used to translate the OpenVR API used by SteamVR to OpenXR used by WiVRn, see [SteamVR](docs/steamvr.md) for details.
### Start the headset application
On the headset, when installed from the store, simply start `WiVRn`. If you installed the app via the dashboard, or manually via `adb`, it will be in an "unknown sources" section.
If using Wine/Proton, it will probe for OpenVR at startup, so even for OpenXR applications, OpenComposite is required.
On first start, it will ask if you want to enable some features such as microphone, hand tracking, eye tracking, etc., as they will require permissions to be granted. It is possible to grant those later from the Settings tab.
When you start the server through flatpak, it will automatically configure the current OpenVR to use OpenComposite.
It is highly recommended to use default settings and only tweak them if you experience issues.
### Steam Flatpak
### Connect to the server
The headset application will start on a server list. Your computer should be visible and have a connect button. Simply click it to start streaming.
When the headset is connected, wivrn-server sets the OpenXR and OpenVR configuration to use WiVRn. Thus, applications will only be able to run in VR once the headset connection is established. The configuration is reverted once the connection ends and all running VR applications are closed.
The headset connection also triggers the creation of a virtual speaker and, if enabled in the headset app settings, a microphone. You will have to set them as the default output and input devices in your system audio configuration. This setting persists to future sessions until you change the defaults to other devices.
### Start an application
When the headset is connected and no XR application is running, it will show an application launcher. Applications in that list are sourced from:
- Steam games that are flagged as VR. Steam may need to be restarted for the list to be updated when new games are installed.
- .desktop files that contain `X-WiVRn-VR` in the `Categories` section. Files are searched in [standard locations](https://specifications.freedesktop.org/desktop-entry/latest/file-naming.html#desktop-file-id) which usually include `~/.local/share/applications` and `/usr/share/applications/`.
You can set an application to be started automatically when your headset is connected, in the dashboard settings or [manually](docs/configuration.md#application).
## Steam Flatpak
Flatpak applications are only able to access the Flatpak version of WiVRn.
If you're using the Steam Flatpak, you'll need to grant read only access to the following paths:
```bash
flatpak override --user \
flatpak override \
--filesystem=xdg-run/wivrn:ro \
--filesystem=xdg-data/flatpak/app/io.github.wivrn.wivrn:ro \
--filesystem=/var/lib/flatpak/app/io.github.wivrn.wivrn:ro \
--filesystem=xdg-config/openxr:ro \
--filesystem=xdg-config/openvr:ro \
com.valvesoftware.Steam
```
Then create a symlink for the OpenXR configuration file (the directory `~/.var/app/com.valvesoftware.Steam/.config/openxr` will need to be created if it doesn't already exist):
```bash
ln -s ~/.config/openxr/1 ~/.var/app/com.valvesoftware.Steam/.config/openxr/1
```
### Audio
When the headset is connected, WiVRn will create a virtual output device named WiVRn. It is not selected as default and you should either assign the application to the device when it is running, or mark it as default. To do so you can use `pavucontrol` or your desktop environment's configuration panel. Please note that in `pavucontrol` it will appear as a virtual device.
For microphone, you first have to enable it on the settings tabs on the headset (and give permission when prompted). It will then appear as a virtual input device named WiVRn(microphone) and also needs to be assigned like for output device.
When using a user installation of flatpak Steam, use `override --user` instead of `override`.
The same overrides should work for other VR applications distributed as Flatpaks.
# Building
@@ -94,24 +137,22 @@ See [building](docs/building.md) for building the [dashboard](docs/building.md#d
# Configuration
Configuration can be done from the dashboard.
See [configuration](docs/configuration.md) for editing the configuration manually.
Most settings are controlled through the headset app, while the server has configuration for items that are specific to the server. Use the dashboard to edit the latter, or see [configuration](docs/configuration.md) for editing it manually.
# Troubleshooting
## My computer is not seen by the headset
<details><summary>My computer is not seen by the headset</summary>
If the server list is empty in the headset app:
- Make sure your computer is connected on the same network as your headset
- Check that avahi is running with `systemctl status avahi-daemon`, if it is not, enable it with `systemctl enable --now avahi-daemon`
- If you have a firewall, check that port 5353 (UDP) is open
- If you have a firewall, check that port 5353 (UDP) is open</details>
## My headset does not connect to my computer
<details><summary>My headset does not connect to my computer</summary>
- If you have a firewall, check that port 9757 (UDP and TCP) is open
- The server and client must be compatible:
- If the app reports an incompatible server protocol, compare the full version shown in the headset app's About screen with the server's startup log. Package metadata may show only the release prefix. For development builds, use client and server built from the same source revision. If multiple builds are installed, make sure you start the intended server.</details>
## How do I use a wired connection?
<details><summary>How do I use a wired connection manually?</summary>
- Make sure the WiVRn Server is installed and running on your computer
- Make sure you have the WiVRn app installed on your headset
@@ -125,13 +166,38 @@ If the server list is empty in the headset app:
- `org.meumeu.wivrn.github.nighly` for Github nightlies (wirvn-apk [repository](https://github.com/WiVRn/WiVRn-APK/releases))
- `org.meumeu.wivrn.github.testing` for Github CI builds
- `org.meumeu.wivrn.local` for developer builds
- You can now continue the pairing process as documented in the running section.
- You can now continue the pairing process as documented in the running section.</details>
## How do I see server logs when using the dashboard?
<details><summary>How do I see server logs when using the dashboard?</summary>
- Click **Troubleshoot > Open server logs**
- Or, navigate to `${XDG_STATE_HOME}/wivrn/wivrn-dashboard`
- In other words, on common setups, the dashboard writes logs to `~/.local/state/wivrn/wivrn-dashboard`
- For WiVRn Flatpak, the dashboard writes logs to `~/.var/app/io.github.wivrn.wivrn/.local/state/wivrn/wivrn-dashboard`</details>
<details><summary>My NVIDIA GPU P-State is limited to P2 instead of reaching the highest P0 while using the NVIDIA NVENC encoder</summary>
- See [nvenc](docs/nvenc.md) for troubleshooting.</details>
<details><summary>I have high motion latency, black borders following my view, hear corrupted audio or see a corrupted, pixelated image</summary>
- When connecting through USB, make sure the headset isn't connected through WiFi (switch off WiFi)
- Reset the settings using the button at the bottom of the settings tab
- Try switching to software encoding
- Decrease the bitrate
- Decrease the resolution in the WiVRn app
- Connect through USB or use a better WiFi router.
Note: WiVRn isn't properly optimized for NVIDIA GPUs due to the lack of developers with NVIDIA hardware. Motion latency may be significantly worse at rendering resolutions higher than default.</details>
# Community Support
We are available on either **Discord** or **Matrix space**:
[![LVRA Discord](https://img.shields.io/discord/1065291958328758352?style=for-the-badge&logo=discord)](https://discord.gg/EHAYe3tTYa) [![LVRA Matrix](https://img.shields.io/matrix/linux-vr-adventures:matrix.org?logo=matrix&style=for-the-badge)](https://matrix.to/#/#linux-vr-adventures:matrix.org)
Please use the `wivrn` chat room for questions or issues specific to WiVRn.
```
journalctl -f --no-hostname -u io.github.wivrn.wivrn.desktop
```
# Contributing
@@ -153,8 +219,9 @@ WiVRn uses the following software:
- [FreeType](https://freetype.org/)
- [glm](http://glm.g-truc.net/)
- [HarfBuzz](https://harfbuzz.github.io/)
- [librsvg](https://wiki.gnome.org/Projects/LibRsvg)
- [Monado](https://monado.freedesktop.org/)
- [nvenc](https://developer.nvidia.com/nvidia-video-codec-sdk) optional, for hardware encoding on Nvidia
- [nvenc](https://developer.nvidia.com/nvidia-video-codec-sdk) optional, for hardware encoding on NVIDIA
- [qCoro](https://qcoro.dev/)
- [Qt 6](https://www.qt.io/) optional, for the dashboard
- [spdlog](https://github.com/gabime/spdlog)

Before

Width:  |  Height:  |  Size: 1023 KiB

After

Width:  |  Height:  |  Size: 1023 KiB

+47
View File
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg
fill="#000000"
height="800px"
width="800px"
version="1.1"
id="Layer_1"
viewBox="0 0 512 512"
xml:space="preserve"
sodipodi:docname="default-environment.svg"
inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs2" /><sodipodi:namedview
id="namedview2"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="2.235"
inkscape:cx="400"
inkscape:cy="400"
inkscape:window-width="3840"
inkscape:window-height="2058"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g1" />
<g
id="g2">
<g
id="g1">
<path
d="M0,0v512h512V0H0z M460.075,30.417l-43.548,43.547L372.98,30.417H460.075z M481.583,51.925v117.512L336.264,314.755 l-58.756-58.756L481.583,51.925z M395.02,95.472L95.472,395.019l-58.756-58.756L336.264,36.717L395.02,95.472z M299.547,30.417 L175.736,154.228L116.98,95.472l65.055-65.055H299.547z M30.417,30.417H139.02L30.417,139.02V30.417z M30.417,182.036 l65.055-65.055l58.756,58.756L30.417,299.546V182.036z M30.417,372.979l43.547,43.547l-43.547,43.547V372.979z M51.925,481.583 L256,277.508l58.756,58.756L169.437,481.583H51.925z M212.453,481.583l269.13-269.129v117.51L329.964,481.583H212.453z M372.981,481.583l43.546-43.547l43.547,43.547H372.981z M481.583,460.075l-43.547-43.547l43.547-43.547V460.075z"
id="path1"
inkscape:label="path1"
style="fill:#ffffff;fill-opacity:1" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 930 B

Binary file not shown.
@@ -70,9 +70,6 @@
"generator": "Aspose.3D 24.1.0",
"version": "2.0"
},
"extensionsUsed": [
"KHR_texture_basisu"
],
"buffers": [
{
"uri": "data:application/octet-stream;base64,AAABAAIAAwAEAAUAAAAAAAAAIMEAAAAAAAAgwQAAAAAAAIA/AAAAACUAgD8AAAAAAAAgwQAAAAAAACBBAACgQAAAgD8AAAAAJQCAPwAAAAAAACBBAAAAAAAAIMEAAAAAAACAwAAAAAAlAIA/AAAAAAAAIEEAAAAAAAAgQQAAoEAAAIDAAAAAACUAgD8AAAAAAAAgQQAAAAAAACDBAAAAAAAAgMAAAAAAJQCAPwAAAAAAACDBAAAAAAAAIEEAAKBAAACAPwAAAAAlAIA/AAAAAAAAAAA=",
@@ -82,9 +79,6 @@
"images": [
{
"uri": "WoodFloor051_1K-JPG_Color.jpg"
},
{
"uri": "WoodFloor051_1K-JPG_Color.ktx2"
}
],
"bufferViews": [
@@ -129,12 +123,7 @@
"textures": [
{
"sampler": 0,
"source": 0,
"extensions": {
"KHR_texture_basisu": {
"source": 1
}
}
"source": 0
}
],
"materials": [
+39
View File
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg
viewBox="0 0 576 512"
version="1.1"
id="svg1"
sodipodi:docname="passthrough.svg"
inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="3.4921875"
inkscape:cx="288.07159"
inkscape:cy="256"
inkscape:window-width="3840"
inkscape:window-height="2058"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg1" />
<!--!Font Awesome Free v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.-->
<path
d="M96 64c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L96 64zM464 336l73.5 58.8c4.2 3.4 9.4 5.2 14.8 5.2 13.1 0 23.7-10.6 23.7-23.7l0-240.6c0-13.1-10.6-23.7-23.7-23.7-5.4 0-10.6 1.8-14.8 5.2L464 176 464 336z"
id="path1"
style="fill:#ffffff;fill-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,168 +0,0 @@
{
"profileId": "generic-trigger-squeeze",
"fallbackProfileIds": [],
"layouts": {
"left": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "generic-trigger-squeeze-left",
"assetPath": "left.glb"
},
"right": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "generic-trigger-squeeze-right",
"assetPath": "right.glb"
},
"none": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
},
"xr_standard_squeeze_pressed_mirror": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_mirror_value",
"minNodeName": "xr_standard_squeeze_pressed_mirror_min",
"maxNodeName": "xr_standard_squeeze_pressed_mirror_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "generic-trigger-squeeze-none",
"assetPath": "none.glb"
}
}
}
Binary file not shown.
Binary file not shown.
@@ -1,286 +0,0 @@
{
"profileId": "htc-vive-focus-3",
"fallbackProfileIds": [
"generic-trigger-squeeze-thumbstick"
],
"layouts": {
"left": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
},
"xr-standard-thumbstick": {
"type": "thumbstick",
"gamepadIndices": {
"button": 3,
"xAxis": 2,
"yAxis": 3
},
"rootNodeName": "xr_standard_thumbstick",
"visualResponses": {
"xr_standard_thumbstick_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_pressed_value",
"minNodeName": "xr_standard_thumbstick_pressed_min",
"maxNodeName": "xr_standard_thumbstick_pressed_max"
},
"xr_standard_thumbstick_xaxis_pressed": {
"componentProperty": "xAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
},
"xr_standard_thumbstick_yaxis_pressed": {
"componentProperty": "yAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
}
}
},
"x-button": {
"type": "button",
"gamepadIndices": {
"button": 4
},
"rootNodeName": "x_button",
"visualResponses": {
"x_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "x_button_pressed_value",
"minNodeName": "x_button_pressed_min",
"maxNodeName": "x_button_pressed_max"
}
}
},
"y-button": {
"type": "button",
"gamepadIndices": {
"button": 5
},
"rootNodeName": "y_button",
"visualResponses": {
"y_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "y_button_pressed_value",
"minNodeName": "y_button_pressed_min",
"maxNodeName": "y_button_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "htc-vive-focus-3-left",
"assetPath": "left.glb"
},
"right": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
},
"xr-standard-thumbstick": {
"type": "thumbstick",
"gamepadIndices": {
"button": 3,
"xAxis": 2,
"yAxis": 3
},
"rootNodeName": "xr_standard_thumbstick",
"visualResponses": {
"xr_standard_thumbstick_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_pressed_value",
"minNodeName": "xr_standard_thumbstick_pressed_min",
"maxNodeName": "xr_standard_thumbstick_pressed_max"
},
"xr_standard_thumbstick_xaxis_pressed": {
"componentProperty": "xAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
},
"xr_standard_thumbstick_yaxis_pressed": {
"componentProperty": "yAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
}
}
},
"a-button": {
"type": "button",
"gamepadIndices": {
"button": 4
},
"rootNodeName": "a_button",
"visualResponses": {
"a_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "a_button_pressed_value",
"minNodeName": "a_button_pressed_min",
"maxNodeName": "a_button_pressed_max"
}
}
},
"b-button": {
"type": "button",
"gamepadIndices": {
"button": 5
},
"rootNodeName": "b_button",
"visualResponses": {
"b_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "b_button_pressed_value",
"minNodeName": "b_button_pressed_min",
"maxNodeName": "b_button_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "htc-vive-focus-3-right",
"assetPath": "right.glb"
}
}
}
Binary file not shown.
Binary file not shown.
@@ -1,330 +0,0 @@
{
"profileId": "meta-quest-touch-plus",
"fallbackProfileIds": [
"oculus-touch-v3",
"oculus-touch",
"generic-trigger-squeeze-thumbstick"
],
"layouts": {
"left": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
},
"xr-standard-thumbstick": {
"type": "thumbstick",
"gamepadIndices": {
"button": 3,
"xAxis": 2,
"yAxis": 3
},
"rootNodeName": "xr_standard_thumbstick",
"visualResponses": {
"xr_standard_thumbstick_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_pressed_value",
"minNodeName": "xr_standard_thumbstick_pressed_min",
"maxNodeName": "xr_standard_thumbstick_pressed_max"
},
"xr_standard_thumbstick_xaxis_pressed": {
"componentProperty": "xAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
},
"xr_standard_thumbstick_yaxis_pressed": {
"componentProperty": "yAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
}
}
},
"x-button": {
"type": "button",
"gamepadIndices": {
"button": 4
},
"rootNodeName": "x_button",
"visualResponses": {
"x_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "x_button_pressed_value",
"minNodeName": "x_button_pressed_min",
"maxNodeName": "x_button_pressed_max"
}
}
},
"y-button": {
"type": "button",
"gamepadIndices": {
"button": 5
},
"rootNodeName": "y_button",
"visualResponses": {
"y_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "y_button_pressed_value",
"minNodeName": "y_button_pressed_min",
"maxNodeName": "y_button_pressed_max"
}
}
},
"thumbrest": {
"type": "button",
"gamepadIndices": {
"button": 6
},
"rootNodeName": "thumbrest",
"visualResponses": {
"thumbrest_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "thumbrest_pressed_value",
"minNodeName": "thumbrest_pressed_min",
"maxNodeName": "thumbrest_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "meta-quest-touch-plus-left",
"assetPath": "left.glb"
},
"right": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
},
"xr-standard-thumbstick": {
"type": "thumbstick",
"gamepadIndices": {
"button": 3,
"xAxis": 2,
"yAxis": 3
},
"rootNodeName": "xr_standard_thumbstick",
"visualResponses": {
"xr_standard_thumbstick_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_pressed_value",
"minNodeName": "xr_standard_thumbstick_pressed_min",
"maxNodeName": "xr_standard_thumbstick_pressed_max"
},
"xr_standard_thumbstick_xaxis_pressed": {
"componentProperty": "xAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
},
"xr_standard_thumbstick_yaxis_pressed": {
"componentProperty": "yAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
}
}
},
"a-button": {
"type": "button",
"gamepadIndices": {
"button": 4
},
"rootNodeName": "a_button",
"visualResponses": {
"a_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "a_button_pressed_value",
"minNodeName": "a_button_pressed_min",
"maxNodeName": "a_button_pressed_max"
}
}
},
"b-button": {
"type": "button",
"gamepadIndices": {
"button": 5
},
"rootNodeName": "b_button",
"visualResponses": {
"b_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "b_button_pressed_value",
"minNodeName": "b_button_pressed_min",
"maxNodeName": "b_button_pressed_max"
}
}
},
"thumbrest": {
"type": "button",
"gamepadIndices": {
"button": 6
},
"rootNodeName": "thumbrest",
"visualResponses": {
"thumbrest_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "thumbrest_pressed_value",
"minNodeName": "thumbrest_pressed_min",
"maxNodeName": "thumbrest_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "meta-quest-touch-plus-right",
"assetPath": "right.glb"
}
}
}
Binary file not shown.
Binary file not shown.
@@ -1,330 +0,0 @@
{
"profileId": "meta-quest-touch-pro",
"fallbackProfileIds": [
"oculus-touch-v2",
"oculus-touch",
"generic-trigger-squeeze-thumbstick"
],
"layouts": {
"left": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
},
"xr-standard-thumbstick": {
"type": "thumbstick",
"gamepadIndices": {
"button": 3,
"xAxis": 2,
"yAxis": 3
},
"rootNodeName": "xr_standard_thumbstick",
"visualResponses": {
"xr_standard_thumbstick_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_pressed_value",
"minNodeName": "xr_standard_thumbstick_pressed_min",
"maxNodeName": "xr_standard_thumbstick_pressed_max"
},
"xr_standard_thumbstick_xaxis_pressed": {
"componentProperty": "xAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
},
"xr_standard_thumbstick_yaxis_pressed": {
"componentProperty": "yAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
}
}
},
"x-button": {
"type": "button",
"gamepadIndices": {
"button": 4
},
"rootNodeName": "x_button",
"visualResponses": {
"x_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "x_button_pressed_value",
"minNodeName": "x_button_pressed_min",
"maxNodeName": "x_button_pressed_max"
}
}
},
"y-button": {
"type": "button",
"gamepadIndices": {
"button": 5
},
"rootNodeName": "y_button",
"visualResponses": {
"y_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "y_button_pressed_value",
"minNodeName": "y_button_pressed_min",
"maxNodeName": "y_button_pressed_max"
}
}
},
"thumbrest": {
"type": "button",
"gamepadIndices": {
"button": 6
},
"rootNodeName": "thumbrest",
"visualResponses": {
"thumbrest_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "thumbrest_pressed_value",
"minNodeName": "thumbrest_pressed_min",
"maxNodeName": "thumbrest_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "meta-quest-touch-pro-left",
"assetPath": "left.glb"
},
"right": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
},
"xr-standard-thumbstick": {
"type": "thumbstick",
"gamepadIndices": {
"button": 3,
"xAxis": 2,
"yAxis": 3
},
"rootNodeName": "xr_standard_thumbstick",
"visualResponses": {
"xr_standard_thumbstick_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_pressed_value",
"minNodeName": "xr_standard_thumbstick_pressed_min",
"maxNodeName": "xr_standard_thumbstick_pressed_max"
},
"xr_standard_thumbstick_xaxis_pressed": {
"componentProperty": "xAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
},
"xr_standard_thumbstick_yaxis_pressed": {
"componentProperty": "yAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
}
}
},
"a-button": {
"type": "button",
"gamepadIndices": {
"button": 4
},
"rootNodeName": "a_button",
"visualResponses": {
"a_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "a_button_pressed_value",
"minNodeName": "a_button_pressed_min",
"maxNodeName": "a_button_pressed_max"
}
}
},
"b-button": {
"type": "button",
"gamepadIndices": {
"button": 5
},
"rootNodeName": "b_button",
"visualResponses": {
"b_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "b_button_pressed_value",
"minNodeName": "b_button_pressed_min",
"maxNodeName": "b_button_pressed_max"
}
}
},
"thumbrest": {
"type": "button",
"gamepadIndices": {
"button": 6
},
"rootNodeName": "thumbrest",
"visualResponses": {
"thumbrest_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "thumbrest_pressed_value",
"minNodeName": "thumbrest_pressed_min",
"maxNodeName": "thumbrest_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "meta-quest-touch-pro-right",
"assetPath": "right.glb"
}
}
}
Binary file not shown.
Binary file not shown.
@@ -1,329 +0,0 @@
{
"profileId": "oculus-touch-v2",
"fallbackProfileIds": [
"oculus-touch",
"generic-trigger-squeeze-thumbstick"
],
"layouts": {
"left": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
},
"xr-standard-thumbstick": {
"type": "thumbstick",
"gamepadIndices": {
"button": 3,
"xAxis": 2,
"yAxis": 3
},
"rootNodeName": "xr_standard_thumbstick",
"visualResponses": {
"xr_standard_thumbstick_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_pressed_value",
"minNodeName": "xr_standard_thumbstick_pressed_min",
"maxNodeName": "xr_standard_thumbstick_pressed_max"
},
"xr_standard_thumbstick_xaxis_pressed": {
"componentProperty": "xAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
},
"xr_standard_thumbstick_yaxis_pressed": {
"componentProperty": "yAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
}
}
},
"x-button": {
"type": "button",
"gamepadIndices": {
"button": 4
},
"rootNodeName": "x_button",
"visualResponses": {
"x_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "x_button_pressed_value",
"minNodeName": "x_button_pressed_min",
"maxNodeName": "x_button_pressed_max"
}
}
},
"y-button": {
"type": "button",
"gamepadIndices": {
"button": 5
},
"rootNodeName": "y_button",
"visualResponses": {
"y_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "y_button_pressed_value",
"minNodeName": "y_button_pressed_min",
"maxNodeName": "y_button_pressed_max"
}
}
},
"thumbrest": {
"type": "button",
"gamepadIndices": {
"button": 6
},
"rootNodeName": "thumbrest",
"visualResponses": {
"thumbrest_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "thumbrest_pressed_value",
"minNodeName": "thumbrest_pressed_min",
"maxNodeName": "thumbrest_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "oculus-touch-v2-left",
"assetPath": "left.glb"
},
"right": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
},
"xr-standard-thumbstick": {
"type": "thumbstick",
"gamepadIndices": {
"button": 3,
"xAxis": 2,
"yAxis": 3
},
"rootNodeName": "xr_standard_thumbstick",
"visualResponses": {
"xr_standard_thumbstick_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_pressed_value",
"minNodeName": "xr_standard_thumbstick_pressed_min",
"maxNodeName": "xr_standard_thumbstick_pressed_max"
},
"xr_standard_thumbstick_xaxis_pressed": {
"componentProperty": "xAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
},
"xr_standard_thumbstick_yaxis_pressed": {
"componentProperty": "yAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
}
}
},
"a-button": {
"type": "button",
"gamepadIndices": {
"button": 4
},
"rootNodeName": "a_button",
"visualResponses": {
"a_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "a_button_pressed_value",
"minNodeName": "a_button_pressed_min",
"maxNodeName": "a_button_pressed_max"
}
}
},
"b-button": {
"type": "button",
"gamepadIndices": {
"button": 5
},
"rootNodeName": "b_button",
"visualResponses": {
"b_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "b_button_pressed_value",
"minNodeName": "b_button_pressed_min",
"maxNodeName": "b_button_pressed_max"
}
}
},
"thumbrest": {
"type": "button",
"gamepadIndices": {
"button": 6
},
"rootNodeName": "thumbrest",
"visualResponses": {
"thumbrest_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "thumbrest_pressed_value",
"minNodeName": "thumbrest_pressed_min",
"maxNodeName": "thumbrest_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "oculus-touch-v2-right",
"assetPath": "right.glb"
}
}
}
Binary file not shown.
Binary file not shown.
@@ -1,330 +0,0 @@
{
"profileId": "oculus-touch-v3",
"fallbackProfileIds": [
"oculus-touch-v2",
"oculus-touch",
"generic-trigger-squeeze-thumbstick"
],
"layouts": {
"left": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
},
"xr-standard-thumbstick": {
"type": "thumbstick",
"gamepadIndices": {
"button": 3,
"xAxis": 2,
"yAxis": 3
},
"rootNodeName": "xr_standard_thumbstick",
"visualResponses": {
"xr_standard_thumbstick_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_pressed_value",
"minNodeName": "xr_standard_thumbstick_pressed_min",
"maxNodeName": "xr_standard_thumbstick_pressed_max"
},
"xr_standard_thumbstick_xaxis_pressed": {
"componentProperty": "xAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
},
"xr_standard_thumbstick_yaxis_pressed": {
"componentProperty": "yAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
}
}
},
"x-button": {
"type": "button",
"gamepadIndices": {
"button": 4
},
"rootNodeName": "x_button",
"visualResponses": {
"x_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "x_button_pressed_value",
"minNodeName": "x_button_pressed_min",
"maxNodeName": "x_button_pressed_max"
}
}
},
"y-button": {
"type": "button",
"gamepadIndices": {
"button": 5
},
"rootNodeName": "y_button",
"visualResponses": {
"y_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "y_button_pressed_value",
"minNodeName": "y_button_pressed_min",
"maxNodeName": "y_button_pressed_max"
}
}
},
"thumbrest": {
"type": "button",
"gamepadIndices": {
"button": 6
},
"rootNodeName": "thumbrest",
"visualResponses": {
"thumbrest_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "thumbrest_pressed_value",
"minNodeName": "thumbrest_pressed_min",
"maxNodeName": "thumbrest_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "oculus-touch-v3-left",
"assetPath": "left.glb"
},
"right": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
},
"xr-standard-thumbstick": {
"type": "thumbstick",
"gamepadIndices": {
"button": 3,
"xAxis": 2,
"yAxis": 3
},
"rootNodeName": "xr_standard_thumbstick",
"visualResponses": {
"xr_standard_thumbstick_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_pressed_value",
"minNodeName": "xr_standard_thumbstick_pressed_min",
"maxNodeName": "xr_standard_thumbstick_pressed_max"
},
"xr_standard_thumbstick_xaxis_pressed": {
"componentProperty": "xAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
},
"xr_standard_thumbstick_yaxis_pressed": {
"componentProperty": "yAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
}
}
},
"a-button": {
"type": "button",
"gamepadIndices": {
"button": 4
},
"rootNodeName": "a_button",
"visualResponses": {
"a_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "a_button_pressed_value",
"minNodeName": "a_button_pressed_min",
"maxNodeName": "a_button_pressed_max"
}
}
},
"b-button": {
"type": "button",
"gamepadIndices": {
"button": 5
},
"rootNodeName": "b_button",
"visualResponses": {
"b_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "b_button_pressed_value",
"minNodeName": "b_button_pressed_min",
"maxNodeName": "b_button_pressed_max"
}
}
},
"thumbrest": {
"type": "button",
"gamepadIndices": {
"button": 6
},
"rootNodeName": "thumbrest",
"visualResponses": {
"thumbrest_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "thumbrest_pressed_value",
"minNodeName": "thumbrest_pressed_min",
"maxNodeName": "thumbrest_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "oculus-touch-v3-right",
"assetPath": "right.glb"
}
}
}
Binary file not shown.
Binary file not shown.
-286
View File
@@ -1,286 +0,0 @@
{
"profileId": "pico-4",
"fallbackProfileIds": [
"generic-trigger-squeeze-thumbstick"
],
"layouts": {
"left": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
},
"xr-standard-thumbstick": {
"type": "thumbstick",
"gamepadIndices": {
"button": 3,
"xAxis": 2,
"yAxis": 3
},
"rootNodeName": "xr_standard_thumbstick",
"visualResponses": {
"xr_standard_thumbstick_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_pressed_value",
"minNodeName": "xr_standard_thumbstick_pressed_min",
"maxNodeName": "xr_standard_thumbstick_pressed_max"
},
"xr_standard_thumbstick_xaxis_pressed": {
"componentProperty": "xAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
},
"xr_standard_thumbstick_yaxis_pressed": {
"componentProperty": "yAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
}
}
},
"x-button": {
"type": "button",
"gamepadIndices": {
"button": 4
},
"rootNodeName": "x_button",
"visualResponses": {
"x_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "x_button_pressed_value",
"minNodeName": "x_button_pressed_min",
"maxNodeName": "x_button_pressed_max"
}
}
},
"y-button": {
"type": "button",
"gamepadIndices": {
"button": 5
},
"rootNodeName": "y_button",
"visualResponses": {
"y_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "y_button_pressed_value",
"minNodeName": "y_button_pressed_min",
"maxNodeName": "y_button_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "pico-4-left",
"assetPath": "left.glb"
},
"right": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
},
"xr-standard-thumbstick": {
"type": "thumbstick",
"gamepadIndices": {
"button": 3,
"xAxis": 2,
"yAxis": 3
},
"rootNodeName": "xr_standard_thumbstick",
"visualResponses": {
"xr_standard_thumbstick_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_pressed_value",
"minNodeName": "xr_standard_thumbstick_pressed_min",
"maxNodeName": "xr_standard_thumbstick_pressed_max"
},
"xr_standard_thumbstick_xaxis_pressed": {
"componentProperty": "xAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
},
"xr_standard_thumbstick_yaxis_pressed": {
"componentProperty": "yAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
}
}
},
"a-button": {
"type": "button",
"gamepadIndices": {
"button": 4
},
"rootNodeName": "a_button",
"visualResponses": {
"a_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "a_button_pressed_value",
"minNodeName": "a_button_pressed_min",
"maxNodeName": "a_button_pressed_max"
}
}
},
"b-button": {
"type": "button",
"gamepadIndices": {
"button": 5
},
"rootNodeName": "b_button",
"visualResponses": {
"b_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "b_button_pressed_value",
"minNodeName": "b_button_pressed_min",
"maxNodeName": "b_button_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "pico-4-right",
"assetPath": "right.glb"
}
}
}
Binary file not shown.
Binary file not shown.
-286
View File
@@ -1,286 +0,0 @@
{
"profileId": "pico-neo3",
"fallbackProfileIds": [
"generic-trigger-squeeze-thumbstick"
],
"layouts": {
"left": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
},
"xr-standard-thumbstick": {
"type": "thumbstick",
"gamepadIndices": {
"button": 3,
"xAxis": 2,
"yAxis": 3
},
"rootNodeName": "xr_standard_thumbstick",
"visualResponses": {
"xr_standard_thumbstick_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_pressed_value",
"minNodeName": "xr_standard_thumbstick_pressed_min",
"maxNodeName": "xr_standard_thumbstick_pressed_max"
},
"xr_standard_thumbstick_xaxis_pressed": {
"componentProperty": "xAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
},
"xr_standard_thumbstick_yaxis_pressed": {
"componentProperty": "yAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
}
}
},
"x-button": {
"type": "button",
"gamepadIndices": {
"button": 4
},
"rootNodeName": "x_button",
"visualResponses": {
"x_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "x_button_pressed_value",
"minNodeName": "x_button_pressed_min",
"maxNodeName": "x_button_pressed_max"
}
}
},
"y-button": {
"type": "button",
"gamepadIndices": {
"button": 5
},
"rootNodeName": "y_button",
"visualResponses": {
"y_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "y_button_pressed_value",
"minNodeName": "y_button_pressed_min",
"maxNodeName": "y_button_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "pico-neo3-left",
"assetPath": "left.glb"
},
"right": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
},
"xr-standard-thumbstick": {
"type": "thumbstick",
"gamepadIndices": {
"button": 3,
"xAxis": 2,
"yAxis": 3
},
"rootNodeName": "xr_standard_thumbstick",
"visualResponses": {
"xr_standard_thumbstick_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_pressed_value",
"minNodeName": "xr_standard_thumbstick_pressed_min",
"maxNodeName": "xr_standard_thumbstick_pressed_max"
},
"xr_standard_thumbstick_xaxis_pressed": {
"componentProperty": "xAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
},
"xr_standard_thumbstick_yaxis_pressed": {
"componentProperty": "yAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
}
}
},
"a-button": {
"type": "button",
"gamepadIndices": {
"button": 4
},
"rootNodeName": "a_button",
"visualResponses": {
"a_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "a_button_pressed_value",
"minNodeName": "a_button_pressed_min",
"maxNodeName": "a_button_pressed_max"
}
}
},
"b-button": {
"type": "button",
"gamepadIndices": {
"button": 5
},
"rootNodeName": "b_button",
"visualResponses": {
"b_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "b_button_pressed_value",
"minNodeName": "b_button_pressed_min",
"maxNodeName": "b_button_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "pico-neo3-right",
"assetPath": "right.glb"
}
}
}
Binary file not shown.
-32
View File
@@ -1,32 +0,0 @@
Snapdragon(TM) Game Super Resolution
Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
https://github.com/SnapdragonStudios/snapdragon-gsr
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
SPDX-License-Identifier: BSD-3-Clause
-148
View File
@@ -1,148 +0,0 @@
{
"asset":{
"generator":"Khronos glTF Blender I/O v4.2.70",
"version":"2.0"
},
"scene":0,
"scenes":[
{
"name":"Scene",
"nodes":[
0
]
}
],
"nodes":[
{
"mesh":0,
"name":"Cylinder",
"rotation":[
0.7071068286895752,
0,
0,
0.7071068286895752
],
"translation":[
0,
0,
-0.5
],
"scale":[0.7,1,0.7]
}
],
"materials":[
{
"name":"Material.001",
"pbrMetallicRoughness":{
"baseColorFactor":[0,0,0,0.5]
},
"emissiveTexture":{
"index":0
},
"emissiveFactor": [ 2.0, 2.0, 2.0 ]
}
],
"meshes":[
{
"name":"Cylinder.001",
"primitives":[
{
"attributes":{
"POSITION":0,
"NORMAL":1,
"TEXCOORD_0":2
},
"indices":3,
"material":0
}
]
}
],
"textures":[
{
"sampler":0,
"source":0
}
],
"images":[
{
"mimeType":"image/png",
"name":"Untitled",
"uri":"ray.png"
}
],
"accessors":[
{
"bufferView":0,
"componentType":5126,
"count":18,
"max":[
0.004000000189989805,
0.5,
0.004000000189989805
],
"min":[
-0.004000000189989805,
-0.5,
-0.004000000189989805
],
"type":"VEC3"
},
{
"bufferView":1,
"componentType":5126,
"count":18,
"type":"VEC3"
},
{
"bufferView":2,
"componentType":5126,
"count":18,
"type":"VEC2"
},
{
"bufferView":3,
"componentType":5123,
"count":48,
"type":"SCALAR"
}
],
"bufferViews":[
{
"buffer":0,
"byteLength":216,
"byteOffset":0,
"target":34962
},
{
"buffer":0,
"byteLength":216,
"byteOffset":216,
"target":34962
},
{
"buffer":0,
"byteLength":144,
"byteOffset":432,
"target":34962
},
{
"buffer":0,
"byteLength":96,
"byteOffset":576,
"target":34963
}
],
"samplers":[
{
"magFilter":9729,
"minFilter":9987
}
],
"buffers":[
{
"byteLength":672,
"uri":"ray.bin"
}
]
}
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
-148
View File
@@ -1,148 +0,0 @@
{
"asset":{
"generator":"Khronos glTF Blender I/O v4.2.70",
"version":"2.0"
},
"scene":0,
"scenes":[
{
"name":"Scene",
"nodes":[
0
]
}
],
"nodes":[
{
"mesh":0,
"name":"Cylinder",
"rotation":[
0.7071068286895752,
0,
0,
0.7071068286895752
],
"translation":[
0,
0,
-0.5
],
"scale":[0.7,1,0.7]
}
],
"materials":[
{
"name":"Material.001",
"pbrMetallicRoughness":{
"baseColorFactor":[0,0,0,0]
},
"emissiveTexture":{
"index":0
},
"emissiveFactor": [ 1.0, 1.0, 1.0 ]
}
],
"meshes":[
{
"name":"Cylinder.001",
"primitives":[
{
"attributes":{
"POSITION":0,
"NORMAL":1,
"TEXCOORD_0":2
},
"indices":3,
"material":0
}
]
}
],
"textures":[
{
"sampler":0,
"source":0
}
],
"images":[
{
"mimeType":"image/png",
"name":"Untitled",
"uri":"ray.png"
}
],
"accessors":[
{
"bufferView":0,
"componentType":5126,
"count":18,
"max":[
0.004000000189989805,
0.5,
0.004000000189989805
],
"min":[
-0.004000000189989805,
-0.5,
-0.004000000189989805
],
"type":"VEC3"
},
{
"bufferView":1,
"componentType":5126,
"count":18,
"type":"VEC3"
},
{
"bufferView":2,
"componentType":5126,
"count":18,
"type":"VEC2"
},
{
"bufferView":3,
"componentType":5123,
"count":48,
"type":"SCALAR"
}
],
"bufferViews":[
{
"buffer":0,
"byteLength":216,
"byteOffset":0,
"target":34962
},
{
"buffer":0,
"byteLength":216,
"byteOffset":216,
"target":34962
},
{
"buffer":0,
"byteLength":144,
"byteOffset":432,
"target":34962
},
{
"buffer":0,
"byteLength":96,
"byteOffset":576,
"target":34963
}
],
"samplers":[
{
"magFilter":9729,
"minFilter":9987
}
],
"buffers":[
{
"byteLength":672,
"uri":"ray.bin"
}
]
}
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 581 B

+115 -60
View File
@@ -4,7 +4,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.7.3'
classpath 'com.android.tools.build:gradle:8.13.0'
}
}
@@ -17,45 +17,86 @@ allprojects {
apply plugin: 'com.android.application'
task "generatePngs"() {
group = 'Custom'
mkdir layout.buildDirectory.dir('generated_resources')
["mipmap-mdpi", "mipmap-hdpi", "mipmap-xhdpi", "mipmap-xxhdpi", "mipmap-xxxhdpi", ].each {
mkdir layout.buildDirectory.dir("generated_resources/${it}")
}
import javax.inject.Inject
import org.gradle.api.DefaultTask
import org.gradle.api.tasks.*
import org.gradle.api.file.DirectoryProperty
import org.gradle.process.ExecOperations
def css = project.hasProperty('wivrn_css') ? project.wivrn_css: "images/wivrn-local.css"
abstract class GeneratePngsTask extends DefaultTask {
@Inject
abstract ExecOperations getExecOps()
exec {
executable = 'rsvg-convert'
args = [ "images/wivrn.svg", "-w", "48", "-h", "48", "-o", layout.buildDirectory.file('generated_resources/mipmap-mdpi/ic_wivrn_launcher.png').get().asFile, '--stylesheet=' + css ]
}
@InputFile
abstract RegularFileProperty getSvg()
exec {
executable = 'rsvg-convert'
args = [ "images/wivrn.svg", "-w", "72", "-h", "72", "-o", layout.buildDirectory.file('generated_resources/mipmap-hdpi/ic_wivrn_launcher.png').get().asFile, '--stylesheet=' + css ]
}
@InputFile
@Optional
abstract RegularFileProperty getCss()
exec {
executable = 'rsvg-convert'
args = [ "images/wivrn.svg", "-w", "96", "-h", "96", "-o", layout.buildDirectory.file('generated_resources/mipmap-xhdpi/ic_wivrn_launcher.png').get().asFile, '--stylesheet=' + css ]
}
@OutputDirectory
abstract DirectoryProperty getOutputDir()
exec {
executable = 'rsvg-convert'
args = [ "images/wivrn.svg", "-w", "144", "-h", "144", "-o", layout.buildDirectory.file('generated_resources/mipmap-xxhdpi/ic_wivrn_launcher.png').get().asFile, '--stylesheet=' + css ]
}
@TaskAction
void generate() {
def outDir = getOutputDir().get().asFile
outDir.mkdirs()
exec {
executable = 'rsvg-convert'
args = [ "images/wivrn.svg", "-w", "192", "-h", "192", "-o", layout.buildDirectory.file('generated_resources/mipmap-xxxhdpi/ic_wivrn_launcher.png').get().asFile, '--stylesheet=' + css ]
// Map of density → size
def dpiConfigs = [
"mipmap-mdpi" : 48,
"mipmap-hdpi" : 72,
"mipmap-xhdpi" : 96,
"mipmap-xxhdpi" : 144,
"mipmap-xxxhdpi": 192
]
def cssFile = getCss().isPresent() ? getCss().get().asFile : null
dpiConfigs.each { dpi, size ->
def dpiDir = new File(outDir, dpi)
dpiDir.mkdirs()
def outputFile = new File(dpiDir, "ic_wivrn_launcher.png")
def argsList = [
getSvg().get().asFile.absolutePath,
"-w", size.toString(),
"-h", size.toString(),
"-o", outputFile.absolutePath
]
if (cssFile != null) {
argsList.add("--stylesheet=${cssFile.absolutePath}")
}
execOps.exec {
executable = "rsvg-convert"
args = argsList
}
}
}
}
tasks.register("generatePngs", GeneratePngsTask) {
group = "Custom"
// configure defaults
svg.set(layout.projectDirectory.file("images/wivrn.svg"))
outputDir.set(layout.buildDirectory.dir("generated_resources"))
if (project.hasProperty("wivrn_css")) {
css.set(layout.projectDirectory.file(project.wivrn_css))
} else {
css.set(layout.projectDirectory.file("images/wivrn-local.css"))
}
}
def use_asan = project.hasProperty('wivrn_address_sanitizer') && wivrn_address_sanitizer == 'ON'
android {
namespace "org.meumeu.wivrn"
ndkVersion "27.1.12297006"
namespace = "org.meumeu.wivrn"
ndkVersion = "29.0.14206865"
lint {
disable += "ExpiredTargetSdkVersion"
@@ -66,23 +107,35 @@ android {
// for Vulkan, need at least 24
// for AImage_getHardwareBuffer, API 26
minSdkVersion 29
compileSdkVersion 32
compileSdkVersion 34
targetSdkVersion 32 // for Oculus Store
versionName = project.hasProperty('wivrn_version') ? wivrn_version : "1.0"
versionCode = project.hasProperty('wivrn_versionCode') ? wivrn_versionCode.toInteger() : 1
def showImguiDemo = project.hasProperty('wivrn_show_imgui_demo') ? wivrn_show_imgui_demo : 'OFF'
def showDebugMenu = project.hasProperty('wivrn_show_debug_menu') ? wivrn_show_debug_menu : 'OFF'
def compressGlb = project.hasProperty('wivrn_compress_glb') ? wivrn_compress_glb : 'OFF'
def fetchcontentBaseDir = project.hasProperty('fetchcontent_base_dir') ? ['-DFETCHCONTENT_BASE_DIR=' + fetchcontent_base_dir] : []
def compilerLauncher = project.hasProperty('compiler_launcher') ? ['-DCMAKE_C_COMPILER_LAUNCHER=' + compiler_launcher, '-DCMAKE_CXX_COMPILER_LAUNCHER=' + compiler_launcher] : []
def asan = use_asan ? 'ON': 'OFF'
def stl = use_asan ? 'c++_shared' : "c++_static"
externalNativeBuild {
def css = project.hasProperty('wivrn_css') ? project.wivrn_css: "images/wivrn-local.css"
cmake {
arguments '-DANDROID_TOOLCHAIN=clang',
'-DANDROID_STL=c++_static',
arguments = ['-DANDROID_TOOLCHAIN=clang',
'-DANDROID_STL=' + stl,
'-DCMAKE_ANDROID_NDK_VERSION=' + ndkVersion,
'-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON',
'-DCMAKE_EXPORT_COMPILE_COMMANDS=ON',
'-DCMAKE_ANDROID_ASSETS_DIRECTORIES=' + layout.buildDirectory.dir("assets").get().asFile,
'-DRESOURCES_DIRECTORIES=' + layout.buildDirectory.dir("resources").get().asFile,
'-DWIVRN_USE_SYSTEM_BOOST=OFF',
'-DWIVRN_USE_SYSTEM_FREETYPE=OFF',
'-DWIVRN_USE_ANDROID_BIN_LIBKTX=ON',
'-DWIVRN_BUILD_CLIENT=ON',
'-DWIVRN_BUILD_SERVER=OFF',
'-DWIVRN_BUILD_SERVER_LIBRARY=OFF',
@@ -90,8 +143,21 @@ android {
'-DWIVRN_BUILD_DASHBOARD=OFF',
'-DWIVRN_WERROR=ON',
'-DWIVRN_SHOW_IMGUI_DEMO_WINDOW=' + showImguiDemo,
'-DWIVRN_CSS=' + css
'-DWIVRN_CLIENT_DEBUG_MENU=' + showDebugMenu,
'-DWIVRN_CSS=' + css,
'-DWIVRN_COMPRESS_GLB=' + compressGlb,
'-DWIVRN_ADDRESS_SANITIZER=' + asan,
] +
fetchcontentBaseDir +
compilerLauncher
resValue "string", "app_name", project.hasProperty('wivrn_app_name') ? project.wivrn_app_name : "WiVRn Local"
abiFilters 'arm64-v8a'//, 'x86_64'
}
}
packaging {
jniLibs {
useLegacyPackaging = use_asan
}
}
}
@@ -103,7 +169,7 @@ android {
keyAlias "default_key"
storePassword signingKeyPassword // Set in gradle.properties
keyPassword signingKeyPassword
enableV2Signing true
enableV2Signing = true
}
}
}
@@ -111,7 +177,7 @@ android {
buildTypes {
if (project.hasProperty("signingKeyPassword")) {
release {
signingConfig signingConfigs.release
signingConfig = signingConfigs.release
}
}
@@ -149,21 +215,22 @@ android {
initWith debug
externalNativeBuild {
cmake {
arguments '-DUSE_ANDROID_VALIDATION_LAYER=ON'
arguments '-DWIVRN_USE_ANDROID_VALIDATION_LAYER=ON'
}
}
}
}
flavorDimensions "device"
buildTypes.all { variant ->
sourceSets {
"${variant.name}" {
jniLibs.srcDirs layout.buildDirectory.dir("libs${variant.name.capitalize()}")
}
}
productFlavors {
standard {
dimension "device"
externalNativeBuild {
cmake {
abiFilters 'arm64-v8a'//, 'x86_64'
}
externalNativeBuild{
cmake {
arguments '-DANDROID_LIB_DIRECTORIES=' + layout.buildDirectory.dir("libs${variant.name.capitalize()}").get().asFile
}
}
}
@@ -173,14 +240,15 @@ android {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['client/java']
res.srcDirs = [ 'resources', layout.buildDirectory.dir('generated_resources') ]
resources.srcDirs = [layout.buildDirectory.dir('resources')]
assets.srcDirs 'assets'
assets.srcDirs = ['assets', layout.buildDirectory.dir("assets")]
}
}
externalNativeBuild {
cmake {
version '3.30.3'
version = '3.31.5'
path 'CMakeLists.txt'
}
}
@@ -190,19 +258,6 @@ android {
applicationVariants.all { variant ->
// It probably works with merge${variant.name.capitalize()}Assets too
tasks["generate${variant.name.capitalize()}Assets"].dependsOn "externalNativeBuild${variant.name.capitalize()}"
}
productFlavors.all { variant ->
sourceSets {
"${variant.name}" {
assets.srcDirs layout.buildDirectory.dir("assets${variant.name.capitalize()}")
}
}
externalNativeBuild{
cmake {
arguments '-DCMAKE_ANDROID_ASSETS_DIRECTORIES=' + layout.buildDirectory.dir("assets${variant.name.capitalize()}").get().asFile
}
}
tasks["merge${variant.name.capitalize()}Resources"].dependsOn "externalNativeBuild${variant.name.capitalize()}"
}
}
+153 -79
View File
@@ -7,24 +7,38 @@ set(KTX_FEATURE_LOADTEST_APPS OFF)
set(FASTGLTF_COMPILE_AS_CPP20 ON)
FetchContent_MakeAvailable(simdjson spdlog glm fastgltf imgui stb implot uni-algo)
set(SPIRV_REFLECT_EXECUTABLE OFF)
set(SPIRV_REFLECT_STATIC_LIB ON)
set(SPIRV_REFLECT_INSTALL OFF)
if (WIVRN_USE_LIBKTX)
FetchContent_MakeAvailable(simdjson spdlog glm fastgltf imgui stb implot uni-algo entt spirv-reflect)
if(ANDROID AND WIVRN_USE_ANDROID_BIN_LIBKTX)
if(NOT EXISTS ${FETCHCONTENT_BASE_DIR}/KTX-Software-${KTX_VERSION}-Android.zip)
file(DOWNLOAD
https://github.com/KhronosGroup/KTX-Software/releases/download/${KTX_VERSION_FULL}/KTX-Software-${KTX_VERSION}-Android.zip
${FETCHCONTENT_BASE_DIR}/KTX-Software-${KTX_VERSION}-Android.zip
EXPECTED_HASH SHA256=9f84a395f37a185e2e21e77cfd3893e67271b616edf5feb39125f09ab4c06b29
)
endif()
file(ARCHIVE_EXTRACT INPUT ${FETCHCONTENT_BASE_DIR}/KTX-Software-${KTX_VERSION}-Android.zip DESTINATION ${FETCHCONTENT_BASE_DIR})
add_library(ktx INTERFACE)
target_link_libraries(ktx INTERFACE ${FETCHCONTENT_BASE_DIR}/KTX-Software-${KTX_VERSION}-Android/${ANDROID_ABI}/lib/libktx.so)
target_include_directories(ktx INTERFACE ${FETCHCONTENT_BASE_DIR}/KTX-Software-${KTX_VERSION}-Android/${ANDROID_ABI}/include)
elseif(WIVRN_USE_SYSTEM_LIBKTX AND NOT ANDROID)
else()
FetchContent_MakeAvailable(libktx)
endif()
if (NOT BOOST_FOUND)
FetchContent_MakeAvailable(boost)
endif()
include(FreetypeHarfbuzz)
include(CompileGLSL)
include(GenerateAssets)
include(I18n)
add_library(stb INTERFACE)
target_include_directories(stb INTERFACE ${stb_SOURCE_DIR})
if(ANDROID)
file(REMOVE_RECURSE ${RESOURCES_DIRECTORIES}/lib ${ANDROID_LIB_DIRECTORIES})
add_library(wivrn MODULE)
find_library(ANDROID_LIBRARY NAMES android REQUIRED)
@@ -37,32 +51,86 @@ if(ANDROID)
FetchContent_MakeAvailable(openxr_loader)
target_link_libraries(wivrn openxr_loader)
# libcurl
set(BUILD_CURL_EXE OFF)
set(BUILD_TESTING OFF)
set(CURL_DISABLE_INSTALL ON)
set(CURL_USE_LIBPSL OFF)
set(CURL_USE_LIBSSH2 OFF)
set(BUILD_EXAMPLES OFF)
FetchContent_MakeAvailable(curl)
target_link_libraries(wivrn libcurl_static)
target_link_libraries(wivrn native_app_glue)
target_compile_definitions(wivrn PRIVATE -DXR_USE_PLATFORM_ANDROID -DVK_USE_PLATFORM_ANDROID_KHR)
target_link_options(wivrn PRIVATE -Wl,--undefined=ANativeActivity_onCreate)
target_link_options(wivrn
PRIVATE
-Wl,--version-script,${CMAKE_CURRENT_SOURCE_DIR}/android/exported_symbols.txt
# This causes the linker to emit an error when a version script names a
# symbol that is not found, rather than silently ignoring that line.
-Wl,--no-undefined-version
)
set_target_properties(wivrn PROPERTIES LINK_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/android/exported_symbols.txt)
file(GLOB PLATFORM_SOURCE CONFIGURE_DEPENDS
"android/*.cpp"
"audio/android/*.cpp"
"decoder/android/*.cpp"
)
target_sources(wivrn PRIVATE ${PLATFORM_SOURCE})
if (WIVRN_ADDRESS_SANITIZER)
file(MAKE_DIRECTORY
${RESOURCES_DIRECTORIES}/lib/${CMAKE_ANDROID_ARCH_ABI}
${ANDROID_LIB_DIRECTORIES}/${CMAKE_ANDROID_ARCH_ABI})
file(GLOB _asan_location
${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/*/lib/linux/libclang_rt.asan-${CMAKE_SYSTEM_PROCESSOR}-android.so
)
file(COPY
${_asan_location}
DESTINATION ${ANDROID_LIB_DIRECTORIES}/${CMAKE_ANDROID_ARCH_ABI}
)
file(COPY_FILE
${ANDROID_NDK}/wrap.sh/asan.sh
${RESOURCES_DIRECTORIES}/lib/${CMAKE_ANDROID_ARCH_ABI}/wrap.sh
)
endif()
else()
add_executable(wivrn)
if (OpenXR_FOUND)
if (WIVRN_USE_SYSTEM_OPENXR)
target_link_libraries(wivrn OpenXR::openxr_loader OpenXR::headers)
else()
FetchContent_MakeAvailable(openxr_loader)
target_link_libraries(wivrn openxr_loader)
endif()
target_link_libraries(wivrn PkgConfig::LIBAV Fontconfig::Fontconfig)
target_link_libraries(wivrn Fontconfig::Fontconfig CURL::libcurl)
if(WIVRN_USE_V4L2)
file(GLOB CLIENT_V4L2_SOURCE CONFIGURE_DEPENDS
"decoder/v4l2/*.cpp")
list(APPEND PLATFORM_SOURCE ${CLIENT_V4L2_SOURCE})
else()
target_link_libraries(wivrn PkgConfig::LIBAV_CLIENT)
file(GLOB PLATFORM_SOURCE CONFIGURE_DEPENDS
"decoder/ffmpeg/*.cpp")
endif()
file(GLOB CLIENT_LINUX_SOURCE CONFIGURE_DEPENDS
"linux/*.cpp")
list(APPEND PLATFORM_SOURCE ${CLIENT_LINUX_SOURCE})
if(WIVRN_USE_PIPEWIRE)
file(GLOB CLIENT_PIPEWIRE_SOURCE CONFIGURE_DEPENDS
"audio/linux/*.cpp")
list(APPEND PLATFORM_SOURCE ${CLIENT_PIPEWIRE_SOURCE})
target_link_libraries(wivrn PkgConfig::libpipewire)
endif()
file(GLOB PLATFORM_SOURCE CONFIGURE_DEPENDS
"decoder/ffmpeg/*.cpp")
target_sources(wivrn PRIVATE ${PLATFORM_SOURCE})
file(CREATE_LINK ${CMAKE_CURRENT_BINARY_DIR}/share ${CMAKE_BINARY_DIR}/share SYMBOLIC)
@@ -75,8 +143,6 @@ endif()
#
target_compile_definitions(wivrn PRIVATE "XR_USE_TIMESPEC=1")
set_target_properties(wivrn PROPERTIES CXX_VISIBILITY_PRESET hidden)
file(GLOB LOCAL_SOURCE CONFIGURE_DEPENDS
"*.cpp"
"decoder/*.cpp"
@@ -89,28 +155,40 @@ file(GLOB LOCAL_SOURCE CONFIGURE_DEPENDS
file(GLOB_RECURSE VULKAN_SHADERS CONFIGURE_DEPENDS "*.glsl")
target_sources(wivrn PRIVATE ${LOCAL_SOURCE} ${VULKAN_SHADERS})
wivrn_compile_glsl(wivrn ${VULKAN_SHADERS})
wivrn_compile_glsl(wivrn SHADERS ${VULKAN_SHADERS})
target_link_libraries(wivrn Vulkan::Vulkan spdlog::spdlog glm::glm fastgltf FreetypeHarfbuzz stb Boost::url Boost::locale)
if (WIVRN_USE_LIBKTX)
target_link_libraries(wivrn ktx_read)
endif()
target_link_libraries(wivrn
Boost::locale
Boost::url
EnTT::EnTT
fastgltf
FreetypeHarfbuzz
glm::glm
imspinner
ktx
simdjson
spdlog::spdlog
spirv-reflect-static
stb
uni-algo
Vulkan::Vulkan
wivrn-common
wivrn-external
)
target_compile_definitions(wivrn PRIVATE -DXR_USE_GRAPHICS_API_VULKAN)
target_compile_definitions(wivrn PRIVATE -DVMA_STATS_STRING_ENABLED=0)
target_compile_definitions(wivrn PRIVATE -DGLM_ENABLE_EXPERIMENTAL)
target_compile_definitions(wivrn PRIVATE IMGUI_DEFINE_MATH_OPERATORS)
target_include_directories(wivrn PRIVATE .)
if(NOT ANDROID)
configure_file(io.github.wivrn.wivrn-client.desktop.in io.github.wivrn.wivrn-client.desktop)
install(TARGETS wivrn)
endif()
target_link_libraries(wivrn simdjson uni-algo wivrn-common wivrn-external)
##############################################################################
# Dear ImGui
#
@@ -135,7 +213,7 @@ target_compile_definitions(wivrn-imgui PUBLIC IMGUI_ENABLE_FREETYPE)
# target_compile_definitions(wivrn-imgui PUBLIC IMGUI_DISABLE_OBSOLETE_FUNCTIONS) # incompatible with implot
# target_compile_definitions(wivrn-imgui PUBLIC IMGUI_ENABLE_FREETYPE_LUNASVG)
target_compile_features(wivrn-imgui PRIVATE cxx_std_23)
target_link_libraries(wivrn-imgui FreetypeHarfbuzz)
target_link_libraries(wivrn-imgui FreetypeHarfbuzz Vulkan::Vulkan)
target_link_libraries(wivrn wivrn-imgui)
@@ -154,28 +232,26 @@ khronos_validation.enables = VK_VALIDATION_FEATURE_ENABLE_THREAD_SAFETY_EXT
")
endif()
if(USE_ANDROID_VALIDATION_LAYER)
set(VVL_VERSION "1.3.231.1")
if(WIVRN_USE_ANDROID_VALIDATION_LAYER)
set(VVL_VERSION "1.4.321.0")
if(NOT EXISTS ${CMAKE_BINARY_DIR}/Vulkan-ValidationLayers-${VVL_VERSION}.zip)
if(NOT EXISTS ${FETCHCONTENT_BASE_DIR}/Vulkan-ValidationLayers-${VVL_VERSION}.zip)
if (EXISTS ${CMAKE_SOURCE_DIR}/Vulkan-ValidationLayers-${VVL_VERSION}.zip)
file(CREATE_LINK ${CMAKE_SOURCE_DIR}/Vulkan-ValidationLayers-${VVL_VERSION}.zip ${CMAKE_BINARY_DIR}/Vulkan-ValidationLayers-${VVL_VERSION}.zip SYMBOLIC)
file(CREATE_LINK ${CMAKE_SOURCE_DIR}/Vulkan-ValidationLayers-${VVL_VERSION}.zip ${FETCHCONTENT_BASE_DIR}/Vulkan-ValidationLayers-${VVL_VERSION}.zip SYMBOLIC)
else()
file(DOWNLOAD https://github.com/KhronosGroup/Vulkan-ValidationLayers/releases/download/sdk-${VVL_VERSION}/android-binaries-${VVL_VERSION}.zip ${CMAKE_BINARY_DIR}/Vulkan-ValidationLayers-${VVL_VERSION}.zip
EXPECTED_HASH SHA256=eec3a54222d6d33d4f787a13a45c60ac5b9e8d7bf795fc41e4242354a02e34ba)
file(DOWNLOAD https://github.com/KhronosGroup/Vulkan-ValidationLayers/releases/download/vulkan-sdk-${VVL_VERSION}/android-binaries-${VVL_VERSION}.zip
${FETCHCONTENT_BASE_DIR}/Vulkan-ValidationLayers-${VVL_VERSION}.zip
EXPECTED_HASH SHA256=75f2881ba7af0507c8cec13b4bf6c95556c6333485cdb8be41f608fccf762128)
endif()
endif()
set(VVL_ZIPFILE ${CMAKE_CURRENT_SOURCE_DIR}/Vulkan-ValidationLayers-${VVL_VERSION}.zip)
file(ARCHIVE_EXTRACT INPUT ${CMAKE_BINARY_DIR}/Vulkan-ValidationLayers-${VVL_VERSION}.zip DESTINATION ${CMAKE_BINARY_DIR}/Vulkan-ValidationLayer)
file(ARCHIVE_EXTRACT INPUT ${FETCHCONTENT_BASE_DIR}/Vulkan-ValidationLayers-${VVL_VERSION}.zip DESTINATION ${FETCHCONTENT_BASE_DIR}/Vulkan-ValidationLayer)
add_library(vvl1 SHARED IMPORTED)
set_property(TARGET vvl1 PROPERTY IMPORTED_LOCATION ${CMAKE_BINARY_DIR}/Vulkan-ValidationLayer/${CMAKE_ANDROID_ARCH_ABI}/libVkLayer_khronos_validation.so)
add_library(vvl2 SHARED IMPORTED)
set_property(TARGET vvl2 PROPERTY IMPORTED_LOCATION ${CMAKE_BINARY_DIR}/Vulkan-ValidationLayer/${CMAKE_ANDROID_ARCH_ABI}/libc++_shared.so)
target_link_libraries(wivrn vvl1 vvl2) # Hack to get gradle to package the validation layer in the APK
file(COPY
${FETCHCONTENT_BASE_DIR}/Vulkan-ValidationLayer/android-binaries-${VVL_VERSION}/${CMAKE_ANDROID_ARCH_ABI}
DESTINATION ${ANDROID_LIB_DIRECTORIES})
endif()
@@ -213,57 +289,48 @@ endif()
##############################################################################
# Generate assets from SVGs
# Generate assets
#
file(REAL_PATH ${WIVRN_CSS} WIVRN_CSS_ABS BASE_DIRECTORY "${CMAKE_SOURCE_DIR}")
set(RSVG_OPTS "--stylesheet=${WIVRN_CSS_ABS}")
set(IMG_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../images)
set(AST_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../assets)
set(IMAGES_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../images)
set(ASSETS_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../assets-source)
add_custom_command(OUTPUT ${ASSETS_DIR}/wivrn.png
COMMAND ${RSVG_CONVERT} ${IMG_SRC_DIR}/wivrn.svg -w 540 -h 540 -o ${ASSETS_DIR}/wivrn.png ${RSVG_OPTS}
DEPENDS ${IMG_SRC_DIR}/wivrn.svg ${WIVRN_CSS_ABS})
wivrn_rasterize_svg(SOURCE ${IMAGES_SRC_DIR}/wivrn.svg DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/wivrn.png WIDTH 540 HEIGHT 540 CSS ${WIVRN_CSS_ABS})
wivrn_rasterize_svg(SOURCE ${IMAGES_SRC_DIR}/wivrn-pride.svg DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/wivrn-pride.png WIDTH 540 HEIGHT 540 CSS ${WIVRN_CSS_ABS})
wivrn_rasterize_svg(SOURCE ${IMAGES_SRC_DIR}/wivrn-christmas.svg DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/wivrn-christmas.png WIDTH 540 HEIGHT 540 CSS ${WIVRN_CSS_ABS})
wivrn_rasterize_svg(SOURCE ${ASSETS_SRC_DIR}/passthrough.svg DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/passthrough.png WIDTH 256 HEIGHT 256)
wivrn_rasterize_svg(SOURCE ${ASSETS_SRC_DIR}/default-environment.svg DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/default-environment.png WIDTH 256 HEIGHT 256)
add_custom_command(OUTPUT ${ASSETS_DIR}/wivrn-pride.png
COMMAND ${RSVG_CONVERT} ${IMG_SRC_DIR}/wivrn-pride.svg -w 540 -h 540 -o ${ASSETS_DIR}/wivrn-pride.png ${RSVG_OPTS}
DEPENDS ${IMG_SRC_DIR}/wivrn-pride.svg ${WIVRN_CSS_ABS})
add_custom_target(assets ALL DEPENDS
${ASSETS_DIR}/wivrn.png
${ASSETS_DIR}/wivrn-pride.png
)
add_dependencies(wivrn assets)
if(ANDROID)
find_program(TOKTX toktx REQUIRED)
add_custom_command(OUTPUT ${ASSETS_DIR}/wivrn.ktx2
COMMAND ${TOKTX} --encode astc --astc_blk_d 4x4 --astc_quality 100 --genmipmap ${ASSETS_DIR}/wivrn.ktx2 ${ASSETS_DIR}/wivrn.png
DEPENDS ${ASSETS_DIR}/wivrn.png)
add_custom_command(OUTPUT ${ASSETS_DIR}/wivrn-pride.ktx2
COMMAND ${TOKTX} --encode astc --astc_blk_d 4x4 --astc_quality 100 --genmipmap ${ASSETS_DIR}/wivrn-pride.ktx2 ${ASSETS_DIR}/wivrn-pride.png
DEPENDS ${ASSETS_DIR}/wivrn-pride.png)
add_custom_command(OUTPUT ${ASSETS_DIR}/WoodFloor051_1K-JPG_Color.ktx2
COMMAND ${TOKTX} --encode astc --astc_blk_d 12x12 --astc_quality 100 --genmipmap ${ASSETS_DIR}/WoodFloor051_1K-JPG_Color.ktx2 ${AST_SRC_DIR}/WoodFloor051_1K-JPG_Color.jpg
DEPENDS ${AST_SRC_DIR}/WoodFloor051_1K-JPG_Color.jpg)
add_custom_command(OUTPUT ${ASSETS_DIR}/vr_splash.png
COMMAND ${CMAKE_COMMAND} -E copy ${ASSETS_DIR}/wivrn.png ${ASSETS_DIR}/vr_splash.png
DEPENDS ${ASSETS_DIR}/wivrn.png)
add_custom_target(assets-android ALL DEPENDS
${ASSETS_DIR}/wivrn.ktx2
${ASSETS_DIR}/wivrn-pride.ktx2
${ASSETS_DIR}/WoodFloor051_1K-JPG_Color.ktx2
${ASSETS_DIR}/vr_splash.png
)
add_dependencies(assets-android assets)
add_dependencies(wivrn assets-android)
wivrn_generate_ktx( SOURCE ${CMAKE_CURRENT_BINARY_DIR}/wivrn.png DESTINATION ${ASSETS_DIR}/wivrn.ktx2 TARGET wivrn)
wivrn_generate_ktx( SOURCE ${CMAKE_CURRENT_BINARY_DIR}/wivrn-pride.png DESTINATION ${ASSETS_DIR}/wivrn-pride.ktx2 TARGET wivrn)
wivrn_generate_ktx( SOURCE ${CMAKE_CURRENT_BINARY_DIR}/wivrn-christmas.png DESTINATION ${ASSETS_DIR}/wivrn-christmas.ktx2 TARGET wivrn)
wivrn_generate_ktx( SOURCE ${ASSETS_SRC_DIR}/default_icon.png DESTINATION ${ASSETS_DIR}/default_icon.ktx2 TARGET wivrn)
wivrn_generate_ktx( SOURCE ${CMAKE_CURRENT_BINARY_DIR}/passthrough.png DESTINATION ${ASSETS_DIR}/passthrough.ktx2 TARGET wivrn)
wivrn_generate_ktx( SOURCE ${CMAKE_CURRENT_BINARY_DIR}/default-environment.png DESTINATION ${ASSETS_DIR}/default-environment.ktx2 TARGET wivrn)
if(WIVRN_COMPRESS_GLB)
wivrn_gltf_transform_uastc(SOURCE ${ASSETS_SRC_DIR}/ground.glb DESTINATION ${ASSETS_DIR}/ground.glb TARGET wivrn ZSTD 20)
else()
wivrn_copy_file( SOURCE ${ASSETS_SRC_DIR}/ground.glb DESTINATION ${ASSETS_DIR}/ground.glb TARGET wivrn)
endif()
wivrn_webxr_download()
wivrn_webxr_controller(PROFILE generic-trigger-squeeze DESTINATION ${ASSETS_DIR}/controllers TARGET wivrn)
wivrn_webxr_controller(PROFILE htc-vive-focus-3 DESTINATION ${ASSETS_DIR}/controllers TARGET wivrn)
wivrn_webxr_controller(PROFILE meta-quest-touch-plus DESTINATION ${ASSETS_DIR}/controllers TARGET wivrn)
wivrn_webxr_controller(PROFILE meta-quest-touch-pro DESTINATION ${ASSETS_DIR}/controllers TARGET wivrn)
wivrn_webxr_controller(PROFILE oculus-touch-v2 DESTINATION ${ASSETS_DIR}/controllers TARGET wivrn)
wivrn_webxr_controller(PROFILE oculus-touch-v3 DESTINATION ${ASSETS_DIR}/controllers TARGET wivrn)
wivrn_webxr_controller(PROFILE pico-4 DESTINATION ${ASSETS_DIR}/controllers TARGET wivrn)
wivrn_webxr_controller(PROFILE pico-4u DESTINATION ${ASSETS_DIR}/controllers TARGET wivrn)
wivrn_webxr_controller(PROFILE pico-neo3 DESTINATION ${ASSETS_DIR}/controllers TARGET wivrn)
wivrn_webxr_controller(PROFILE samsung-galaxyxr DESTINATION ${ASSETS_DIR}/controllers TARGET wivrn)
wivrn_webxr_controller(PROFILE yvr-touch-v2 DESTINATION ${ASSETS_DIR}/controllers TARGET wivrn)
# Add the VR splash screen (only used on Quest)
if(ANDROID)
wivrn_copy_file(SOURCE ${CMAKE_CURRENT_BINARY_DIR}/wivrn.png DESTINATION ${ASSETS_DIR}/vr_splash.png TARGET wivrn)
endif()
##############################################################################
# Copy the assets to be able to find them when started from the build
@@ -286,4 +353,11 @@ if(NOT ANDROID)
set_target_properties(wivrn PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
install(DIRECTORY "${ASSETS_DIR}" DESTINATION ${CMAKE_INSTALL_DATADIR}/wivrn)
install(FILES ../images/wivrn.svg
DESTINATION share/icons/hicolor/scalable/apps
RENAME io.github.wivrn.wivrn-client.svg
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/io.github.wivrn.wivrn-client.desktop
DESTINATION share/applications
)
endif()
+22 -19
View File
@@ -2,6 +2,7 @@
* WiVRn VR streaming
* Copyright (C) 2024 Guillaume Meunier <guillaume.meunier@centraliens.net>
* Copyright (C) 2024 Patrick Nicolas <patricknicolas@laposte.net>
* Copyright (C) 2026 Sapphire <imsapphire0@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,23 +20,22 @@
#include "battery.h"
#include "android/jnipp.h"
#include "application.h"
#include <mutex>
#include <spdlog/spdlog.h>
namespace
battery::battery(xr::instance & instance, xr::session & session, jobject activity) : battery(instance, session)
{
std::mutex last_status_lock;
battery_status last_status;
} // namespace
jni::object<""> act(activity);
auto app = act.call<jni::object<"android/app/Application">>("getApplication");
auto ctx = app.call<jni::object<"android/content/Context">>("getApplicationContext");
battery_status get_battery_status()
{
std::unique_lock _{last_status_lock};
return last_status;
auto bat_receiver = act.field<jni::object<"android/content/BroadcastReceiver">>("BatteryInfoReceiver");
ctx.call<jni::object<"android/content/Intent">>("registerReceiver", bat_receiver, jni::new_object<"android/content/IntentFilter">(jni::string{"android.intent.action.BATTERY_CHANGED"}));
}
extern "C" __attribute__((visibility("default"))) void Java_org_meumeu_wivrn_BroadcastReceiver_onReceive(JNIEnv * env, jobject instance, jobject ctxt_obj, jobject intent_obj)
extern "C" void Java_org_meumeu_wivrn_BroadcastReceiver_onReceive(JNIEnv * env, jobject instance, jobject ctxt_obj, jobject intent_obj)
{
jni::jni_thread::setup_thread(env);
jni::object<"android/content/Intent"> intent{intent_obj};
@@ -51,16 +51,19 @@ extern "C" __attribute__((visibility("default"))) void Java_org_meumeu_wivrn_Bro
auto scale_jint = intent.call<jni::Int>(get_int_extra, scale_jstr, default_jint);
auto plugged_jint = intent.call<jni::Int>(get_int_extra, plugged_jstr, default_jint);
{
std::unique_lock _{last_status_lock};
if (level_jint && level_jint.value >= 0 && scale_jint && scale_jint.value >= 0)
last_status.charge = (float)(level_jint.value) / (float)(scale_jint.value);
else
last_status.charge = std::nullopt;
std::optional<float> charge{};
if (level_jint && level_jint.value >= 0 && scale_jint && scale_jint.value >= 0)
charge = (float)(level_jint.value) / (float)(scale_jint.value);
last_status.charging = plugged_jint && plugged_jint.value > 0;
}
bool charging = plugged_jint && plugged_jint.value > 0;
if (level_jint and scale_jint and plugged_jint)
spdlog::debug("Received ACTION_BATTERY_CHANGED: level {}%, plugged {}", *last_status.charge * 100, last_status.charging);
if (charge)
spdlog::debug("Received ACTION_BATTERY_CHANGED: level {}%, plugged {}", *charge * 100, charging);
application::get_battery_monitor().on_status_update(
battery::device::head,
{
.charge = charge,
.charging = charging,
});
}
+8
View File
@@ -0,0 +1,8 @@
LIBAPP {
global:
ANativeActivity_onCreate;
android_main;
Java_org_meumeu_wivrn*;
local:
*;
};
+434
View File
@@ -0,0 +1,434 @@
#include "hid.h"
#include "scene.h"
#include <spdlog/spdlog.h>
#define NUM_KEYCODES 226
/// Maps Android KeyCodes to Linux key event codes
static const int KEYCODE_TO_VK[NUM_KEYCODES] = {
0, // KEYCODE_UNKNOWN
0, // KEYCODE_SOFT_LEFT
0, // KEYCODE_SOFT_RIGHT
0, // KEYCODE_HOME
0, // KEYCODE_BACK
0, // KEYCODE_CALL
0, // KEYCODE_ENDCALL
KEY_0, // KEYCODE_0
KEY_1, // KEYCODE_1
KEY_2, // KEYCODE_2
KEY_3, // KEYCODE_3
KEY_4, // KEYCODE_4
KEY_5, // KEYCODE_5
KEY_6, // KEYCODE_6
KEY_7, // KEYCODE_7
KEY_8, // KEYCODE_8
KEY_9, // KEYCODE_9
0, // KEYCODE_STAR
0, // KEYCODE_POUND
KEY_UP, // KEYCODE_DPAD_UP
KEY_DOWN, // KEYCODE_DPAD_DOWN
KEY_LEFT, // KEYCODE_DPAD_LEFT
KEY_RIGHT, // KEYCODE_DPAD_RIGHT
0, // KEYCODE_DPAD_CENTER
// there's no way to discern between BT keyboard & device buttons using NDK,
// so having these mapped consumes all events from the HMD volume rocker.
// alternatively, move the handling to stream.cpp
0, // KEYCODE_VOLUME_UP // KEY_VOLUMEUP
0, // KEYCODE_VOLUME_DOWN // KEY_VOLUMEDOWN
0, // KEYCODE_POWER - device power button, do not consume
0, // KEYCODE_CAMERA
0, // KEYCODE_CLEAR
KEY_A, // KEYCODE_A
KEY_B, // KEYCODE_B
KEY_C, // KEYCODE_C
KEY_D, // KEYCODE_D
KEY_E, // KEYCODE_E
KEY_F, // KEYCODE_F
KEY_G, // KEYCODE_G
KEY_H, // KEYCODE_H
KEY_I, // KEYCODE_I
KEY_J, // KEYCODE_J
KEY_K, // KEYCODE_K
KEY_L, // KEYCODE_L
KEY_M, // KEYCODE_M
KEY_N, // KEYCODE_N
KEY_O, // KEYCODE_O
KEY_P, // KEYCODE_P
KEY_Q, // KEYCODE_Q
KEY_R, // KEYCODE_R
KEY_S, // KEYCODE_S
KEY_T, // KEYCODE_T
KEY_U, // KEYCODE_U
KEY_V, // KEYCODE_V
KEY_W, // KEYCODE_W
KEY_X, // KEYCODE_X
KEY_Y, // KEYCODE_Y
KEY_Z, // KEYCODE_Z
KEY_COMMA, // KEYCODE_COMMA
KEY_DOT, // KEYCODE_PERIOD
KEY_LEFTALT, // KEYCODE_ALT_LEFT
KEY_RIGHTALT, // KEYCODE_ALT_RIGHT
KEY_LEFTSHIFT, // KEYCODE_SHIFT_LEFT
KEY_RIGHTSHIFT, // KEYCODE_SHIFT_RIGHT
KEY_TAB, // KEYCODE_TAB
KEY_SPACE, // KEYCODE_SPACE
0, // KEYCODE_SYM
KEY_WWW, // KEYCODE_EXPLORER
KEY_MAIL, // KEYCODE_ENVELOPE
KEY_ENTER, // KEYCODE_ENTER
KEY_BACKSPACE, // KEYCODE_DEL
KEY_GRAVE, // KEYCODE_GRAVE
KEY_MINUS, // KEYCODE_MINUS
KEY_EQUAL, // KEYCODE_EQUALS
KEY_LEFTBRACE, // KEYCODE_LEFT_BRACKET
KEY_RIGHTBRACE, // KEYCODE_RIGHT_BRACKET
KEY_BACKSLASH, // KEYCODE_BACKSLASH
KEY_SEMICOLON, // KEYCODE_SEMICOLON
KEY_APOSTROPHE, // KEYCODE_APOSTROPHE
KEY_SLASH, // KEYCODE_SLASH
0, // KEYCODE_AT
0, // KEYCODE_NUM
0, // KEYCODE_HEADSETHOOK
0, // KEYCODE_FOCUS
KEY_EQUAL, // KEYCODE_PLUS
KEY_MENU, // KEYCODE_MENU
0, // KEYCODE_NOTIFICATION
KEY_SEARCH, // KEYCODE_SEARCH
KEY_PLAYPAUSE, // KEYCODE_MEDIA_PLAY_PAUSE
KEY_STOPCD, // KEYCODE_MEDIA_STOP
KEY_NEXTSONG, // KEYCODE_MEDIA_NEXT
KEY_PREVIOUSSONG, // KEYCODE_MEDIA_PREVIOUS
KEY_REWIND, // KEYCODE_MEDIA_REWIND
KEY_FASTFORWARD, // KEYCODE_MEDIA_FAST_FORWARD
KEY_MUTE, // KEYCODE_MUTE
KEY_PAGEUP, // KEYCODE_PAGE_UP
KEY_PAGEDOWN, // KEYCODE_PAGE_DOWN
0, // KEYCODE_PICTSYMBOLS
0, // KEYCODE_SWITCH_CHARSET
0, // KEYCODE_BUTTON_A
0, // KEYCODE_BUTTON_B
0, // KEYCODE_BUTTON_C
0, // KEYCODE_BUTTON_X
0, // KEYCODE_BUTTON_Y
0, // KEYCODE_BUTTON_Z
0, // KEYCODE_BUTTON_L1
0, // KEYCODE_BUTTON_R1
0, // KEYCODE_BUTTON_L2
0, // KEYCODE_BUTTON_R2
0, // KEYCODE_BUTTON_THUMBL
0, // KEYCODE_BUTTON_THUMBR
0, // KEYCODE_BUTTON_START
0, // KEYCODE_BUTTON_SELECT
0, // KEYCODE_BUTTON_MODE
KEY_ESC, // KEYCODE_ESCAPE
KEY_DELETE, // KEYCODE_FORWARD_DEL
KEY_LEFTCTRL, // KEYCODE_CTRL_LEFT
KEY_RIGHTCTRL, // KEYCODE_CTRL_RIGHT
KEY_CAPSLOCK, // KEYCODE_CAPS_LOCK
KEY_SCROLLLOCK, // KEYCODE_SCROLL_LOCK
KEY_LEFTMETA, // KEYCODE_META_LEFT
KEY_RIGHTMETA, // KEYCODE_META_RIGHT
0, // KEYCODE_FUNCTION
KEY_SYSRQ, // KEYCODE_SYSRQ
KEY_PAUSE, // KEYCODE_BREAK
KEY_HOME, // KEYCODE_MOVE_HOME
KEY_END, // KEYCODE_MOVE_END
KEY_INSERT, // KEYCODE_INSERT
KEY_FORWARD, // KEYCODE_FORWARD
KEY_PLAYCD, // KEYCODE_MEDIA_PLAY
KEY_PAUSECD, // KEYCODE_MEDIA_PAUSE
KEY_CLOSECD, // KEYCODE_MEDIA_CLOSE
KEY_EJECTCD, // KEYCODE_MEDIA_EJECT
KEY_RECORD, // KEYCODE_MEDIA_RECORD
KEY_F1, // KEYCODE_F1
KEY_F2, // KEYCODE_F2
KEY_F3, // KEYCODE_F3
KEY_F4, // KEYCODE_F4
KEY_F5, // KEYCODE_F5
KEY_F6, // KEYCODE_F6
KEY_F7, // KEYCODE_F7
KEY_F8, // KEYCODE_F8
KEY_F9, // KEYCODE_F9
KEY_F10, // KEYCODE_F10
KEY_F11, // KEYCODE_F11
KEY_F12, // KEYCODE_F12
KEY_NUMLOCK, // KEYCODE_NUM_LOCK
KEY_KP0, // KEYCODE_NUMPAD_0
KEY_KP1, // KEYCODE_NUMPAD_1
KEY_KP2, // KEYCODE_NUMPAD_2
KEY_KP3, // KEYCODE_NUMPAD_3
KEY_KP4, // KEYCODE_NUMPAD_4
KEY_KP5, // KEYCODE_NUMPAD_5
KEY_KP6, // KEYCODE_NUMPAD_6
KEY_KP7, // KEYCODE_NUMPAD_7
KEY_KP8, // KEYCODE_NUMPAD_8
KEY_KP9, // KEYCODE_NUMPAD_9
KEY_KPSLASH, // KEYCODE_NUMPAD_DIVIDE
KEY_KPASTERISK, // KEYCODE_NUMPAD_MULTIPLY
KEY_KPMINUS, // KEYCODE_NUMPAD_SUBTRACT
KEY_KPPLUS, // KEYCODE_NUMPAD_ADD
KEY_KPDOT, // KEYCODE_NUMPAD_DOT
KEY_KPCOMMA, // KEYCODE_NUMPAD_COMMA
KEY_KPENTER, // KEYCODE_NUMPAD_ENTER
KEY_KPEQUAL, // KEYCODE_NUMPAD_EQUALS
KEY_KPLEFTPAREN, // KEYCODE_NUMPAD_LEFT_PAREN
KEY_KPRIGHTPAREN, // KEYCODE_NUMPAD_RIGHT_PAREN
KEY_MUTE, // KEYCODE_VOLUME_MUTE
0, // KEYCODE_INFO
0, // KEYCODE_CHANNEL_UP
0, // KEYCODE_CHANNEL_DOWN
0, // KEYCODE_ZOOM_IN
0, // KEYCODE_ZOOM_OUT
0, // KEYCODE_TV
0, // KEYCODE_WINDOW
0, // KEYCODE_GUIDE
0, // KEYCODE_DVR
KEY_BOOKMARKS, // KEYCODE_BOOKMARK
0, // KEYCODE_CAPTIONS
0, // KEYCODE_SETTINGS
0, // KEYCODE_TV_POWER
0, // KEYCODE_TV_INPUT
0, // KEYCODE_STB_POWER
0, // KEYCODE_STB_INPUT
0, // KEYCODE_AVR_POWER
0, // KEYCODE_AVR_INPUT
0, // KEYCODE_PROG_RED
0, // KEYCODE_PROG_GREEN
0, // KEYCODE_PROG_YELLOW
0, // KEYCODE_PROG_BLUE
0, // KEYCODE_APP_SWITCH
0, // KEYCODE_BUTTON_1
0, // KEYCODE_BUTTON_2
0, // KEYCODE_BUTTON_3
0, // KEYCODE_BUTTON_4
0, // KEYCODE_BUTTON_5
0, // KEYCODE_BUTTON_6
0, // KEYCODE_BUTTON_7
0, // KEYCODE_BUTTON_8
0, // KEYCODE_BUTTON_9
0, // KEYCODE_BUTTON_10
0, // KEYCODE_BUTTON_11
0, // KEYCODE_BUTTON_12
0, // KEYCODE_BUTTON_13
0, // KEYCODE_BUTTON_14
0, // KEYCODE_BUTTON_15
0, // KEYCODE_BUTTON_16
KEY_LANGUAGE, // KEYCODE_LANGUAGE_SWITCH
0, // KEYCODE_MANNER_MODE
0, // KEYCODE_3D_MODE
0, // KEYCODE_CONTACTS
KEY_CALENDAR, // KEYCODE_CALENDAR
0, // KEYCODE_MUSIC
KEY_CALC, // KEYCODE_CALCULATOR
KEY_ZENKAKUHANKAKU, // KEYCODE_ZENKAKU_HANKAKU
0, // KEYCODE_EISU
KEY_MUHENKAN, // KEYCODE_MUHENKAN
KEY_HENKAN, // KEYCODE_HENKAN
KEY_KATAKANAHIRAGANA, // KEYCODE_KATAKANA_HIRAGANA
KEY_YEN, // KEYCODE_YEN
KEY_RO, // KEYCODE_RO
KEY_KATAKANAHIRAGANA, // KEYCODE_KANA
KEY_ASSISTANT, // KEYCODE_ASSIST
KEY_BRIGHTNESSDOWN, // KEYCODE_BRIGHTNESS_DOWN
KEY_BRIGHTNESSUP, // KEYCODE_BRIGHTNESS_UP
0, // KEYCODE_MEDIA_AUDIO_TRACK
KEY_SLEEP, // KEYCODE_SLEEP
KEY_WAKEUP, // KEYCODE_WAKEUP
};
uint8_t key_code_to_vk(int16_t key_code)
{
if (key_code < 0 || key_code >= NUM_KEYCODES)
return 0;
return KEYCODE_TO_VK[key_code];
}
bool android_hid::input_handler::handle_input(scene * current_scene, AInputEvent * event)
{
const int32_t type = AInputEvent_getType(event);
const int32_t src = AInputEvent_getSource(event);
if (type == AINPUT_EVENT_TYPE_KEY)
{
// Gamepad input is read through the OpenXR microsoft/xbox_controller profile, not here.
if ((src & AINPUT_SOURCE_GAMEPAD) == AINPUT_SOURCE_GAMEPAD)
return false;
int32_t flags = AKeyEvent_getFlags(event);
if ((flags & AKEY_EVENT_FLAG_SOFT_KEYBOARD) != 0)
return false; // ignore soft keyboards
if ((src & AINPUT_SOURCE_KEYBOARD) == 0)
return false; // event is not from keyboard
int32_t keycode = AKeyEvent_getKeyCode(event);
int32_t action = AKeyEvent_getAction(event);
bool pressed;
switch (action)
{
case AKEY_EVENT_ACTION_DOWN:
pressed = true;
break;
case AKEY_EVENT_ACTION_UP:
pressed = false;
break;
default:
return false;
}
uint8_t vk = key_code_to_vk(keycode);
if (vk == 0)
return false;
if (pressed)
return current_scene->on_input_key_down(vk);
else
return current_scene->on_input_key_up(vk);
}
if (type == AINPUT_EVENT_TYPE_MOTION)
{
// Gamepad axes are read through the OpenXR microsoft/xbox_controller profile, not here.
if ((src & AINPUT_SOURCE_JOYSTICK) == AINPUT_SOURCE_JOYSTICK)
return false;
// don't care about absolute mouse due to mapping difficulties
if ((src & AINPUT_SOURCE_MOUSE_RELATIVE) == 0)
return false;
int32_t actionMasked = AMotionEvent_getAction(event) & AMOTION_EVENT_ACTION_MASK;
switch (actionMasked)
{
case AMOTION_EVENT_ACTION_HOVER_MOVE: // mouse move with no buttons pressed
case AMOTION_EVENT_ACTION_MOVE: { // mouse move with buttons pressed
float x = AMotionEvent_getX(event, 0);
float y = AMotionEvent_getY(event, 0);
return current_scene->on_input_mouse_move(x, y);
}
case AMOTION_EVENT_ACTION_BUTTON_PRESS:
case AMOTION_EVENT_ACTION_BUTTON_RELEASE: {
uint32_t buttons = (uint32_t)AMotionEvent_getButtonState(event);
auto button_diff = buttons ^ buttons_before;
bool ret_val = false;
for (uint8_t i = 0; i < 3; ++i)
{
auto i_shifted = (1u << i);
if ((button_diff & i_shifted) != 0)
{
if ((buttons & i_shifted) != 0)
ret_val = current_scene->on_input_button_down(i);
else
ret_val = current_scene->on_input_button_up(i);
}
}
buttons_before = buttons;
return ret_val;
}
case AMOTION_EVENT_ACTION_SCROLL: {
float h = AMotionEvent_getAxisValue(event, AMOTION_EVENT_AXIS_HSCROLL, 0);
float v = AMotionEvent_getAxisValue(event, AMOTION_EVENT_AXIS_VSCROLL, 0);
return current_scene->on_input_scroll(h, v);
}
default:
return false;
}
}
return false;
}
bool try_clear_exception(JNIEnv * env, const char * where)
{
if (env->ExceptionCheck())
{
spdlog::error("[pointer_capture] Exception at {}", where);
env->ExceptionDescribe(); // logs to logcat
env->ExceptionClear();
return true;
}
return false;
}
void make_decor_view_call(ANativeActivity * activity, const char * method_name)
{
if (!activity || !activity->vm || !activity->env || !activity->clazz)
{
spdlog::error("[pointer_capture] Invalid ANativeActivity* or missing VM/Activity");
return;
}
JNIEnv * env = activity->env;
jobject act = activity->clazz;
jclass clsActivity = env->GetObjectClass(act);
jclass clsWindow = 0;
jobject window = 0;
jclass clsView = 0;
jobject decor = 0;
do
{
if (try_clear_exception(env, "GetObjectClass(Activity)") || not clsActivity)
break; // goto cleanup
jmethodID midGetWindow = env->GetMethodID(clsActivity, "getWindow", "()Landroid/view/Window;");
if (try_clear_exception(env, "Activity.getWindow() method lookup") || not midGetWindow)
break; // goto cleanup
window = env->CallObjectMethod(act, midGetWindow);
if (try_clear_exception(env, "Activity.getWindow() call") || not window)
break; // goto cleanup
clsWindow = env->GetObjectClass(window);
if (try_clear_exception(env, "GetObjectClass(Window)") || not clsWindow)
break; // goto cleanup
jmethodID midGetDecor = env->GetMethodID(clsWindow, "getDecorView", "()Landroid/view/View;");
if (try_clear_exception(env, "Window.getDecorView() method lookup") || not midGetDecor)
break; // goto cleanup
decor = env->CallObjectMethod(window, midGetDecor);
if (try_clear_exception(env, "Window.getDecorView() call") || not decor)
break; // goto cleanup
clsView = env->GetObjectClass(decor);
if (try_clear_exception(env, "GetObjectClass(DecorView)") || not clsView)
break; // goto cleanup
jmethodID midAction = env->GetMethodID(clsView, method_name, "()V");
if (try_clear_exception(env, "View method lookup") || not midAction)
break; // goto cleanup
env->CallVoidMethod(decor, midAction);
if (try_clear_exception(env, "View method call"))
break; // goto cleanup
spdlog::info("[pointer_capture] {}() invoked successfully", method_name);
} while (false);
// cleanup
if (clsView)
env->DeleteLocalRef(clsView);
if (decor)
env->DeleteLocalRef(decor);
if (clsWindow)
env->DeleteLocalRef(clsWindow);
if (window)
env->DeleteLocalRef(window);
if (clsActivity)
env->DeleteLocalRef(clsActivity);
}
void android_hid::request_pointer_capture(ANativeActivity * activity)
{
make_decor_view_call(activity, "requestPointerCapture");
}
void android_hid::release_pointer_capture(ANativeActivity * activity)
{
make_decor_view_call(activity, "releasePointerCapture");
}
+24
View File
@@ -0,0 +1,24 @@
#pragma once
#include "scene.h"
#include <android_native_app_glue.h>
#include <cstdint>
#include <linux/input-event-codes.h>
#include <mutex>
#include <vector>
namespace android_hid
{
void request_pointer_capture(ANativeActivity * activity);
void release_pointer_capture(ANativeActivity * activity);
class input_handler
{
uint32_t buttons_before = 0;
public:
bool handle_input(scene * current_scene, AInputEvent * event);
};
} // namespace android_hid
+71
View File
@@ -0,0 +1,71 @@
/*
* WiVRn VR streaming
* Copyright (C) 2025 Guillaume Meunier <guillaume.meunier@centraliens.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "intent.h"
#include "application.h"
#include <unordered_map>
static int next_request_code;
static std::unordered_map<int, std::function<void(int, intent &&)>> callbacks;
intent::intent(const char * intent_type) :
obj(jni::new_object<"android/content/Intent">(jni::string{intent_type}))
{
}
intent::intent(jobject jni_obj) :
obj(jni_obj)
{
}
void intent::set_type(const char * type)
{
obj.call<jni::object<"android/content/Intent">>("setType", jni::string{type});
}
void intent::add_category(const char * category)
{
obj.call<jni::object<"android/content/Intent">>("addCategory", jni::string{category});
}
void intent::start(std::function<void(int, intent &&)> callback)
{
int request_code = next_request_code++;
callbacks.emplace(request_code, std::move(callback));
jni::object<""> activity(application::native_app()->activity->clazz);
activity.call<void>("startActivityForResult", obj, jni::Int{request_code});
}
jni::object<"android/net/Uri"> intent::get_uri()
{
return obj.call<jni::object<"android/net/Uri">>("getData");
}
extern "C" void Java_org_meumeu_wivrn_MainActivity_onActivityResult(JNIEnv * env, jobject instance, int request_code, int result_code, jobject data_obj)
{
auto it = callbacks.find(request_code);
if (it == callbacks.end())
return;
it->second(result_code, intent{data_obj});
callbacks.erase(it);
}
+38
View File
@@ -0,0 +1,38 @@
/*
* WiVRn VR streaming
* Copyright (C) 2025 Guillaume Meunier <guillaume.meunier@centraliens.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include "jnipp.h"
#include <functional>
class intent
{
jni::object<"android/content/Intent"> obj;
public:
intent(const char * intent_type);
intent(jobject);
void set_type(const char * type);
void add_category(const char * category);
void start(std::function<void(int, intent &&)> callback);
jni::object<"android/net/Uri"> get_uri();
};
+36
View File
@@ -0,0 +1,36 @@
/*
* WiVRn VR streaming
* Copyright (C) 2025 Guillaume Meunier <guillaume.meunier@centraliens.net>
* Copyright (C) 2025 Patrick Nicolas <patricknicolas@laposte.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "jnipp.h"
namespace jni::details
{
void handle_java_exception()
{
auto & env = jni_thread::env();
if (auto exc = env.ExceptionOccurred())
{
env.ExceptionClear();
std::string str = object<"java/lang/Object">{exc}.call<jni::string>("toString");
throw std::runtime_error("Java exception " + str);
}
}
} // namespace jni::details
+81 -28
View File
@@ -25,6 +25,7 @@
#include <tuple>
#include <jni.h>
#include <type_traits>
namespace jni
{
@@ -85,6 +86,31 @@ struct Void
constexpr static const auto call_static_method = &_JNIEnv::CallStaticVoidMethod;
};
struct Int
{
constexpr static auto static_field = &_JNIEnv::GetStaticIntField;
constexpr static auto obj_field = &_JNIEnv::GetIntField;
constexpr static const auto call_method = &_JNIEnv::CallIntMethod;
constexpr static const auto call_static_method = &_JNIEnv::CallStaticIntMethod;
static std::string type()
{
return "I";
}
int value;
int handle() const
{
return value;
}
operator int() const
{
return value;
}
};
namespace details
{
@@ -139,8 +165,17 @@ struct type_map<void>
using type = jni::Void;
};
template <>
struct type_map<int>
{
using type = jni::Int;
};
template <typename T>
using type_map_t = type_map<T>::type;
void handle_java_exception();
} // namespace details
struct klass
@@ -185,7 +220,17 @@ struct klass
assert(method_id);
auto handles = details::handle(std::forward<Args>(args)...);
return R(std::apply([&](auto &... t) {
return (env.*R1::call_static_method)(*this, method_id, t...);
if constexpr (std::is_void_v<R>)
{
(env.*R1::call_static_method)(*this, method_id, t...);
details::handle_java_exception();
}
else
{
auto res = (env.*R1::call_static_method)(*this, method_id, t...);
details::handle_java_exception();
return res;
}
},
handles));
}
@@ -224,30 +269,6 @@ struct Bool
}
};
struct Int
{
constexpr static auto static_field = &_JNIEnv::GetStaticIntField;
constexpr static const auto call_method = &_JNIEnv::CallIntMethod;
constexpr static const auto call_static_method = &_JNIEnv::CallStaticIntMethod;
static std::string type()
{
return "I";
}
int value;
int handle() const
{
return value;
}
operator int() const
{
return value;
}
};
template <details::string_literal Type>
struct object
{
@@ -257,6 +278,7 @@ struct object
}
std::unique_ptr<std::remove_pointer_t<jobject>, details::deleter> self;
constexpr static auto obj_field = &_JNIEnv::GetObjectField;
constexpr static const auto call_method = &_JNIEnv::CallObjectMethod;
constexpr static const auto call_static_method = &_JNIEnv::CallStaticObjectMethod;
@@ -277,7 +299,17 @@ struct object
assert(method_id);
auto handles = details::handle(std::forward<Args>(args)...);
return R(std::apply([&](auto &... t) {
return (env.*R1::call_method)(*this, method_id, t...);
if constexpr (std::is_void_v<R>)
{
(env.*R1::call_method)(*this, method_id, t...);
details::handle_java_exception();
}
else
{
auto res = (env.*R1::call_method)(*this, method_id, t...);
details::handle_java_exception();
return res;
}
},
handles));
}
@@ -290,11 +322,29 @@ struct object
assert(method_id);
auto handles = details::handle(std::forward<Args>(args)...);
return R(std::apply([&](auto &... t) {
return (env.*R1::call_method)(*this, method_id, t...);
if constexpr (std::is_void_v<R>)
{
(env.*R1::call_method)(*this, method_id, t...);
details::handle_java_exception();
}
else
{
auto res = (env.*R1::call_method)(*this, method_id, t...);
details::handle_java_exception();
return res;
}
},
handles));
}
template <typename T>
T field(const std::string & name)
{
auto & env = jni_thread::env();
jfieldID id = env.GetFieldID(klass(), name.c_str(), T::type().c_str());
return T((env.*T::obj_field)(*this, id));
}
jobject handle() const
{
return *this;
@@ -321,7 +371,9 @@ static object<Type> new_object(Args &&... args)
assert(method_id);
auto handles = details::handle(std::forward<Args>(args)...);
return object<Type>(std::apply([&](auto &... t) {
return env.NewObject(klass, method_id, t...);
auto res = env.NewObject(klass, method_id, t...);
details::handle_java_exception();
return res;
},
handles));
}
@@ -332,6 +384,7 @@ struct string : public string_t
{
using string_t::type;
constexpr static auto static_field = &_JNIEnv::GetStaticObjectField;
constexpr static auto obj_field = &_JNIEnv::GetObjectField;
operator jstring()
{
+1 -1
View File
@@ -93,7 +93,7 @@ void request_permission(const char * permission, std::function<void(bool)> callb
}
}
extern "C" __attribute__((visibility("default"))) void Java_org_meumeu_wivrn_MainActivity_onRequestPermissionsResult(
extern "C" void Java_org_meumeu_wivrn_MainActivity_onRequestPermissionsResult(
JNIEnv * env,
jobject instance,
int requestCode,
+38
View File
@@ -0,0 +1,38 @@
/*
* WiVRn VR streaming
* Copyright (C) 2023 Guillaume Meunier <guillaume.meunier@centraliens.net>
* Copyright (C) 2023 Patrick Nicolas <patricknicolas@laposte.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "property.h"
#include "utils/wrap_lambda.h"
#include <sys/system_properties.h>
std::optional<std::string> get_property(const char * property)
{
auto info = __system_property_find(property);
if (not info)
return std::nullopt;
std::string result;
wrap_lambda cb = [&result](const char * name, const char * value, uint32_t serial) {
result = value;
};
__system_property_read_callback(info, cb.userdata_first(), cb);
return result;
}
+6 -10
View File
@@ -1,7 +1,7 @@
/*
* WiVRn VR streaming
* Copyright (C) 2022 Guillaume Meunier <guillaume.meunier@centraliens.net>
* Copyright (C) 2022 Patrick Nicolas <patricknicolas@laposte.net>
* Copyright (C) 2023 Guillaume Meunier <guillaume.meunier@centraliens.net>
* Copyright (C) 2023 Patrick Nicolas <patricknicolas@laposte.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,11 +19,7 @@
#pragma once
#include "actionset.h"
#include "error.h"
#include "instance.h"
#include "session.h"
#include "swapchain.h"
#include "system.h"
#include "xr/check.h"
#include "xr/to_string.h"
#include <optional>
#include <string>
std::optional<std::string> get_property(const char * property);
+61
View File
@@ -0,0 +1,61 @@
/*
* WiVRn VR streaming
* Copyright (C) 2026 Patrick Nicolas <patricknicolas@laposte.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "application.h"
#include "jni.h"
#include <atomic>
#include <spdlog/spdlog.h>
std::atomic_bool link_properties_changed = false;
extern "C" void Java_org_meumeu_wivrn_NetworkInfoCallback_onAvailable(JNIEnv * env, jobject instance, jobject network)
{
spdlog::info("NetworkInfoCallback_onAvailable");
}
extern "C" void Java_org_meumeu_wivrn_NetworkInfoCallback_onBlockedStatusChanged(JNIEnv * env, jobject instance, jobject network, jboolean blocked)
{
spdlog::info("NetworkInfoCallback_onBlockedStatusChanged");
}
extern "C" void Java_org_meumeu_wivrn_NetworkInfoCallback_onCapabilitiesChanged(JNIEnv * env, jobject instance, jobject network, jobject caps)
{
spdlog::info("NetworkInfoCallback_onCapabitilitiesChanged");
}
extern "C" void Java_org_meumeu_wivrn_NetworkInfoCallback_onLinkPropertiesChanged(JNIEnv * env, jobject instance, jobject network, jobject jprops)
{
link_properties_changed = true;
}
extern "C" void Java_org_meumeu_wivrn_NetworkInfoCallback_onLosing(JNIEnv * env, jobject instance, jobject network, jint ms)
{
spdlog::info("NetworkInfoCallback_onLosing");
}
extern "C" void Java_org_meumeu_wivrn_NetworkInfoCallback_onLost(JNIEnv * env, jobject instance, jobject network)
{
spdlog::info("NetworkInfoCallback_onLost");
link_properties_changed = true;
}
extern "C" void Java_org_meumeu_wivrn_NetworkInfoCallback_onUnavailable(JNIEnv * env, jobject instance)
{
spdlog::info("NetworkInfoCallback_onUnavailable");
application::get_config().usb_network = false;
}
bool usb_link_properties_changed()
{
return link_properties_changed.exchange(false);
}
@@ -1,6 +1,6 @@
/*
* WiVRn VR streaming
* Copyright (C) 2024 Guillaume Meunier <guillaume.meunier@centraliens.net>
* Copyright (C) 2026 Patrick Nicolas <patricknicolas@laposte.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,6 +16,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "rectangle_partitionner.h"
#pragma once
#include "moc_rectangle_partitionner.cpp"
bool usb_link_properties_changed();
+688 -297
View File
File diff suppressed because it is too large Load Diff
+86 -133
View File
@@ -19,22 +19,23 @@
#pragma once
#include "configuration.h"
#include "wifi_lock.h"
#include "xr/fb_body_tracker.h"
#include "xr/fb_face_tracker2.h"
#include "xr/hand_tracker.h"
#include "xr/htc_body_tracker.h"
#include "xr/htc_face_tracker.h"
#include "xr/pico_body_tracker.h"
#include "xr/pico_face_tracker.h"
#include "battery.h"
#ifdef __ANDROID__
#include "android/hid.h"
#include <android_native_app_glue.h>
#endif
#include "configuration.h"
#include "hmd_traits.h"
#include "utils/singleton.h"
#include "utils/thread_safe.h"
#include "vk/vk_allocator.h"
#include "xr/xr.h"
#include "wifi_lock.h"
#include "xr/actionset.h"
#include "xr/instance.h"
#include "xr/session.h"
#include "xr/swapchain.h"
#include "xr/system.h"
#include <atomic>
#include <boost/locale/generator.hpp>
#include <boost/locale/gnu_gettext.hpp>
@@ -55,7 +56,7 @@
class scene;
#ifdef __ANDROID__
extern "C" __attribute__((visibility("default"))) void Java_org_meumeu_wivrn_MainActivity_onNewIntent(JNIEnv * env, jobject instance, jobject intent_obj);
extern "C" void Java_org_meumeu_wivrn_MainActivity_onNewIntent(JNIEnv * env, jobject instance, jobject intent_obj);
#endif
struct application_info
@@ -75,14 +76,17 @@ class application : public singleton<application>
{
friend class scene;
private:
#ifdef __ANDROID__
friend __attribute__((visibility("default"))) void Java_org_meumeu_wivrn_MainActivity_onNewIntent(JNIEnv * env, jobject instance, jobject intent_obj);
friend void Java_org_meumeu_wivrn_MainActivity_onNewIntent(JNIEnv * env, jobject instance, jobject intent_obj);
#endif
application_info app_info;
#ifdef __ANDROID__
ANativeWindow * native_window = nullptr;
bool resumed = false;
android_hid::input_handler input_handler{};
#endif
static inline const char engine_name[] = "No engine";
@@ -105,7 +109,7 @@ class application : public singleton<application>
vk::raii::PhysicalDevice vk_physical_device = nullptr;
vk::raii::Device vk_device = nullptr;
uint32_t vk_queue_family_index;
vk::raii::Queue vk_queue = nullptr;
thread_safe<vk::raii::Queue> vk_queue = nullptr;
vk::raii::CommandPool vk_cmdpool = nullptr;
vk::raii::PipelineCache pipeline_cache = nullptr;
vk::PhysicalDeviceProperties physical_device_properties;
@@ -125,38 +129,27 @@ class application : public singleton<application>
xr::actionset xr_actionset;
std::vector<std::tuple<XrAction, XrActionType, std::string>> actions;
bool hand_tracking_supported = false;
xr::hand_tracker left_hand;
xr::hand_tracker right_hand;
bool fb_face_tracking2_supported = false;
xr::fb_face_tracker2 fb_face_tracker2;
bool htc_face_tracking_eye_supported = false;
xr::htc_face_tracker htc_face_tracker_eye;
bool htc_face_tracking_lip_supported = false;
xr::htc_face_tracker htc_face_tracker_lip;
bool pico_face_tracking_supported = false;
xr::pico_face_tracker pico_face_tracker;
std::variant<std::monostate, xr::fb_body_tracker, xr::htc_body_tracker, xr::pico_body_tracker> body_tracker;
std::vector<std::pair<XrPath, xr::space>> generic_trackers;
bool eye_gaze_supported = false;
bool foveation_center_supported = false;
bool foveation_vulkan_supported = false;
bool openxr_post_processing_supported = false;
bool session_running = false;
bool session_focused = false;
bool session_visible = false;
std::optional<std::chrono::steady_clock::time_point> timestamp_unsynchronized; // Timestamp when session_synchronized becomes false
bool debug_extensions_found = false;
std::vector<std::string> xr_extensions;
std::vector<const char *> vk_device_extensions;
std::atomic<bool> exit_requested = false;
std::filesystem::path config_path;
std::filesystem::path cache_path;
std::shared_ptr<wifi_lock> wifi;
std::optional<battery> battery_monitor;
std::mutex server_intent_mutex;
std::optional<wivrn_discover::service> server_intent;
@@ -167,9 +160,11 @@ class application : public singleton<application>
std::chrono::nanoseconds last_scene_cpu_time;
std::optional<configuration> config;
std::optional<configuration> default_config;
boost::locale::generator gen;
boost::locale::gnu_gettext::messages_info messages_info;
hmd_traits runtime_hmd_traits;
private:
void loop();
@@ -196,8 +191,6 @@ private:
vk::raii::DebugReportCallbackEXT debug_report_callback = nullptr;
#endif
void set_server_uri(std::string uri);
public:
using singleton<application>::instance;
application(application_info info);
@@ -216,8 +209,15 @@ public:
{
return instance().app_info.native_app;
}
static android_hid::input_handler & get_input_handler()
{
return instance().input_handler;
}
#endif
void set_server_uri(std::string uri);
static bool is_session_running()
{
return instance().session_running;
@@ -249,7 +249,7 @@ public:
{
return instance().actions;
}
static std::pair<XrAction, XrActionType> get_action(const std::string & name);
static std::pair<XrAction, XrActionType> get_action(std::string_view name);
static std::optional<std::pair<glm::vec3, glm::quat>> locate_controller(XrSpace space, XrSpace reference, XrTime time)
{
@@ -280,15 +280,7 @@ public:
return std::make_pair(position, orientation);
}
static XrPath string_to_path(const std::string & s)
{
return instance().xr_instance.string_to_path(s);
}
static std::string path_to_string(XrPath p)
{
return instance().xr_instance.path_to_string(p);
}
std::optional<XrQuaternionf> locate_gaze(XrTime time);
void run();
@@ -326,6 +318,16 @@ public:
return *instance().wifi;
}
static battery & get_battery_monitor()
{
assert(instance().battery_monitor);
return *instance().battery_monitor;
}
#ifdef __ANDROID__
void set_usb_networking(bool enabled);
#endif
static void ignore_debug_reports_for(void * object)
{
#ifndef NDEBUG
@@ -345,8 +347,9 @@ public:
template <typename T>
static void set_debug_reports_name(const T & object, std::string name)
{
// #ifndef NDEBUG
// if (instance().debug_utils_found)
if (not vk_allocator::instance().has_debug_utils)
return;
const vk::DebugUtilsObjectNameInfoEXT name_info{
.objectType = T::objectType,
.objectHandle = (uint64_t)(typename T::NativeType)object,
@@ -354,23 +357,9 @@ public:
};
instance().vk_device.setDebugUtilsObjectNameEXT(name_info);
// printf("set_debug_reports_name %p, %s\n", object, name.c_str());
// instance().debug_report_object_name[(uint64_t)object] = std::move(name);
// #endif
}
static XrTime now()
{
return instance().xr_instance.now();
}
static uint32_t queue_family_index()
{
return instance().vk_queue_family_index;
}
static vk::raii::Queue & get_queue()
static thread_safe<vk::raii::Queue> & get_queue()
{
return instance().vk_queue;
}
@@ -385,26 +374,26 @@ public:
return intent;
}
static vk::raii::PhysicalDevice & get_physical_device()
{
return instance().vk_physical_device;
}
static const vk::PhysicalDeviceProperties & get_physical_device_properties()
{
return instance().physical_device_properties;
}
static vk::raii::Device & get_device()
{
return instance().vk_device;
}
static vk::raii::Instance & get_vulkan_instance()
{
return instance().vk_instance;
}
static vk::raii::PhysicalDevice & get_physical_device()
{
return instance().vk_physical_device;
}
static xr::system & get_system()
{
return instance().xr_system_id;
}
static vk::raii::PipelineCache & get_pipeline_cache()
{
return instance().pipeline_cache;
@@ -425,84 +414,35 @@ public:
return instance().last_scene_cpu_time;
}
static bool get_hand_tracking_supported()
{
return instance().hand_tracking_supported;
}
static bool get_fb_face_tracking2_supported()
{
return instance().fb_face_tracking2_supported;
}
static bool get_htc_face_tracking_eye_supported()
{
return instance().htc_face_tracking_eye_supported;
}
static bool get_htc_face_tracking_lip_supported()
{
return instance().htc_face_tracking_lip_supported;
}
static bool get_pico_face_tracking_supported()
{
return instance().pico_face_tracking_supported;
}
static bool get_body_tracking_supported()
{
return !std::holds_alternative<std::monostate>(instance().body_tracker);
}
static bool get_eye_gaze_supported()
{
return instance().eye_gaze_supported;
}
static bool get_foveation_center_supported()
{
return instance().foveation_center_supported;
}
static bool get_foveation_vulkan_supported()
{
return instance().foveation_vulkan_supported;
}
static bool get_openxr_post_processing_supported()
{
return instance().openxr_post_processing_supported;
}
static xr::hand_tracker & get_left_hand()
static const hmd_traits & get_hmd_traits()
{
return instance().left_hand;
assert(instance().runtime_hmd_traits.is_initialized());
return instance().runtime_hmd_traits;
}
static xr::hand_tracker & get_right_hand()
static auto & get_generic_trackers()
{
return instance().right_hand;
}
static xr::fb_face_tracker2 & get_fb_face_tracker2()
{
return instance().fb_face_tracker2;
}
static xr::htc_face_tracker & get_htc_face_tracker_eye()
{
return instance().htc_face_tracker_eye;
}
static xr::htc_face_tracker & get_htc_face_tracker_lip()
{
return instance().htc_face_tracker_lip;
}
static xr::pico_face_tracker & get_pico_face_tracker()
{
return instance().pico_face_tracker;
}
static auto & get_body_tracker()
{
return instance().body_tracker;
}
static const std::vector<std::string> & get_xr_extensions()
{
return instance().xr_extensions;
return instance().generic_trackers;
}
static const std::vector<const char *> & get_vk_device_extensions()
@@ -516,8 +456,21 @@ public:
return *instance().config;
}
static configuration & get_default_config()
{
assert(instance().default_config);
return *instance().default_config;
}
static XrSessionState get_session_state()
{
return instance().session_state;
}
static boost::locale::gnu_gettext::messages_info & get_messages_info()
{
return instance().messages_info;
}
void load_locale();
};
-116
View File
@@ -1,116 +0,0 @@
/*
* WiVRn VR streaming
* Copyright (C) 2024 Guillaume Meunier <guillaume.meunier@centraliens.net>
* Copyright (C) 2024 Patrick Nicolas <patricknicolas@laposte.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "asset.h"
#include "application.h"
#include "utils/files.h"
#include <filesystem>
#include <fstream>
#include <spdlog/spdlog.h>
#ifdef __ANDROID__
#include <android/asset_manager.h>
asset::asset(const std::filesystem::path & path)
{
spdlog::debug("Loading Android asset {}", path.string());
android_asset = AAssetManager_open(application::asset_manager(), path.c_str(), AASSET_MODE_BUFFER);
if (!android_asset)
throw std::runtime_error("Cannot open Android asset " + path.string());
bytes = std::span<const std::byte>{reinterpret_cast<const std::byte *>(AAsset_getBuffer(android_asset)), (size_t)AAsset_getLength64(android_asset)};
}
asset::asset(asset && other) :
android_asset(other.android_asset)
{
other.android_asset = nullptr;
}
asset & asset::operator=(asset && other)
{
std::swap(android_asset, other.android_asset);
return *this;
}
asset::~asset()
{
if (android_asset)
AAsset_close(android_asset);
}
#else
static std::filesystem::path get_exe_path()
{
// Linux only: see https://stackoverflow.com/a/1024937
return std::filesystem::read_symlink("/proc/self/exe");
}
static std::filesystem::path get_asset_root()
{
const char * path = std::getenv("WIVRN_ASSET_ROOT");
if (path && strcmp(path, ""))
return path;
return get_exe_path().parent_path().parent_path() / "share" / "wivrn" / "assets";
}
static std::filesystem::path get_locale_root()
{
const char * path = std::getenv("WIVRN_LOCALE_ROOT");
if (path && strcmp(path, ""))
return path;
return get_exe_path().parent_path().parent_path() / "share" / "locale";
}
std::filesystem::path asset::asset_root()
{
static std::filesystem::path root = get_asset_root();
return root;
}
std::filesystem::path asset::locale_root()
{
static std::filesystem::path root = get_locale_root();
return root;
}
asset::asset(const std::filesystem::path & path)
{
assert(path.is_relative());
// TODO mmap
// TODO load only once if it is already loaded
spdlog::debug("Loading file asset {}", path.string());
if (path.native().starts_with("locale/"))
{
bytes = utils::read_whole_file<std::byte>(locale_root() / path.native().substr(7));
}
else
{
bytes = utils::read_whole_file<std::byte>(asset_root() / path);
}
}
#endif
+3 -7
View File
@@ -80,11 +80,7 @@ int32_t wivrn::android::audio::speaker_data_cb(AAudioStream * stream, void * use
{
// Buffer underrun: add 5ms buffer
size_t target_buffer_size = frame_size * AAudioStream_getSampleRate(stream) * 0.005;
#if __cpp_lib_shared_ptr_arrays >= 201707L
self->speaker_tmp.data.c = std::make_shared<uint8_t[]>(target_buffer_size, 0);
#else
self->speaker_tmp.data.c.reset(new uint8_t[target_buffer_size]());
#endif
self->speaker_tmp.payload = std::span(self->speaker_tmp.data.c.get(), target_buffer_size);
self->buffer_size_bytes += target_buffer_size;
spdlog::debug("Audio sync: underrun, add {} bytes buffer",
@@ -159,9 +155,9 @@ void wivrn::android::audio::build_microphone(AAudioStreamBuilder * builder, int3
AAudioStreamBuilder_setSharingMode(builder, AAUDIO_SHARING_MODE_EXCLUSIVE);
AAudioStreamBuilder_setFormat(builder, AAUDIO_FORMAT_PCM_I16);
if (application::get_config().mic_unprocessed_audio)
{
AAudioStreamBuilder_setInputPreset(builder, AAUDIO_INPUT_PRESET_UNPROCESSED);
}
else
AAudioStreamBuilder_setInputPreset(builder, AAUDIO_INPUT_PRESET_VOICE_COMMUNICATION);
AAudioStreamBuilder_setDataCallback(builder, &microphone_data_cb, this);
AAudioStreamBuilder_setErrorCallback(builder, &microphone_error_cb, this);
@@ -291,7 +287,7 @@ void wivrn::android::audio::operator()(wivrn::audio_data && data)
buffer_size_bytes.fetch_add(size);
}
void wivrn::android::audio::set_mic_sate(bool running)
void wivrn::android::audio::set_mic_state(bool running)
{
if (not microphone)
return;
+1 -1
View File
@@ -78,7 +78,7 @@ public:
void operator()(wivrn::audio_data &&);
void set_mic_sate(bool running);
void set_mic_state(bool running);
static void get_audio_description(wivrn::from_headset::headset_info_packet & info);
};
+9 -1
View File
@@ -19,12 +19,20 @@
#pragma once
#include "wivrn_config.h"
#ifdef __ANDROID__
#include "android/audio.h"
namespace wivrn
{
using audio = ::wivrn::android::audio;
}
#elif WIVRN_USE_PIPEWIRE
#include "linux/audio.h"
namespace wivrn
{
using audio = ::wivrn::linux_audio::audio;
}
#else
#include "wivrn_client.h"
@@ -42,7 +50,7 @@ public:
~audio() = default;
void operator()(wivrn::audio_data &&) {}
void set_mic_sate(bool running) {}
void set_mic_state(bool running) {}
static void get_audio_description(wivrn::from_headset::headset_info_packet & info) {}
};
+640
View File
@@ -0,0 +1,640 @@
/*
* WiVRn VR streaming
* Copyright (C) 2026 galister <galister-dev@pm.me>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "audio.h"
#include "utils/named_thread.h"
#include "wivrn_client.h"
#include "xr/instance.h"
#include "spdlog/spdlog.h"
#include <pipewire/pipewire.h>
#include <spa/param/audio/format-utils.h>
#include <spa/utils/result.h>
#include <algorithm>
#include <chrono>
#include <cstring>
#include <format>
#include <memory>
#include <mutex>
#include <stdexcept>
#include <string>
#include <string_view>
#include <vector>
namespace wivrn::linux_audio
{
void pipewire_deleter::operator()(pw_main_loop * loop) const noexcept
{
pw_main_loop_destroy(loop);
}
void pipewire_deleter::operator()(pw_thread_loop * loop) const noexcept
{
pw_thread_loop_destroy(loop);
}
void pipewire_deleter::operator()(pw_stream * stream) const noexcept
{
pw_stream_destroy(stream);
}
namespace
{
constexpr uint32_t default_sample_rate = 48'000;
constexpr uint32_t target_latency_ms = 5;
void init_pipewire()
{
[[maybe_unused]] static bool done = [] {
int argc = 0;
pw_init(&argc, nullptr);
return true;
}();
}
void set_channel_positions(spa_audio_info_raw & info)
{
switch (info.channels)
{
case 1:
info.position[0] = SPA_AUDIO_CHANNEL_MONO;
break;
case 2:
info.position[0] = SPA_AUDIO_CHANNEL_FL;
info.position[1] = SPA_AUDIO_CHANNEL_FR;
break;
default:
info.flags = SPA_AUDIO_FLAG_UNPOSITIONED;
break;
}
}
struct detected_devices
{
bool pipewire = false;
bool speaker = false;
bool microphone = false;
};
struct device_probe
{
pipewire_ptr<pw_main_loop> loop;
int sync_seq = 0;
detected_devices devices;
static void global(
void * userdata,
uint32_t,
uint32_t,
const char * type,
uint32_t,
const spa_dict * props)
{
auto self = static_cast<device_probe *>(userdata);
if (not type or not props or std::string_view(type) != PW_TYPE_INTERFACE_Node)
return;
const char * media_class = spa_dict_lookup(props, PW_KEY_MEDIA_CLASS);
if (not media_class)
return;
if (std::string_view(media_class) == "Audio/Sink")
self->devices.speaker = true;
else if (std::string_view(media_class) == "Audio/Source")
self->devices.microphone = true;
}
static void done(void * userdata, uint32_t id, int seq)
{
auto self = static_cast<device_probe *>(userdata);
if (id == PW_ID_CORE and seq == self->sync_seq)
pw_main_loop_quit(self->loop.get());
}
static void error(void * userdata, uint32_t, int, int, const char *)
{
auto self = static_cast<device_probe *>(userdata);
pw_main_loop_quit(self->loop.get());
}
};
const pw_registry_events probe_registry_events{
.version = PW_VERSION_REGISTRY_EVENTS,
.global = &device_probe::global,
};
const pw_core_events probe_core_events{
.version = PW_VERSION_CORE_EVENTS,
.done = &device_probe::done,
.error = &device_probe::error,
};
detected_devices detect_devices()
{
init_pipewire();
device_probe probe;
probe.loop.reset(pw_main_loop_new(nullptr));
if (not probe.loop)
return {};
pw_context * context = pw_context_new(pw_main_loop_get_loop(probe.loop.get()), nullptr, 0);
if (not context)
return {};
pw_core * core = pw_context_connect(context, nullptr, 0);
if (not core)
{
pw_context_destroy(context);
return {};
}
probe.devices.pipewire = true;
pw_registry * registry = pw_core_get_registry(core, PW_VERSION_REGISTRY, 0);
if (not registry)
{
pw_core_disconnect(core);
pw_context_destroy(context);
return probe.devices;
}
spa_hook registry_listener{};
spa_hook core_listener{};
pw_registry_add_listener(registry, &registry_listener, &probe_registry_events, &probe);
pw_core_add_listener(core, &core_listener, &probe_core_events, &probe);
probe.sync_seq = pw_core_sync(core, PW_ID_CORE, 0);
if (probe.sync_seq >= 0)
pw_main_loop_run(probe.loop.get());
spa_hook_remove(&core_listener);
spa_hook_remove(&registry_listener);
pw_proxy_destroy(reinterpret_cast<pw_proxy *>(registry));
pw_core_disconnect(core);
pw_context_destroy(context);
return probe.devices;
}
std::string rate_string(uint32_t sample_rate)
{
return std::format("1/{}", sample_rate);
}
std::string latency_string(uint32_t sample_rate)
{
const uint32_t frames = std::max<uint32_t>(1, sample_rate * target_latency_ms / 1000);
return std::format("{}/{}", frames, sample_rate);
}
pw_properties * make_properties(
const char * category,
const char * role,
const char * node_name,
const char * description,
uint32_t sample_rate)
{
auto rate = rate_string(sample_rate);
auto latency = latency_string(sample_rate);
return pw_properties_new(
PW_KEY_MEDIA_TYPE,
"Audio",
PW_KEY_MEDIA_CATEGORY,
category,
PW_KEY_MEDIA_ROLE,
role,
PW_KEY_NODE_NAME,
node_name,
PW_KEY_NODE_DESCRIPTION,
description,
PW_KEY_NODE_RATE,
rate.c_str(),
PW_KEY_NODE_LATENCY,
latency.c_str(),
nullptr);
}
void throw_connect_error(const char * name, int result)
{
throw std::runtime_error(std::format("Failed to connect PipeWire {} stream: {}", name, spa_strerror(result)));
}
} // namespace
const pw_stream_events audio::speaker_events{
.version = PW_VERSION_STREAM_EVENTS,
.process = &audio::speaker_process,
};
const pw_stream_events audio::microphone_events{
.version = PW_VERSION_STREAM_EVENTS,
.process = &audio::microphone_process,
};
void audio::build_speaker(const to_headset::audio_stream_description::device & device)
{
speaker.reset(pw_stream_new_simple(
pw_thread_loop_get_loop(loop.get()),
"WiVRn",
make_properties(
"Playback",
"Game",
"wivrn-client-speaker",
"WiVRn headset audio",
device.sample_rate),
&speaker_events,
this));
if (not speaker)
throw std::runtime_error("Failed to create PipeWire speaker stream");
std::vector<uint8_t> buffer(1024);
spa_pod_builder builder = SPA_POD_BUILDER_INIT(buffer.data(), uint32_t(buffer.size()));
spa_audio_info_raw audio_info{
.format = SPA_AUDIO_FORMAT_S16,
.rate = device.sample_rate,
.channels = device.num_channels,
};
set_channel_positions(audio_info);
const spa_pod * params[] = {
spa_format_audio_raw_build(&builder, SPA_PARAM_EnumFormat, &audio_info),
};
const int result = pw_stream_connect(
speaker.get(),
PW_DIRECTION_OUTPUT,
PW_ID_ANY,
pw_stream_flags(PW_STREAM_FLAG_AUTOCONNECT | PW_STREAM_FLAG_MAP_BUFFERS | PW_STREAM_FLAG_RT_PROCESS),
params,
1);
if (result < 0)
throw_connect_error("speaker", result);
spdlog::info(
"PipeWire speaker stream created: {} channels at {} Hz ({} ms target latency)",
device.num_channels,
device.sample_rate,
target_latency_ms);
}
void audio::build_microphone(const to_headset::audio_stream_description::device & device)
{
microphone.reset(pw_stream_new_simple(
pw_thread_loop_get_loop(loop.get()),
"WiVRn",
make_properties(
"Capture",
"Communication",
"wivrn-client-microphone",
"WiVRn headset microphone",
device.sample_rate),
&microphone_events,
this));
if (not microphone)
throw std::runtime_error("Failed to create PipeWire microphone stream");
std::vector<uint8_t> buffer(1024);
spa_pod_builder builder = SPA_POD_BUILDER_INIT(buffer.data(), uint32_t(buffer.size()));
spa_audio_info_raw audio_info{
.format = SPA_AUDIO_FORMAT_S16,
.rate = device.sample_rate,
.channels = device.num_channels,
};
set_channel_positions(audio_info);
const spa_pod * params[] = {
spa_format_audio_raw_build(&builder, SPA_PARAM_EnumFormat, &audio_info),
};
const int result = pw_stream_connect(
microphone.get(),
PW_DIRECTION_INPUT,
PW_ID_ANY,
pw_stream_flags(PW_STREAM_FLAG_AUTOCONNECT | PW_STREAM_FLAG_INACTIVE | PW_STREAM_FLAG_MAP_BUFFERS),
params,
1);
if (result < 0)
throw_connect_error("microphone", result);
spdlog::info(
"PipeWire microphone stream created: {} channels at {} Hz ({} ms target latency)",
device.num_channels,
device.sample_rate,
target_latency_ms);
}
audio::audio(
const wivrn::to_headset::audio_stream_description & desc,
wivrn_session & session,
xr::instance & instance) :
desc(desc), session(session), instance(instance)
{
init_pipewire();
loop.reset(pw_thread_loop_new("WiVRn audio", nullptr));
if (not loop)
throw std::runtime_error("Failed to create PipeWire thread loop");
pw_thread_loop_lock(loop.get());
const int start_result = pw_thread_loop_start(loop.get());
if (start_result < 0)
{
pw_thread_loop_unlock(loop.get());
loop.reset();
throw std::runtime_error(std::format("Failed to start PipeWire thread loop: {}", spa_strerror(start_result)));
}
try
{
if (desc.speaker)
build_speaker(*desc.speaker);
if (desc.microphone)
build_microphone(*desc.microphone);
}
catch (...)
{
speaker.reset();
microphone.reset();
pw_thread_loop_unlock(loop.get());
pw_thread_loop_stop(loop.get());
loop.reset();
throw;
}
pw_thread_loop_unlock(loop.get());
if (microphone)
microphone_thread = utils::named_thread("wivrn-mic-send", &audio::microphone_sender, this);
}
audio::~audio()
{
exiting = true;
microphone_cv.notify_all();
shutdown_pipewire();
if (microphone_thread.joinable())
microphone_thread.join();
}
void audio::shutdown_pipewire()
{
if (not loop)
return;
pw_thread_loop_lock(loop.get());
speaker.reset();
microphone.reset();
pw_thread_loop_unlock(loop.get());
pw_thread_loop_stop(loop.get());
loop.reset();
}
void audio::operator()(wivrn::audio_data && data)
{
if (not desc.speaker)
return;
const auto size = data.payload.size_bytes();
speaker_buffer_size_bytes.fetch_add(size, std::memory_order_relaxed);
if (not speaker_samples.write(std::move(data)))
speaker_buffer_size_bytes.fetch_sub(size, std::memory_order_relaxed);
}
void audio::set_mic_state(bool running)
{
if (not microphone or not loop)
return;
const bool old = mic_running.exchange(running);
if (old == running)
return;
pw_thread_loop_lock(loop.get());
const int result = pw_stream_set_active(microphone.get(), running);
pw_thread_loop_unlock(loop.get());
if (result < 0)
{
mic_running = old;
spdlog::warn("Failed to {} PipeWire microphone: {}", running ? "start" : "stop", spa_strerror(result));
}
microphone_cv.notify_one();
}
void audio::speaker_process(void * userdata)
{
auto self = static_cast<audio *>(userdata);
if (not self->speaker)
return;
pw_buffer * buffer = pw_stream_dequeue_buffer(self->speaker.get());
if (not buffer)
return;
if (not buffer->buffer or buffer->buffer->n_datas == 0)
{
pw_stream_queue_buffer(self->speaker.get(), buffer);
return;
}
auto & data = buffer->buffer->datas[0];
if (not data.data or not data.chunk or not self->desc.speaker)
{
pw_stream_queue_buffer(self->speaker.get(), buffer);
return;
}
const size_t frame_size = self->desc.speaker->num_channels * sizeof(int16_t);
if (frame_size == 0)
{
pw_stream_queue_buffer(self->speaker.get(), buffer);
return;
}
size_t num_frames = data.maxsize / frame_size;
if (buffer->requested)
num_frames = std::min<size_t>(num_frames, buffer->requested);
const size_t requested_bytes = num_frames * frame_size;
auto * output = static_cast<uint8_t *>(data.data);
size_t written = 0;
while (written < requested_bytes)
{
if (self->speaker_current.payload.empty())
{
auto next = self->speaker_samples.read();
if (not next)
break;
self->speaker_current = std::move(*next);
}
const size_t count = std::min(self->speaker_current.payload.size_bytes(), requested_bytes - written);
std::memcpy(output + written, self->speaker_current.payload.data(), count);
self->speaker_current.payload = self->speaker_current.payload.subspan(count);
written += count;
self->speaker_buffer_size_bytes.fetch_sub(count, std::memory_order_relaxed);
}
if (written < requested_bytes)
std::memset(output + written, 0, requested_bytes - written);
data.chunk->offset = 0;
data.chunk->stride = frame_size;
data.chunk->size = requested_bytes;
pw_stream_queue_buffer(self->speaker.get(), buffer);
// more than 50 ms accumulated → drop queued packets until about 30 ms remain
const size_t high_watermark = frame_size * self->desc.speaker->sample_rate * 50 / 1000;
const size_t target = frame_size * self->desc.speaker->sample_rate * 30 / 1000;
if (self->speaker_buffer_size_bytes.load(std::memory_order_relaxed) > high_watermark)
{
while (self->speaker_buffer_size_bytes.load(std::memory_order_relaxed) > target and self->speaker_samples.size() > 1)
{
auto dropped = self->speaker_samples.read();
if (not dropped)
break;
self->speaker_buffer_size_bytes.fetch_sub(dropped->payload.size_bytes(), std::memory_order_relaxed);
}
}
}
void audio::microphone_process(void * userdata)
{
auto self = static_cast<audio *>(userdata);
if (not self->microphone)
return;
pw_buffer * buffer = pw_stream_dequeue_buffer(self->microphone.get());
if (not buffer)
return;
if (not buffer->buffer or buffer->buffer->n_datas == 0)
{
pw_stream_queue_buffer(self->microphone.get(), buffer);
return;
}
auto & data = buffer->buffer->datas[0];
if (data.data and data.chunk and data.chunk->size != 0 and self->desc.microphone)
{
const size_t frame_size = self->desc.microphone->num_channels * sizeof(int16_t);
const size_t offset = std::min<size_t>(data.chunk->offset, data.maxsize);
size_t size = std::min<size_t>(data.chunk->size, data.maxsize - offset);
if (frame_size != 0)
size -= size % frame_size;
if (size != 0)
{
wivrn::audio_data packet;
packet.timestamp = self->instance.now();
packet.data.c = std::make_shared_for_overwrite<uint8_t[]>(size);
packet.payload = std::span(packet.data.c.get(), size);
std::memcpy(packet.payload.data(), static_cast<uint8_t *>(data.data) + offset, size);
self->microphone_buffer_size_bytes.fetch_add(size, std::memory_order_relaxed);
if (self->microphone_samples.write(std::move(packet)))
self->microphone_cv.notify_one();
else
self->microphone_buffer_size_bytes.fetch_sub(size, std::memory_order_relaxed);
}
}
pw_stream_queue_buffer(self->microphone.get(), buffer);
}
void audio::microphone_sender()
{
const size_t frame_size = desc.microphone ? desc.microphone->num_channels * sizeof(int16_t) : 0;
const size_t high_watermark = desc.microphone ? frame_size * desc.microphone->sample_rate * 50 / 1000 : 0;
const size_t target = desc.microphone ? frame_size * desc.microphone->sample_rate * 30 / 1000 : 0;
while (not exiting)
{
if (not mic_running)
{
while (auto dropped = microphone_samples.read())
microphone_buffer_size_bytes.fetch_sub(dropped->payload.size_bytes(), std::memory_order_relaxed);
}
else if (high_watermark != 0 and microphone_buffer_size_bytes.load(std::memory_order_relaxed) > high_watermark)
{
while (microphone_buffer_size_bytes.load(std::memory_order_relaxed) > target and microphone_samples.size() > 1)
{
auto dropped = microphone_samples.read();
if (not dropped)
break;
microphone_buffer_size_bytes.fetch_sub(dropped->payload.size_bytes(), std::memory_order_relaxed);
}
}
while (mic_running)
{
auto packet = microphone_samples.read();
if (not packet)
break;
microphone_buffer_size_bytes.fetch_sub(packet->payload.size_bytes(), std::memory_order_relaxed);
try
{
session.send_control(std::move(*packet));
}
catch (const std::exception & e)
{
if (not exiting)
spdlog::debug("Failed to send microphone audio: {}", e.what());
exiting = true;
break;
}
}
std::unique_lock lock(microphone_mutex);
microphone_cv.wait_for(lock, std::chrono::milliseconds(20), [this]() {
return exiting or microphone_samples.size() != 0;
});
}
}
void audio::get_audio_description(wivrn::from_headset::headset_info_packet & info)
{
const auto devices = detect_devices();
if (not devices.pipewire)
{
spdlog::warn("PipeWire is unavailable, disabling client audio");
return;
}
if (devices.speaker)
{
info.speaker = {
.num_channels = 2,
.sample_rate = default_sample_rate,
};
}
if (devices.microphone)
{
info.microphone = {
.num_channels = 1,
.sample_rate = default_sample_rate,
};
}
}
} // namespace wivrn::linux_audio
+99
View File
@@ -0,0 +1,99 @@
/*
* WiVRn VR streaming
* Copyright (C) 2026 galister <galister-dev@pm.me>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include "utils/ring_buffer.h"
#include "wivrn_packets.h"
#include <atomic>
#include <condition_variable>
#include <cstddef>
#include <memory>
#include <mutex>
#include <thread>
struct pw_main_loop;
struct pw_stream;
struct pw_stream_events;
struct pw_thread_loop;
class wivrn_session;
namespace xr
{
class instance;
}
namespace wivrn::linux_audio
{
struct pipewire_deleter
{
void operator()(pw_main_loop * loop) const noexcept;
void operator()(pw_thread_loop * loop) const noexcept;
void operator()(pw_stream * stream) const noexcept;
};
template <typename T>
using pipewire_ptr = std::unique_ptr<T, pipewire_deleter>;
class audio
{
static void speaker_process(void * userdata);
static void microphone_process(void * userdata);
static const pw_stream_events speaker_events;
static const pw_stream_events microphone_events;
void build_speaker(const to_headset::audio_stream_description::device & device);
void build_microphone(const to_headset::audio_stream_description::device & device);
void microphone_sender();
void shutdown_pipewire();
to_headset::audio_stream_description desc;
wivrn_session & session;
xr::instance & instance;
pipewire_ptr<pw_thread_loop> loop;
pipewire_ptr<pw_stream> speaker;
pipewire_ptr<pw_stream> microphone;
utils::ring_buffer<wivrn::audio_data, 100> speaker_samples;
std::atomic<size_t> speaker_buffer_size_bytes = 0;
wivrn::audio_data speaker_current;
utils::ring_buffer<wivrn::audio_data, 100> microphone_samples;
std::atomic<size_t> microphone_buffer_size_bytes = 0;
std::mutex microphone_mutex;
std::condition_variable microphone_cv;
std::atomic<bool> exiting = false;
std::atomic<bool> mic_running = false;
std::thread microphone_thread;
public:
audio(const audio &) = delete;
audio & operator=(const audio &) = delete;
audio(const wivrn::to_headset::audio_stream_description &, wivrn_session &, xr::instance &);
~audio();
void operator()(wivrn::audio_data &&);
void set_mic_state(bool running);
static void get_audio_description(wivrn::from_headset::headset_info_packet & info);
};
} // namespace wivrn::linux_audio
+108
View File
@@ -0,0 +1,108 @@
/*
* WiVRn VR streaming
* Copyright (C) 2026 Sapphire <imsapphire0@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "battery.h"
#include "application.h"
#include "scene.h"
#include <chrono>
#include <magic_enum.hpp>
#include <spdlog/spdlog.h>
battery::battery(xr::instance & instance, xr::session & session) :
session(session)
{
if (instance.has_extension(XR_EXT_INTERACTION_PROFILE_BATTERY_STATE_DISPLAY_EXTENSION_NAME))
{
top_level_paths.emplace({
std::make_pair(instance.string_to_path("/user/hand/left"), device::left_controller),
std::make_pair(instance.string_to_path("/user/hand/right"), device::right_controller),
std::make_pair(instance.string_to_path("/user/gamepad"), device::gamepad),
});
}
}
void battery::poll_batteries()
{
using namespace std::chrono_literals;
auto now = std::chrono::steady_clock::now();
if (now - last_poll < 10s)
return;
last_poll = now;
spdlog::debug("Polling batteries");
std::lock_guard lock(m);
#ifndef __ANDROID__
{
battery_status status = get_hmd_battery();
if (status != statuses.at(device::head))
{
on_status_update(device::head, std::move(status));
}
}
#endif
if (top_level_paths)
{
for (auto [path, device]: *top_level_paths)
{
XrBatteryStateDisplayEXT battery_state{
.type = XR_TYPE_BATTERY_STATE_DISPLAY_EXT,
};
XrInteractionProfileState profile_state{
.type = XR_TYPE_INTERACTION_PROFILE_STATE,
.next = &battery_state,
};
try
{
CHECK_XR(xrGetCurrentInteractionProfile(session, path, &profile_state));
}
catch (std::exception & e)
{
spdlog::warn("Failed to get battery charge state for device {}: {}", magic_enum::enum_name(device), e.what());
continue;
}
std::optional<float> charge{};
if (battery_state.stateFlags & XR_BATTERY_STATE_DISPLAY_STATE_VALID_BIT_EXT)
charge = battery_state.batteryLevel;
battery_status status{
.charge = charge,
.charging = (battery_state.stateFlags & XR_BATTERY_STATE_DISPLAY_STATE_CHARGING_BIT_EXT) != 0,
};
if (status != statuses.at(device))
{
on_status_update(device, std::move(status));
}
}
}
}
void battery::on_status_update(battery::device device, battery::battery_status && new_status)
{
std::lock_guard lock(m);
if (std::shared_ptr<scene> s = application::instance().current_scene())
{
s->on_battery_update(device, new_status);
}
statuses.at(device) = std::move(new_status);
}
+87
View File
@@ -0,0 +1,87 @@
/*
* WiVRn VR streaming
* Copyright (C) 2024 Guillaume Meunier <guillaume.meunier@centraliens.net>
* Copyright (C) 2024 Patrick Nicolas <patricknicolas@laposte.net>
* Copyright (C) 2026 Sapphire <imsapphire0@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include "xr/instance.h"
#include "xr/session.h"
#ifdef __ANDROID__
#include "jni.h"
#endif
#include <chrono>
#include <inplace_vector.hpp>
#include <magic_enum_containers.hpp>
#include <mutex>
#include <optional>
class battery
{
public:
enum device : uint8_t
{
head = 0,
left_controller,
right_controller,
gamepad,
};
struct battery_status
{
std::optional<float> charge = std::nullopt;
bool charging = false;
bool operator!=(const battery_status & other) const
{
return charge != other.charge || charging != other.charging;
}
};
battery(xr::instance & instance, xr::session & session);
#ifdef __ANDROID__
battery(xr::instance & instance, xr::session & session, jobject activity);
#endif
private:
xr::session & session;
std::optional<beman::inplace_vector::inplace_vector<std::pair<XrPath, device>, 3>> top_level_paths;
std::recursive_mutex m;
magic_enum::containers::array<device, battery_status> statuses;
// we need to poll for controller batteries, there's no XR event sent when their state changes
// linux implementation also doesn't have an event-based API for battery
std::chrono::steady_clock::time_point last_poll{};
#ifndef __ANDROID__
battery_status get_hmd_battery();
#endif
public:
void poll_batteries();
// updates statuses and sends the new battery status to the focused scene
void on_status_update(device device, battery_status && new_status);
inline battery_status get_battery_status(device device)
{
std::lock_guard lock(m);
return statuses.at(device);
};
};
+291 -200
View File
@@ -19,69 +19,146 @@
#include "configuration.h"
#include "application.h"
#include "utils/contains.h"
#include "utils/json_string.h"
#include "wivrn_packets.h"
#include <fstream>
#include <functional>
#include <magic_enum.hpp>
#include <string_view>
#include <type_traits>
#include <vector>
#ifdef __ANDROID__
#include "android/permissions.h"
#endif
static std::string json_string(const std::string & in)
// If no refresh rate is configured, don't select a too high one
static const float max_default_rate = 100;
// key <-> member serialization descriptor for scalar settings (see config_fields()).
// The few settings that aren't scalars are handled explicitly in save()/load().
struct config_field
{
std::string out;
out.reserve(in.size() + 2);
std::function<void(std::ostream &, const configuration &)> save;
std::function<void(simdjson::dom::element, configuration &)> load;
};
out += '"';
namespace
{
template <typename>
inline constexpr bool is_optional_v = false;
template <typename T>
inline constexpr bool is_optional_v<std::optional<T>> = true;
for (char c: in)
template <typename T>
struct remove_optional
{
using type = T;
};
template <typename T>
struct remove_optional<std::optional<T>>
{
using type = T;
};
std::ostream & operator<<(std::ostream & stream, feature f)
{
return stream << "\"" << magic_enum::enum_name(f) << "\"";
}
template <typename T>
void write_value(std::ostream & json, const T & value)
{
if constexpr (std::is_same_v<T, bool>)
json << std::boolalpha << value;
else if constexpr (std::is_same_v<T, std::string>)
json << json_string(value);
else if constexpr (std::is_enum_v<T>)
json << json_string(magic_enum::enum_name(value));
else if constexpr (std::is_integral_v<T>)
json << (uint64_t)value;
else // floating point
json << value;
}
template <typename T>
std::optional<T> read_value(simdjson::simdjson_result<simdjson::dom::element> val)
{
if constexpr (std::is_same_v<T, bool>)
{
switch (c)
if (val.is_bool())
return val.get_bool();
}
else if constexpr (std::is_same_v<T, std::string>)
{
if (val.is_string())
return std::string(std::string_view(val.get_string().value()));
}
else if constexpr (std::is_enum_v<T>)
{
if (val.is_string())
{
case '\b':
out += "\\b";
break;
case '\f':
out += "\\f";
break;
case '\n':
out += "\\n";
break;
case '\r':
out += "\\r";
break;
case '\t':
out += "\\t";
break;
case '"':
out += "\\\"";
break;
case '\\':
out += "\\\\";
break;
default:
out += c;
break;
auto name = val.get_string().value();
for (const auto & [e, n]: magic_enum::enum_entries<T>())
if (name == n)
return e;
}
}
out += '"';
return out;
else if constexpr (std::is_integral_v<T>)
{
if (val.is_uint64())
return (T)val.get_uint64();
if (val.is_int64() and int64_t(val.get_int64()) >= 0)
return (T)val.get_int64();
}
else // floating point
{
if (val.is_double())
return (T)val.get_double();
if (val.is_int64())
return (T)val.get_int64();
if (val.is_uint64())
return (T)val.get_uint64();
}
return std::nullopt;
}
// build a field for a plain member: bool / float / integral / std::string / enum,
// optionally wrapped in std::optional (only written when set)
template <typename T>
config_field scalar(const char * key, T configuration::* member)
{
return {
.save = [key, member](std::ostream & json, const configuration & c) {
if constexpr (is_optional_v<T>)
{
if (c.*member)
{
json << ",\"" << key << "\":";
write_value(json, *(c.*member));
}
}
else
{
json << ",\"" << key << "\":";
write_value(json, c.*member);
} },
.load = [key, member](simdjson::dom::element root, configuration & c) {
if (auto v = read_value<typename remove_optional<T>::type>(root[key]))
c.*member = *v; },
};
}
} // namespace
bool configuration::check_feature(feature f) const
{
{
std::lock_guard lock(mutex);
auto & system = application::get_system();
auto it = features.find(f);
if (it == features.end())
return false;
@@ -94,7 +171,7 @@ bool configuration::check_feature(feature f) const
case feature::microphone:
break;
case feature::hand_tracking:
if (not application::get_hand_tracking_supported())
if (not system.hand_tracking_supported())
return false;
break;
case feature::eye_gaze:
@@ -102,56 +179,17 @@ bool configuration::check_feature(feature f) const
return false;
break;
case feature::face_tracking:
switch (guess_model())
{
case model::htc_vive_focus_3:
case model::htc_vive_focus_vision:
[[fallthrough]];
case model::htc_vive_xr_elite:
if (not(application::get_htc_face_tracking_eye_supported() or application::get_htc_face_tracking_lip_supported()))
return false;
break;
case model::pico_4_pro:
case model::pico_4_enterprise:
if (not application::get_pico_face_tracking_supported())
return false;
break;
default:
if (not application::get_fb_face_tracking2_supported())
return false;
break;
}
if (system.face_tracker_supported() == xr::face_tracker_type::none)
return false;
break;
case feature::body_tracking:
switch (guess_model())
{
case model::meta_quest_3:
case model::meta_quest_3s:
if (not std::holds_alternative<xr::fb_body_tracker>(application::get_body_tracker()))
return false;
break;
case model::htc_vive_focus_3:
case model::htc_vive_xr_elite:
case model::htc_vive_focus_vision:
if (not std::holds_alternative<xr::htc_body_tracker>(application::get_body_tracker()))
return false;
break;
case model::pico_neo_3:
case model::pico_4:
case model::pico_4s:
case model::pico_4_pro:
case model::pico_4_enterprise:
if (not std::holds_alternative<xr::pico_body_tracker>(application::get_body_tracker()))
return false;
break;
default:
break;
}
if (system.body_tracker_supported() == xr::body_tracker_type::none)
return false;
break;
}
}
#ifdef __ANDROID__
return check_permission(permission_name(f));
return check_permission(application::get_hmd_traits().permission_name(f));
#else
return true;
#endif
@@ -162,7 +200,7 @@ void configuration::set_feature(feature f, bool state)
#ifdef __ANDROID__
if (state)
{
request_permission(permission_name(f), [this, f](bool granted) {
request_permission(application::get_hmd_traits().permission_name(f), [this, f](bool granted) {
{
std::lock_guard lock(mutex);
features[f] = granted;
@@ -180,14 +218,28 @@ void configuration::set_feature(feature f, bool state)
save();
}
configuration::configuration(xr::system & system)
configuration::configuration(xr::system & system, xr::session & session)
{
passthrough_enabled = system.passthrough_supported() == xr::passthrough_type::color;
features[feature::hand_tracking] = system.hand_tracking_supported();
const auto & rates = session.get_refresh_rates();
preferred_refresh_rate = rates.empty() ? 0 : rates[0];
for (auto rate: rates)
{
if (rate >= max_default_rate)
break;
preferred_refresh_rate = rate;
}
}
configuration::configuration(xr::system & system, xr::session & session, const std::filesystem::path & config_path) :
configuration(system, session)
{
passthrough_enabled = system.passthrough_supported() == xr::system::passthrough_type::color;
features[feature::hand_tracking] = application::get_hand_tracking_supported();
try
{
simdjson::dom::parser parser;
simdjson::dom::element root = parser.load(application::get_config_path() / "client.json");
simdjson::dom::element root = parser.load(config_path.native());
for (simdjson::dom::object i: simdjson::dom::array(root["servers"]))
{
server_data data{
@@ -206,114 +258,102 @@ configuration::configuration(xr::system & system)
servers.emplace(data.service.txt["cookie"], data);
}
if (auto val = root["show_performance_metrics"]; val.is_bool())
show_performance_metrics = val.get_bool();
float default_refresh_rate = preferred_refresh_rate;
if (auto val = root["preferred_refresh_rate"]; val.is_double())
preferred_refresh_rate = val.get_double();
for (const auto & f: config_fields())
f.load(root, *this);
if (auto val = root["minimum_refresh_rate"]; val.is_double())
minimum_refresh_rate = val.get_double();
// refresh rate must be supported by this headset, otherwise fall back to the default
const auto & rates = session.get_refresh_rates();
if (preferred_refresh_rate != 0 and not utils::contains(rates, preferred_refresh_rate))
preferred_refresh_rate = default_refresh_rate;
if (auto val = root["resolution_scale"]; val.is_double())
resolution_scale = val.get_double();
if (auto val = root["sgsr"]; val.is_object())
parse_sgsr_options(val.get_object());
if (auto val = root["openxr_post_processing"]; val.is_object())
parse_openxr_post_processing_options(val.get_object());
if (auto val = root["passthrough_enabled"]; val.is_bool())
passthrough_enabled = val.get_bool();
if (auto val = root["mic_unprocessed_audio"]; val.is_bool())
mic_unprocessed_audio = val.get_bool();
if (auto val = root["fb_lower_body"]; val.is_bool())
fb_lower_body = val.get_bool();
if (auto val = root["fb_hip"]; val.is_bool())
fb_hip = val.get_bool();
if (auto val = root["virtual_keyboard_layout"]; val.is_string())
virtual_keyboard_layout = val.get_string().value();
for (const auto & [i, name]: magic_enum::enum_entries<feature>())
if (auto val = root["body_parts"]; val.is_object())
{
if (auto val = root[name]; val.is_bool())
features[i] = val.get_bool();
for (const auto & [b, name]: magic_enum::enum_entries<wivrn::from_headset::body_part_mask>())
{
const auto & body_part = val[name];
if (!body_part.is_bool())
continue;
if (body_part.get_bool())
{
body_part_mask |= std::to_underlying(b);
}
else
{
body_part_mask &= ~std::to_underlying(b);
}
}
}
if (system.passthrough_supported() == xr::system::passthrough_type::no_passthrough)
// nested object
if (auto val = root["openxr_post_processing"]; val.is_object())
{
auto obj = val.get_object();
openxr_post_processing = {};
if (auto v = obj["super_sampling"]; v.is_int64())
openxr_post_processing.super_sampling = v.get_int64();
if (auto v = obj["sharpening"]; v.is_int64())
openxr_post_processing.sharpening = v.get_int64();
}
// feature flags, keyed by enum name
for (const auto & [f, name]: magic_enum::enum_entries<feature>())
if (auto val = root[name]; val.is_bool())
features[f] = val.get_bool();
if (system.passthrough_supported() == xr::passthrough_type::none)
passthrough_enabled = false;
}
catch (std::exception & e)
{
spdlog::warn("Cannot read configuration: {}", e.what());
// Restore default configuration
servers.clear();
preferred_refresh_rate.reset();
minimum_refresh_rate.reset();
resolution_scale = 1.4;
sgsr = {};
openxr_post_processing = {};
show_performance_metrics = false;
passthrough_enabled = system.passthrough_supported() == xr::system::passthrough_type::color;
}
}
void configuration::parse_sgsr_options(simdjson::simdjson_result<simdjson::dom::object> sgsr_root)
const std::vector<config_field> & configuration::config_fields()
{
sgsr = {};
if (auto val = sgsr_root["enabled"]; val.is_bool())
sgsr.enabled = val.get_bool();
if (auto val = sgsr_root["upscaling_factor"]; val.is_double())
sgsr.upscaling_factor = val.get_double();
if (auto val = sgsr_root["use_edge_direction"]; val.is_bool())
sgsr.use_edge_direction = val.get_bool();
if (auto val = sgsr_root["edge_threshold"]; val.is_double())
sgsr.edge_threshold = val.get_double();
if (auto val = sgsr_root["edge_sharpness"]; val.is_double())
sgsr.edge_sharpness = val.get_double();
}
void configuration::parse_openxr_post_processing_options(simdjson::simdjson_result<simdjson::dom::object> openxr_post_processing_root)
{
openxr_post_processing = {};
if (auto val = openxr_post_processing_root["super_sampling"]; val.is_int64())
openxr_post_processing.super_sampling = val.get_int64();
if (auto val = openxr_post_processing_root["sharpening"]; val.is_int64())
openxr_post_processing.sharpening = val.get_int64();
}
static std::ostream & operator<<(std::ostream & stream, feature f)
{
return stream << "\"" << magic_enum::enum_name(f) << "\"";
}
static std::ostream & write_sgsr(std::ofstream & stream, const configuration::sgsr_settings & sgsr)
{
stream << "{\"enabled\":" << std::boolalpha << sgsr.enabled;
stream << ",\"upscaling_factor\":" << sgsr.upscaling_factor;
stream << ",\"use_edge_direction\":" << std::boolalpha << sgsr.use_edge_direction;
stream << ",\"edge_threshold\":" << sgsr.edge_threshold;
stream << ",\"edge_sharpness\":" << sgsr.edge_sharpness;
stream << "}";
return stream;
}
static std::ostream & write_openxr_post_processing(std::ofstream & stream, const configuration::openxr_post_processing_settings & openxr_post_processing)
{
stream << "{\"super_sampling\":" << openxr_post_processing.super_sampling;
stream << ",\"sharpening\":" << openxr_post_processing.sharpening;
stream << "}";
return stream;
static const std::vector<config_field> fields = {
scalar("resolution_scale", &configuration::resolution_scale),
scalar("bitrate_bps", &configuration::bitrate_bps),
scalar("enable_stream_gui", &configuration::enable_stream_gui),
scalar("app_list_view", &configuration::app_list_view),
scalar("app_icon_size", &configuration::app_icon_size),
scalar("theme_preset", &configuration::theme_preset),
scalar("theme_accent", &configuration::theme_accent),
scalar("theme_rounding", &configuration::theme_rounding),
scalar("theme_card_rounding", &configuration::theme_card_rounding),
scalar("theme_font_scale", &configuration::theme_font_scale),
scalar("theme_background_alpha", &configuration::theme_background_alpha),
scalar("passthrough_enabled", &configuration::passthrough_enabled),
scalar("passthrough_boundary_enabled", &configuration::passthrough_boundary_enabled),
scalar("mic_unprocessed_audio", &configuration::mic_unprocessed_audio),
scalar("forward_keyboard", &configuration::forward_keyboard),
scalar("forward_mouse", &configuration::forward_mouse),
scalar("forward_gamepad", &configuration::forward_gamepad),
scalar("emulated_gamepad", &configuration::emulated_gamepad),
scalar("virtual_keyboard_layout", &configuration::virtual_keyboard_layout),
scalar("override_foveation_enable", &configuration::override_foveation_enable),
scalar("override_foveation_pitch", &configuration::override_foveation_pitch),
scalar("override_foveation_distance", &configuration::override_foveation_distance),
scalar("first_run", &configuration::first_run),
scalar("locale", &configuration::locale),
scalar("environment_model", &configuration::environment_model),
scalar("high_power_mode", &configuration::high_power_mode),
scalar("fps_divider", &configuration::fps_divider),
scalar("extended_config", &configuration::extended_config),
scalar("preferred_refresh_rate", &configuration::preferred_refresh_rate),
scalar("minimum_refresh_rate", &configuration::minimum_refresh_rate),
scalar("stream_scale", &configuration::stream_scale),
scalar("codec", &configuration::codec),
scalar("bit_depth", &configuration::bit_depth),
scalar("usb_network", &configuration::usb_network),
scalar("height_offset_standing", &configuration::height_offset_standing),
scalar("height_offset_seated", &configuration::height_offset_seated),
scalar("default_posture", &configuration::default_posture),
};
return fields;
}
void configuration::save()
@@ -344,23 +384,74 @@ void configuration::save()
std::ofstream json(application::get_config_path() / "client.json");
json << "{\"servers\":[" << servers_str << "],"
<< "\"show_performance_metrics\":" << std::boolalpha << show_performance_metrics;
if (preferred_refresh_rate)
json << ",\"preferred_refresh_rate\":" << *preferred_refresh_rate;
if (minimum_refresh_rate)
json << ",\"minimum_refresh_rate\":" << *minimum_refresh_rate;
json << ",\"resolution_scale\":" << resolution_scale;
json << ",\"sgsr\":";
write_sgsr(json, sgsr);
json << ",\"openxr_post_processing\":";
write_openxr_post_processing(json, openxr_post_processing);
json << ",\"passthrough_enabled\":" << std::boolalpha << passthrough_enabled;
json << ",\"mic_unprocessed_audio\":" << std::boolalpha << mic_unprocessed_audio;
json << ",\"fb_lower_body\":" << std::boolalpha << fb_lower_body;
json << ",\"fb_hip\":" << std::boolalpha << fb_hip;
json << "{\"servers\":[" << servers_str << "]";
for (const auto & f: config_fields())
f.save(json, *this);
// nested object
json << ",\"openxr_post_processing\":{\"super_sampling\":" << openxr_post_processing.super_sampling;
json << ",\"sharpening\":" << openxr_post_processing.sharpening << "}";
{
bool first = true;
json << ",\"body_parts\": {";
for (const auto & [b, name]: magic_enum::enum_entries<wivrn::from_headset::body_part_mask>())
{
if (not first)
json << ",";
first = false;
json << '"' << name << "\":" << std::boolalpha << bool(body_part_mask & std::to_underlying(b));
}
json << "}";
}
// feature flags, keyed by enum name
for (auto & [key, value]: features)
json << "," << key << ":" << std::boolalpha << value;
json << ",\"virtual_keyboard_layout\":" << json_string(virtual_keyboard_layout);
json << "}";
}
void configuration::set_stream_scale(float val)
{
stream_scale = val;
}
float configuration::get_stream_scale() const
{
if (stream_scale)
return *stream_scale;
return get_default_stream_scale();
}
float configuration::get_default_stream_scale() const
{
if (check_feature(feature::eye_gaze))
return 0.3;
return 0.5;
}
float configuration::get_height_offset() const
{
std::lock_guard lock(mutex);
return default_posture == posture::seated ? height_offset_seated : height_offset_standing;
}
void configuration::set_height_offset(float value)
{
std::lock_guard lock(mutex);
(default_posture == posture::seated ? height_offset_seated : height_offset_standing) = value;
}
posture configuration::get_posture() const
{
std::lock_guard lock(mutex);
return default_posture;
}
void configuration::set_posture(posture p)
{
std::lock_guard lock(mutex);
default_posture = p;
}
+102 -20
View File
@@ -19,19 +19,42 @@
#pragma once
#include "hardware.h"
#include "wivrn_discover.h"
#include "wivrn_packets.h"
#include <filesystem>
#include <map>
#include <mutex>
#include <optional>
#include <simdjson.h>
#include <string>
#include <type_traits>
#include <vector>
#include <openxr/openxr.h>
namespace xr
{
class session;
class system;
}
} // namespace xr
// key <-> member serialization descriptor, defined in configuration.cpp
struct config_field;
enum class feature
{
microphone,
hand_tracking,
eye_gaze,
face_tracking,
body_tracking,
};
enum class posture
{
standing,
seated,
};
class configuration
{
@@ -47,26 +70,39 @@ public:
};
std::map<std::string, server_data> servers;
std::optional<float> preferred_refresh_rate;
float preferred_refresh_rate = 0;
std::optional<float> minimum_refresh_rate;
float resolution_scale = 1.4;
bool show_performance_metrics = false;
float resolution_scale = 1.2;
std::optional<wivrn::video_codec> codec;
uint32_t bitrate_bps = 50'000'000;
uint8_t bit_depth = 10;
bool passthrough_enabled = false;
// XR_META_boundary_visibility, the boundary is always shown outside passthrough
bool passthrough_boundary_enabled = false;
bool mic_unprocessed_audio = false;
bool fb_lower_body = false;
bool fb_hip = true;
// Input forwarding, per device. Off by default; only effective if the server permits it.
bool forward_keyboard = false;
bool forward_mouse = false;
bool forward_gamepad = false;
bool emulated_gamepad = false;
// Snapdragon Game Super Resolution
struct sgsr_settings
{
bool enabled = false;
float upscaling_factor = 1.5;
bool use_edge_direction = true;
float edge_threshold = 4.0;
float edge_sharpness = 2.0;
};
sgsr_settings sgsr{};
std::underlying_type_t<wivrn::from_headset::body_part_mask> body_part_mask = ~0;
bool enable_stream_gui = true;
// application launcher: list vs grid, and grid icon size, 0 small 1 medium 2 large
bool app_list_view = false;
uint32_t app_icon_size = 0;
// interface theme, defaults match the built-in "Dark" preset and "Blue" accent
std::string theme_preset = "Dark";
std::string theme_accent = "Blue";
float theme_rounding = 8;
float theme_card_rounding = 14;
float theme_font_scale = 1.0;
float theme_background_alpha = 0.75;
// XR_FB_composition_layer_settings extension flags
struct openxr_post_processing_settings
@@ -78,18 +114,64 @@ public:
std::string virtual_keyboard_layout = "QWERTY";
std::string environment_model = "assets://ground.glb";
bool override_foveation_enable = false;
float override_foveation_pitch = -10 * M_PI / 180;
float override_foveation_distance = 3;
bool high_power_mode = true;
uint32_t fps_divider = 1;
bool usb_network = false;
// Allow unsafe config values
bool extended_config = false;
bool first_run = true;
std::string locale;
bool check_feature(feature f) const;
void set_feature(feature f, bool state);
static constexpr float default_height_offset_standing = 0;
static constexpr float default_height_offset_seated = 0.45;
private:
mutable std::mutex mutex;
std::map<feature, bool> features;
std::optional<float> stream_scale;
float height_offset_standing = default_height_offset_standing;
float height_offset_seated = default_height_offset_seated;
posture default_posture = posture::standing;
void parse_sgsr_options(simdjson::simdjson_result<simdjson::dom::object> root);
void parse_openxr_post_processing_options(simdjson::simdjson_result<simdjson::dom::object> root);
// table of scalar settings shared by save()/load(); non-scalar settings are explicit
static const std::vector<config_field> & config_fields();
public:
configuration(xr::system &);
configuration(xr::system &, xr::session &);
configuration(xr::system &, xr::session &, const std::filesystem::path &);
void save();
void set_stream_scale(float);
float get_stream_scale() const;
float get_default_stream_scale() const;
float get_height_offset() const;
void set_height_offset(float);
posture get_posture() const;
void set_posture(posture);
uint32_t max_bitrate(bool extended) const
{
return extended ? 800'000'000u : 200'000'000u;
}
uint32_t max_bitrate() const
{
return max_bitrate(extended_config);
}
};
+51 -37
View File
@@ -27,10 +27,7 @@
namespace constants::gui
{
// Minimum distance between a GUI layer and a fingertip/controller to register a click
constexpr float min_pointer_distance = -0.1;
// Number of combined image samplers in ImGui descriptor pool
constexpr unsigned int nb_combined_image_samplers = 100;
constexpr float min_controller_distance = -0.02;
// Font to use (desktop only)
constexpr const char font_name[] = "Noto Sans";
@@ -40,22 +37,24 @@ constexpr int font_size_small = 30;
constexpr int font_size_large = 75;
// Ratio between joystick position and scroll distance/s
constexpr float scroll_ratio = 3;
constexpr float scroll_ratio = 10;
// Threshold on the trigger value to register a click
constexpr float trigger_click_thd = 0.8;
constexpr float trigger_click_thd = 0.7;
// Thresholds on the distance between the fingertip and GUI layers
constexpr float fingertip_distance_hovering_thd = 0.15;
constexpr float fingertip_distance_touching_thd = 0.0;
// Thresholds on the distance between the fingertip and GUI layers (positive: in front of the GUI, negative: behind the GUI)
constexpr float palm_distance_close_thd_lo = 0.18; // Distance to switch between touch and aim interaction
constexpr float palm_distance_close_thd_hi = 0.22; // Distance to switch between touch and aim interaction
constexpr float fingertip_distance_touching_thd_hi = -0.01; // Distance to register a click
constexpr float fingertip_distance_touching_thd_lo = -0.15; // Distance to register a click
constexpr float fingertip_distance_stick_thd = -0.02; // Max distance where the fingertip is moved to be on the GUI
// Minimum scroll value to enable a controller
constexpr float scroll_value_thd = 0.01;
// Pointer radius
constexpr float pointer_radius_in = 10;
constexpr float pointer_radius_out = 12;
constexpr float pointer_thickness = 4;
constexpr float pointer_thickness = 2;
constexpr float pointer_radius_in = 6;
// Pointer transparency
constexpr float pointer_alpha = 0.8;
@@ -63,24 +62,37 @@ constexpr float pointer_alpha_disabled = 0.25;
constexpr float pointer_fading_distance = 40;
// Pointer color
constexpr uint32_t pointer_color_pressed = 0xffff3300;
constexpr uint32_t pointer_color_unpressed = 0xffffffff;
constexpr uint32_t pointer_color = 0x40ffffff;
constexpr uint32_t pointer_color_border = 0xff000000;
// offset of a popup layer in front of its main GUI panel
constexpr glm::vec3 popup_position = {0, 0, 0.05};
// world-space offset of a hover tooltip layer from the hovered item
constexpr glm::vec3 tooltip_distance = {0, 0.004, 0.005};
} // namespace constants::gui
namespace constants::lobby
{
// Position and orientation of the GUI layers
constexpr float gui_pitch = -0.2;
constexpr auto gui_pitches = std::to_array<std::pair<float, float>>({
{-90, -90},
{-50, -90},
{-30, -12},
{30, -12},
{50, 78},
{90, 78},
});
constexpr float keyboard_pitch = -0.6;
constexpr glm::vec3 popup_position = {0, 0, 0.05};
constexpr glm::vec3 keyboard_position = {0, -0.3, 0.1};
// Position of the near plane
constexpr float near_plane = 0.02;
// Recenter gesture thresholds
constexpr float recenter_cosangle_min = 0.8;
constexpr float recenter_cos_palm_angle_min = 0.7;
constexpr float recenter_cos_fingertip_angle_max = 0.3;
constexpr float recenter_distance_up = 0.3;
constexpr float recenter_distance_front = 0.2;
@@ -91,36 +103,38 @@ constexpr float recenter_action_distance = 0.3;
constexpr float initial_gui_distance = 0.5;
// Skybox color
constexpr std::array<float, 4> sky_color = {0, 0.25, 0.5, 1};
// Dimming scale/bias when a popup window is shown
constexpr XrColor4f dimming_scale = {0.5, 0.5, 0.5, 1};
constexpr XrColor4f dimming_bias = {0.25, 0.25, 0.25, 0};
constexpr XrColor4f sky_color = {0, 0.25, 0.5, 1};
// Z-indices of composition layers
constexpr int zindex_passthrough = -2;
constexpr int zindex_lobby = -1;
constexpr int zindex_gui = 0;
constexpr int zindex_controllers = 1;
constexpr int zindex_recenter_tip = 2;
constexpr int zindex_tooltip = 2;
constexpr int zindex_recenter_tip = 3;
} // namespace constants::lobby
namespace constants::style
namespace constants::stream
{
constexpr ImVec2 window_padding = {20, 20};
constexpr float window_border_size = 2;
constexpr float window_rounding = 10;
constexpr float fade_delay = 3;
constexpr float fade_duration = 0.25;
constexpr ImVec2 tooltip_padding = {5, 5};
constexpr float tooltip_rounding = 0;
constexpr float tooltip_distance = 10;
constexpr float urgent_fade_delay = 5;
constexpr ImVec4 urgent_border_color = {8.f, .6f, 0.f, .8f};
constexpr ImVec2 button_size = {220, 80};
constexpr ImVec2 icon_button_size = {80, 80};
constexpr float connection_popup_width = 1000;
// Dimming for the streamed video when the GUI is interactable
constexpr float dimming_scale = 0.4;
constexpr float dimming_bias = 0.01;
constexpr ImVec2 pin_entry_key_size = {90, 70};
constexpr ImVec2 pin_entry_item_spacing = {10, 10};
constexpr float pin_entry_popup_width = 3 * pin_entry_key_size.x + 2 * pin_entry_item_spacing.x;
constexpr float gui_max_foveation_speed = 2; // Maximum speed (@ 1m) when changing the foveation distance with the thumbstick
constexpr float gui_min_foveation_distance = 0.5;
constexpr float gui_max_foveation_distance = 100;
} // namespace constants::style
constexpr float gui_min_foveation_pitch = -M_PI / 3;
constexpr float gui_max_foveation_pitch = M_PI / 3;
constexpr float gui_max_layer_speed = 10; // Maximum speed (@ 1m) when changing the GUI distance with the thumbstick
constexpr float gui_min_layer_distance = 0.5;
constexpr float gui_max_layer_distance = 3;
} // namespace constants::stream
+57 -34
View File
@@ -42,6 +42,7 @@ struct wivrn::android::decoder::mapped_hardware_buffer
{
vk::raii::DeviceMemory memory = nullptr;
vk::raii::Image vimage = nullptr;
vk::Extent2D extent{};
vk::raii::ImageView image_view = nullptr;
vk::ImageLayout layout = vk::ImageLayout::eUndefined;
};
@@ -59,8 +60,11 @@ const char * mime(wivrn::video_codec codec)
return "video/hevc";
case c::av1:
return "video/av01";
case c::raw:
break;
}
assert(false);
__builtin_unreachable();
}
void check(media_status_t status, const char * msg)
@@ -72,6 +76,27 @@ void check(media_status_t status, const char * msg)
}
}
struct android_blit_handle : public decoder::blit_handle
{
std::shared_ptr<wivrn::android::decoder::mapped_hardware_buffer> vk_data;
std::shared_ptr<AImageReader> image_reader;
AImage_ptr aimage;
android_blit_handle(
const wivrn::from_headset::feedback & feedback,
const wivrn::to_headset::video_stream_data_shard::view_info_t & view_info,
vk::ImageView image_view,
vk::Image image,
vk::Extent2D extent,
vk::ImageLayout & current_layout,
decltype(vk_data) vk_data,
decltype(image_reader) image_reader,
decltype(aimage) aimage) :
decoder::blit_handle(feedback, view_info, image_view, image, extent, current_layout),
vk_data(vk_data),
image_reader(image_reader),
aimage(std::move(aimage)) {}
};
} // namespace
namespace wivrn::android
@@ -80,19 +105,21 @@ namespace wivrn::android
decoder::decoder(
vk::raii::Device & device,
vk::raii::PhysicalDevice & physical_device,
const wivrn::to_headset::video_stream_description::item & description,
float fps,
const wivrn::to_headset::video_stream_description & description,
uint8_t stream_index,
std::weak_ptr<scenes::stream> weak_scene,
shard_accumulator * accumulator) :
description(description), stream_index(stream_index), fps(fps), device(device), weak_scene(weak_scene), accumulator(accumulator)
stream_index(stream_index), device(device), weak_scene(weak_scene), accumulator(accumulator)
{
spdlog::info("hbm_mutex.native_handle() = {}", (void *)hbm_mutex.native_handle());
auto width = description.width;
auto height = description.height / (stream_index == 2 ? 2 : 1);
AImageReader * ir;
check(AImageReader_newWithUsage(
description.video_width,
description.video_height,
width,
height,
AIMAGE_FORMAT_PRIVATE,
AHARDWAREBUFFER_USAGE_CPU_READ_NEVER | AHARDWAREBUFFER_USAGE_CPU_WRITE_NEVER | AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE,
scenes::stream::image_buffer_size + 4 /* maxImages */,
@@ -108,18 +135,18 @@ decoder::decoder(
"vkGetAndroidHardwareBufferPropertiesANDROID");
{
AMediaFormat_ptr format(AMediaFormat_new());
AMediaFormat_setString(format.get(), AMEDIAFORMAT_KEY_MIME, mime(description.codec));
AMediaFormat_setString(format.get(), AMEDIAFORMAT_KEY_MIME, mime(description.codec[stream_index]));
// AMediaFormat_setInt32(format.get(), "vendor.qti-ext-dec-low-latency.enable", 1); // Qualcomm low
// latency mode
AMediaFormat_setInt32(format.get(), AMEDIAFORMAT_KEY_WIDTH, description.video_width);
AMediaFormat_setInt32(format.get(), AMEDIAFORMAT_KEY_HEIGHT, description.video_height);
AMediaFormat_setInt32(format.get(), AMEDIAFORMAT_KEY_OPERATING_RATE, std::ceil(fps));
AMediaFormat_setInt32(format.get(), AMEDIAFORMAT_KEY_WIDTH, width);
AMediaFormat_setInt32(format.get(), AMEDIAFORMAT_KEY_HEIGHT, height);
AMediaFormat_setInt32(format.get(), AMEDIAFORMAT_KEY_OPERATING_RATE, std::ceil(description.frame_rate));
AMediaFormat_setInt32(format.get(), AMEDIAFORMAT_KEY_PRIORITY, 0);
media_codec.reset(AMediaCodec_createDecoderByType(mime(description.codec)));
media_codec.reset(AMediaCodec_createDecoderByType(mime(description.codec[stream_index])));
if (not media_codec)
throw std::runtime_error(std::string("Cannot create decoder for MIME type ") + mime(description.codec));
throw std::runtime_error(std::string("Cannot create decoder for MIME type ") + mime(description.codec[stream_index]));
char * codec_name;
check(AMediaCodec_getName(media_codec.get(), &codec_name), "AMediaCodec_getName");
@@ -168,6 +195,8 @@ decoder::decoder(
decoder::~decoder()
{
if (image_reader)
AImageReader_setImageListener(image_reader.get(), nullptr);
if (media_codec)
{
AMediaCodec_stop(media_codec.get());
@@ -222,7 +251,7 @@ void decoder::push_data(std::span<std::span<const uint8_t>> data, uint64_t frame
current_input_buffer = input_buffer{};
}
void decoder::frame_completed(wivrn::from_headset::feedback & feedback, const wivrn::to_headset::video_stream_data_shard::view_info_t & view_info)
void decoder::frame_completed(const wivrn::from_headset::feedback & feedback, const wivrn::to_headset::video_stream_data_shard::view_info_t & view_info)
{
if (not media_codec)
{
@@ -255,7 +284,7 @@ void decoder::on_image_available(AImageReader * reader)
assert(reader == image_reader.get());
// Executed on image reader thread
decltype(blit_handle::aimage) image;
decltype(android_blit_handle::aimage) image;
try
{
AImage * tmp;
@@ -280,13 +309,14 @@ void decoder::on_image_available(AImageReader * reader)
auto vk_data = map_hardware_buffer(image.get());
auto handle = std::make_shared<decoder::blit_handle>(
auto handle = std::make_shared<android_blit_handle>(
info->feedback,
info->view_info,
vk_data->image_view,
*vk_data->image_view,
*vk_data->vimage,
&vk_data->layout,
vk_data,
vk_data->extent,
vk_data->layout,
std::move(vk_data),
image_reader,
std::move(image));
@@ -338,11 +368,8 @@ void decoder::create_sampler(const AHardwareBuffer_Desc & buffer_desc, vk::Andro
};
// suggested values from decoder don't actually read the metadata, so it's garbage
if (description.range)
ycbcr_create_info.get<vk::SamplerYcbcrConversionCreateInfo>().ycbcrRange = vk::SamplerYcbcrRange(*description.range);
if (description.color_model)
ycbcr_create_info.get<vk::SamplerYcbcrConversionCreateInfo>().ycbcrModel = vk::SamplerYcbcrModelConversion(*description.color_model);
ycbcr_create_info.get<vk::SamplerYcbcrConversionCreateInfo>().ycbcrRange = vk::SamplerYcbcrRange::eItuFull;
ycbcr_create_info.get<vk::SamplerYcbcrConversionCreateInfo>().ycbcrModel = vk::SamplerYcbcrModelConversion::eYcbcr709;
ycbcr_conversion = vk::raii::SamplerYcbcrConversion(device, ycbcr_create_info.get<vk::SamplerYcbcrConversionCreateInfo>());
@@ -388,7 +415,7 @@ std::shared_ptr<decoder::mapped_hardware_buffer> decoder::map_hardware_buffer(AI
if (!*ycbcr_sampler || memcmp(&ahb_format, &format_properties, sizeof(format_properties)))
{
memcpy(&ahb_format, &format_properties, sizeof(format_properties));
extent = {buffer_desc.width, buffer_desc.height};
spdlog::info("decoded image size: {}x{}", buffer_desc.width, buffer_desc.height);
create_sampler(buffer_desc, ahb_format);
hardware_buffer_map.clear();
// TODO tell the reprojector to recreate the pipeline
@@ -466,6 +493,10 @@ std::shared_ptr<decoder::mapped_hardware_buffer> decoder::map_hardware_buffer(AI
handle->vimage = std::move(vimage);
handle->image_view = std::move(image_view);
handle->memory = std::move(memory);
handle->extent = vk::Extent2D{
.width = buffer_desc.width,
.height = buffer_desc.height,
};
hardware_buffer_map[hardware_buffer] = handle;
return handle;
@@ -514,11 +545,6 @@ void decoder::on_media_output_available(AMediaCodec * media_codec, void * userda
});
}
void decoder::blit_handle::deleter::operator()(AImage * aimage)
{
AImage_delete(aimage);
}
static bool hardware_accelerated(AMediaCodec * media_codec)
{
// MediaCodecInfo has isHardwareAccelerated, but this does not exist in NDK.
@@ -542,17 +568,16 @@ static bool hardware_accelerated(AMediaCodec * media_codec)
return true;
}
std::vector<wivrn::video_codec> decoder::supported_codecs()
void decoder::supported_codecs(std::vector<wivrn::video_codec> & result)
{
std::vector<wivrn::video_codec> result;
// Make sure we update this code when codecs are changed
static_assert(magic_enum::enum_count<wivrn::video_codec>() == 3);
static_assert(magic_enum::enum_count<wivrn::video_codec>() == 4);
// In order or preference, from preferred to least preferred
for (auto codec: {
wivrn::video_codec::av1,
wivrn::video_codec::h264,
wivrn::video_codec::h265,
wivrn::video_codec::h264,
})
{
AMediaCodec_ptr media_codec(AMediaCodec_createDecoderByType(mime(codec)));
@@ -563,8 +588,6 @@ std::vector<wivrn::video_codec> decoder::supported_codecs()
spdlog::info("video codec {}: {}supported", magic_enum::enum_name(codec), supported ? "" : "NOT ");
}
return result;
}
} // namespace wivrn::android
+8 -42
View File
@@ -19,6 +19,7 @@
#pragma once
#include "decoder/decoder.h"
#include "utils/sync_queue.h"
#include "wivrn_packets.h"
#include <functional>
@@ -59,40 +60,19 @@ class stream;
namespace wivrn::android
{
class decoder
class decoder : public wivrn::decoder
{
public:
struct mapped_hardware_buffer;
struct blit_handle
{
struct deleter
{
void operator()(AImage *);
};
wivrn::from_headset::feedback feedback;
wivrn::to_headset::video_stream_data_shard::view_info_t view_info;
vk::raii::ImageView & image_view;
vk::Image image = nullptr;
vk::ImageLayout * current_layout = nullptr;
std::shared_ptr<mapped_hardware_buffer> vk_data;
std::shared_ptr<AImageReader> image_reader;
AImage_ptr aimage;
};
private:
wivrn::to_headset::video_stream_description::item description;
uint8_t stream_index;
float fps;
vk::raii::Device & device;
vk::AndroidHardwareBufferFormatPropertiesANDROID ahb_format;
vk::raii::SamplerYcbcrConversion ycbcr_conversion = nullptr;
vk::raii::Sampler ycbcr_sampler = nullptr;
vk::Extent2D extent{};
std::mutex hbm_mutex;
std::shared_ptr<AImageReader> image_reader;
@@ -141,38 +121,24 @@ private:
public:
decoder(vk::raii::Device & device,
vk::raii::PhysicalDevice & physical_device,
const wivrn::to_headset::video_stream_description::item & description,
float fps,
const wivrn::to_headset::video_stream_description & description,
uint8_t stream_index,
std::weak_ptr<scenes::stream> scene,
shard_accumulator * accumulator);
decoder(const decoder &) = delete;
decoder(decoder &&) = delete;
~decoder();
void push_data(std::span<std::span<const uint8_t>> data, uint64_t frame_index, bool partial);
void push_data(std::span<std::span<const uint8_t>> data, uint64_t frame_index, bool partial) override;
void frame_completed(
wivrn::from_headset::feedback & feedback,
const wivrn::to_headset::video_stream_data_shard::view_info_t & view_info);
const wivrn::from_headset::feedback & feedback,
const wivrn::to_headset::video_stream_data_shard::view_info_t & view_info) override;
const auto & desc() const
{
return description;
}
vk::Sampler sampler()
vk::Sampler sampler() override
{
return *ycbcr_sampler;
}
vk::Extent2D image_size()
{
return extent;
}
static std::vector<wivrn::video_codec> supported_codecs();
static void supported_codecs(std::vector<wivrn::video_codec> &);
};
} // namespace wivrn::android
+123
View File
@@ -0,0 +1,123 @@
/*
* WiVRn VR streaming
* Copyright (C) 2025 Patrick Nicolas <patricknicolas@laposte.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "decoder.h"
#ifdef __ANDROID__
#include "decoder/android/android_decoder.h"
#elif WIVRN_USE_V4L2
#include "decoder/v4l2/v4l2_decoder.h"
#else
#include "decoder/ffmpeg/ffmpeg_decoder.h"
#endif
#include "decoder/raw_decoder.h"
wivrn::decoder::~decoder() = default;
std::shared_ptr<wivrn::decoder> wivrn::decoder::make(
vk::raii::Device & device,
vk::raii::PhysicalDevice & phys_dev,
uint32_t vk_queue_family_index,
const wivrn::to_headset::video_stream_description & description,
uint8_t stream_index,
std::weak_ptr<scenes::stream> scene,
shard_accumulator * acc)
{
switch (description.codec[stream_index])
{
case h264:
case h265:
case av1:
#ifdef __ANDROID__
return std::make_shared<wivrn::android::decoder>(
device,
phys_dev,
description,
stream_index,
scene,
acc);
#elif WIVRN_USE_V4L2
return std::make_shared<wivrn::v4l2::decoder>(
device, phys_dev, vk_queue_family_index, description, stream_index, scene, acc);
#else
return std::make_shared<wivrn::ffmpeg::decoder>(
device, phys_dev, description, stream_index, scene, acc);
#endif
case raw:
return std::make_shared<wivrn::raw_decoder>(
device,
phys_dev,
vk_queue_family_index,
description,
stream_index,
scene,
acc);
}
__builtin_unreachable();
}
static std::vector<wivrn::video_codec_capability> supported_codecs_()
{
std::vector<wivrn::video_codec> codecs;
#ifdef __ANDROID__
wivrn::android::decoder::supported_codecs(codecs);
#elif WIVRN_USE_V4L2
wivrn::v4l2::decoder::supported_codecs(codecs);
#else
wivrn::ffmpeg::decoder::supported_codecs(codecs);
#endif
codecs.push_back(wivrn::video_codec::raw);
std::vector<wivrn::video_codec_capability> res;
res.reserve(codecs.size());
for (auto codec: codecs)
res.push_back({.codec = codec, .supports_10bit = wivrn::decoder::supports_10bit(codec)});
return res;
}
const std::vector<wivrn::video_codec_capability> & wivrn::decoder::supported_codecs()
{
static std::vector<wivrn::video_codec_capability> res = supported_codecs_();
return res;
}
bool wivrn::decoder::supports_10bit(wivrn::video_codec codec)
{
#ifdef __ANDROID__
return codec == wivrn::video_codec::h265 or codec == wivrn::video_codec::av1;
#elif WIVRN_USE_V4L2
switch (codec)
{
case wivrn::video_codec::h265: {
static const bool supported = wivrn::v4l2::decoder::supports_10bit(codec);
return supported;
}
case wivrn::video_codec::av1: {
static const bool supported = wivrn::v4l2::decoder::supports_10bit(codec);
return supported;
}
case wivrn::video_codec::h264:
case wivrn::video_codec::raw:
return false;
}
__builtin_unreachable();
#else
// ffmpeg
return codec == wivrn::video_codec::h265 or codec == wivrn::video_codec::av1;
#endif
}
+79
View File
@@ -0,0 +1,79 @@
/*
* WiVRn VR streaming
* Copyright (C) 2025 Patrick Nicolas <patricknicolas@laposte.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include "wivrn_packets.h"
#include "wivrn_config.h"
#include <cstdint>
#include <memory>
#include <span>
#include <vulkan/vulkan_raii.hpp>
namespace scenes
{
class stream;
}
namespace wivrn
{
class shard_accumulator;
class decoder
{
public:
struct blit_handle
{
wivrn::from_headset::feedback feedback;
wivrn::to_headset::video_stream_data_shard::view_info_t view_info;
vk::ImageView image_view = nullptr;
vk::Image image = nullptr;
vk::Extent2D extent{};
vk::ImageLayout & current_layout;
vk::Semaphore semaphore = nullptr;
uint64_t * semaphore_val = nullptr;
#if WIVRN_USE_V4L2
// DMA-buf images from V4L2 require queue-family ownership
// transfers between Vulkan and external engine
uint32_t foreign_queue_family = vk::QueueFamilyIgnored;
#endif
};
public:
static std::shared_ptr<decoder> make(
vk::raii::Device &,
vk::raii::PhysicalDevice &,
uint32_t vk_queue_family_index,
const wivrn::to_headset::video_stream_description & description,
uint8_t stream_index,
std::weak_ptr<scenes::stream>,
shard_accumulator *);
virtual ~decoder();
virtual void push_data(std::span<std::span<const uint8_t>> data, uint64_t frame_index, bool partial) = 0;
virtual void frame_completed(
const from_headset::feedback & feedback,
const to_headset::video_stream_data_shard::view_info_t & view_info) = 0;
virtual vk::Sampler sampler() = 0;
static const std::vector<wivrn::video_codec_capability> & supported_codecs();
static bool supports_10bit(wivrn::video_codec codec);
};
} // namespace wivrn
+61 -24
View File
@@ -56,29 +56,65 @@ static AVCodecID codec_id(wivrn::video_codec codec)
return AV_CODEC_ID_HEVC;
case c::av1:
return AV_CODEC_ID_AV1;
case c::raw:
break;
}
assert(false);
__builtin_unreachable();
}
decoder::blit_handle::~blit_handle()
struct decoder::ffmpeg_blit_handle : public wivrn::decoder::blit_handle
{
std::unique_lock lock(self->mutex);
if (image_index < 0)
return;
int image_index;
wivrn::ffmpeg::decoder * self;
self->free_images.push_back(image_index);
}
ffmpeg_blit_handle(
const wivrn::from_headset::feedback & feedback,
const wivrn::to_headset::video_stream_data_shard::view_info_t & view_info,
vk::ImageView image_view,
vk::Image image,
vk::Extent2D extent,
vk::ImageLayout & current_layout,
int image_index,
wivrn::ffmpeg::decoder * self) :
wivrn::decoder::blit_handle{
feedback,
view_info,
image_view,
image,
extent,
current_layout,
},
image_index(image_index),
self(self)
{}
~ffmpeg_blit_handle()
{
std::unique_lock lock(self->mutex);
if (image_index < 0)
return;
self->free_images.push_back(image_index);
}
};
decoder::decoder(
vk::raii::Device & device,
vk::raii::PhysicalDevice & physical_device,
const wivrn::to_headset::video_stream_description::item & description,
float fps,
const wivrn::to_headset::video_stream_description & description,
uint8_t stream_index,
std::weak_ptr<scenes::stream> scene,
shard_accumulator * accumulator) :
device(device), description(description), codec(nullptr, free_codec_context), sws(nullptr, sws_freeContext), weak_scene(scene), accumulator(accumulator)
device(device),
codec(nullptr, free_codec_context),
sws(nullptr, sws_freeContext),
weak_scene(scene),
accumulator(accumulator),
extent{
.width = description.width,
.height = description.height / (stream_index == 2 ? 2u : 1u),
}
{
free_images.resize(image_count);
@@ -90,8 +126,8 @@ decoder::decoder(
.imageType = vk::ImageType::e2D,
.format = vk::Format::eA8B8G8R8SrgbPack32,
.extent = {
.width = description.width,
.height = description.height,
.width = extent.width,
.height = extent.height,
.depth = 1,
},
.mipLevels = 1,
@@ -108,7 +144,6 @@ decoder::decoder(
decoded_images[i].image = image_allocation(device, image_info, alloc_info);
decoded_images[i].image.map();
extent = vk::Extent2D{description.width, description.height};
vk::ImageSubresource resource;
resource.aspectMask = vk::ImageAspectFlagBits::eColor;
@@ -133,7 +168,7 @@ decoder::decoder(
decoded_images[i].current_layout = vk::ImageLayout::eUndefined;
}
auto avcodec = avcodec_find_decoder(codec_id(description.codec));
auto avcodec = avcodec_find_decoder(codec_id(description.codec[stream_index]));
if (avcodec == nullptr)
{
throw std::runtime_error{"avcodec_find_decoder failed"};
@@ -161,6 +196,8 @@ decoder::decoder(
void decoder::push_data(std::span<std::span<const uint8_t>> data, uint64_t frame_index, bool partial)
{
if (frame_index != this->frame_index)
packet.clear();
for (const auto & d: data)
packet.insert(packet.end(), d.begin(), d.end());
this->frame_index = frame_index;
@@ -200,7 +237,7 @@ void decoder::frame_completed(const wivrn::from_headset::feedback & feedback, co
if (!sws)
{
sws.reset(sws_getContext(frame->width, frame->height, (AVPixelFormat)frame->format, description.width, description.height, AV_PIX_FMT_RGB0, SWS_BILINEAR, nullptr, nullptr, nullptr));
sws.reset(sws_getContext(frame->width, frame->height, (AVPixelFormat)frame->format, extent.width, extent.height, AV_PIX_FMT_RGB0, SWS_BILINEAR, nullptr, nullptr, nullptr));
}
std::unique_lock lock(mutex);
@@ -221,12 +258,13 @@ void decoder::frame_completed(const wivrn::from_headset::feedback & feedback, co
if (res == 0)
throw std::runtime_error{"sws_scale failed"};
auto handle = std::make_shared<decoder::blit_handle>(
auto handle = std::make_shared<ffmpeg_blit_handle>(
feedback,
view_info,
decoded_images[index].image_view,
(vk::Image)decoded_images[index].image,
&decoded_images[index].current_layout,
*decoded_images[index].image_view,
decoded_images[index].image,
extent,
decoded_images[index].current_layout,
index,
this);
@@ -234,13 +272,12 @@ void decoder::frame_completed(const wivrn::from_headset::feedback & feedback, co
scene->push_blit_handle(accumulator, std::move(handle));
}
std::vector<wivrn::video_codec> decoder::supported_codecs()
void decoder::supported_codecs(std::vector<wivrn::video_codec> & res)
{
return {
wivrn::video_codec::h264,
wivrn::video_codec::h265,
wivrn::video_codec::av1,
};
// As long as we do software decoding, prefer faster ones
res.push_back(wivrn::video_codec::h264);
res.push_back(wivrn::video_codec::h265);
res.push_back(wivrn::video_codec::av1);
}
} // namespace wivrn::ffmpeg
+9 -38
View File
@@ -19,6 +19,7 @@
#pragma once
#include "decoder/decoder.h"
#include "vk/allocation.h"
#include "wivrn_packets.h"
#include <memory>
@@ -46,24 +47,10 @@ class stream;
namespace wivrn::ffmpeg
{
class decoder
class decoder : public wivrn::decoder
{
public:
struct blit_handle
{
wivrn::from_headset::feedback feedback;
wivrn::to_headset::video_stream_data_shard::view_info_t view_info;
vk::raii::ImageView & image_view;
vk::Image image = nullptr;
vk::ImageLayout * current_layout = nullptr;
int image_index;
decoder * self;
~blit_handle();
};
private:
struct ffmpeg_blit_handle;
static const int image_count = 12;
struct image
{
@@ -78,53 +65,37 @@ private:
vk::raii::Sampler rgb_sampler = nullptr;
std::array<image, image_count> decoded_images;
vk::Extent2D extent{};
std::vector<int> free_images;
wivrn::to_headset::video_stream_description::item description;
std::unique_ptr<AVCodecContext, void (*)(AVCodecContext *)> codec;
std::unique_ptr<SwsContext, void (*)(SwsContext *)> sws;
std::vector<uint8_t> packet;
uint64_t frame_index;
std::weak_ptr<scenes::stream> weak_scene;
shard_accumulator * accumulator;
const vk::Extent2D extent;
std::mutex mutex;
public:
decoder(vk::raii::Device & device,
vk::raii::PhysicalDevice & physical_device,
const wivrn::to_headset::video_stream_description::item & description,
float fps,
const wivrn::to_headset::video_stream_description & description,
uint8_t stream_index,
std::weak_ptr<scenes::stream> scene,
shard_accumulator * accumulator);
decoder(const decoder &) = delete;
decoder(decoder &&) = delete;
void push_data(std::span<std::span<const uint8_t>> data, uint64_t frame_index, bool partial);
void push_data(std::span<std::span<const uint8_t>> data, uint64_t frame_index, bool partial) override;
void frame_completed(
const wivrn::from_headset::feedback & feedback,
const wivrn::to_headset::video_stream_data_shard::view_info_t & view_info);
const wivrn::to_headset::video_stream_data_shard::view_info_t & view_info) override;
const auto & desc() const
{
return description;
}
vk::Sampler sampler()
vk::Sampler sampler() override
{
return *rgb_sampler;
}
vk::Extent2D image_size()
{
return extent;
}
static std::vector<wivrn::video_codec> supported_codecs();
static void supported_codecs(std::vector<wivrn::video_codec> &);
};
} // namespace wivrn::ffmpeg
+348
View File
@@ -0,0 +1,348 @@
/*
* WiVRn VR streaming
* Copyright (C) 2025 Patrick Nicolas <patricknicolas@laposte.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "raw_decoder.h"
#include "application.h"
#include "scenes/stream.h"
namespace
{
struct raw_blit_handle : public wivrn::decoder::blit_handle
{
std::atomic_bool & free;
raw_blit_handle(
const wivrn::from_headset::feedback & feedback,
const wivrn::to_headset::video_stream_data_shard::view_info_t & view_info,
vk::ImageView image_view,
vk::Image image,
vk::Extent2D extent,
vk::ImageLayout & current_layout,
vk::Semaphore semaphore,
uint64_t & semaphore_val,
std::atomic_bool & free) :
wivrn::decoder::blit_handle{feedback, view_info, image_view, image, extent, current_layout, semaphore, &semaphore_val},
free(free) {}
~raw_blit_handle()
{
free = true;
};
};
vk::raii::Sampler make_sampler(
vk::raii::Device & device,
vk::SamplerYcbcrConversion ycbcr_conversion)
{
vk::StructureChain info{
vk::SamplerCreateInfo{
.magFilter = vk::Filter::eNearest,
.minFilter = vk::Filter::eNearest,
.mipmapMode = vk::SamplerMipmapMode::eNearest,
.addressModeU = vk::SamplerAddressMode::eClampToEdge,
.addressModeV = vk::SamplerAddressMode::eClampToEdge,
.addressModeW = vk::SamplerAddressMode::eClampToEdge,
.maxAnisotropy = 1,
},
vk::SamplerYcbcrConversionInfo{
.conversion = ycbcr_conversion,
},
};
if (ycbcr_conversion == VK_NULL_HANDLE)
info.unlink<vk::SamplerYcbcrConversionInfo>();
return vk::raii::Sampler(device, info.get());
}
} // namespace
namespace wivrn
{
raw_decoder::raw_decoder(
vk::raii::Device & device,
vk::raii::PhysicalDevice & physical_device,
uint32_t vk_queue_family_index,
const wivrn::to_headset::video_stream_description & description,
uint8_t stream_index,
std::weak_ptr<scenes::stream> scene,
shard_accumulator * accumulator) :
device(device),
ycbcr_conversion(stream_index == 2 ? nullptr : vk::raii::SamplerYcbcrConversion(device, {
.format = vk::Format::eG8B8R82Plane420Unorm,
.ycbcrModel = vk::SamplerYcbcrModelConversion::eYcbcr709,
.ycbcrRange = vk::SamplerYcbcrRange::eItuFull,
.chromaFilter = vk::Filter::eNearest,
})),
sampler_(make_sampler(device, *ycbcr_conversion)),
command_pool(device, vk::CommandPoolCreateInfo{
.flags = vk::CommandPoolCreateFlagBits::eResetCommandBuffer,
.queueFamilyIndex = vk_queue_family_index,
}),
cmd(device.allocateCommandBuffers(vk::CommandBufferAllocateInfo{
.commandPool = *command_pool,
.commandBufferCount = 1,
})[0]
.release()),
fence(device, vk::FenceCreateInfo{.flags = vk::FenceCreateFlagBits::eSignaled}),
stream_index(stream_index),
extent{
.width = description.width,
.height = description.height / (stream_index == 2 ? 2u : 1u),
},
weak_scene(scene),
accumulator(accumulator)
{
vk::DeviceSize buffer_size = extent.width * extent.height;
vk::Format format{};
switch (stream_index)
{
case 0: // colour left
case 1: // colour right
buffer_size += buffer_size / 2;
format = vk::Format::eG8B8R82Plane420Unorm;
break;
case 2: // alpha (monochrome)
format = vk::Format::eR8Unorm;
break;
}
for (auto & i: input)
{
i = buffer_allocation(
device,
{
.size = buffer_size,
.usage = vk::BufferUsageFlagBits::eTransferSrc,
},
{
.flags = VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT,
.usage = VMA_MEMORY_USAGE_AUTO,
},
"raw stream buffer");
}
input_pos = (uint8_t *)input[0].map();
for (auto & item: image_pool)
{
item.image = image_allocation(
device,
vk::ImageCreateInfo{
.imageType = vk::ImageType::e2D,
.format = format,
.extent = {
.width = extent.width,
.height = extent.height,
.depth = 1,
},
.mipLevels = 1,
.arrayLayers = 1,
.tiling = vk::ImageTiling::eOptimal,
.usage = vk::ImageUsageFlagBits::eSampled | vk::ImageUsageFlagBits::eTransferDst,
},
{
.usage = VMA_MEMORY_USAGE_AUTO,
},
"raw image");
vk::SamplerYcbcrConversionInfo conv{
.conversion = *ycbcr_conversion,
};
vk::ImageViewCreateInfo view_info{
.pNext = format == vk::Format::eG8B8R82Plane420Unorm ? &conv : nullptr,
.image = item.image,
.viewType = vk::ImageViewType::e2D,
.format = format,
.subresourceRange = {
.aspectMask = vk::ImageAspectFlagBits::eColor,
.levelCount = 1,
.layerCount = 1,
},
};
item.view_full = vk::raii::ImageView(device, view_info);
item.semaphore = vk::raii::Semaphore(
device,
vk::StructureChain{
vk::SemaphoreCreateInfo{},
vk::SemaphoreTypeCreateInfo{
.semaphoreType = vk::SemaphoreType::eTimeline,
},
}
.get());
}
}
void raw_decoder::push_data(std::span<std::span<const uint8_t>> data, uint64_t frame_index, bool partial)
{
if (frame_index != current_frame)
{
input_pos = (uint8_t *)input[0].map();
current_frame = frame_index;
}
for (const auto & item: data)
{
memcpy(input_pos, item.data(), item.size_bytes());
input_pos += item.size();
}
}
void raw_decoder::frame_completed(
const from_headset::feedback & feedback,
const to_headset::video_stream_data_shard::view_info_t & view_info)
{
auto item = get_free();
if (not item)
{
spdlog::warn("No image available in pool, discard frame");
return;
}
auto handle = std::make_shared<raw_blit_handle>(
feedback,
view_info,
*item->view_full,
item->image,
extent,
item->current_layout,
*item->semaphore,
item->semaphore_val,
item->free);
auto res = device.waitForFences(*fence, true, UINT64_MAX);
if (res != vk::Result::eSuccess)
spdlog::warn("waitForFences failed");
cmd.reset();
cmd.begin({.flags = vk::CommandBufferUsageFlagBits::eOneTimeSubmit});
if (item->current_layout != vk::ImageLayout::eTransferDstOptimal)
{
item->current_layout = vk::ImageLayout::eTransferDstOptimal;
vk::ImageMemoryBarrier barrier{
.srcAccessMask = vk::AccessFlagBits::eNone,
.dstAccessMask = vk::AccessFlagBits::eMemoryWrite,
.oldLayout = vk::ImageLayout::eUndefined,
.newLayout = item->current_layout,
.image = item->image,
.subresourceRange = {
.aspectMask = vk::ImageAspectFlagBits::eColor,
.levelCount = 1,
.layerCount = 1,
},
};
cmd.pipelineBarrier(
vk::PipelineStageFlagBits::eAllCommands,
vk::PipelineStageFlagBits::eTransfer,
{},
{},
{},
barrier);
}
std::array regions{
vk::BufferImageCopy{
.imageSubresource = {
.aspectMask = vk::ImageAspectFlagBits::ePlane0,
.layerCount = 1,
},
.imageExtent = {
.width = extent.width,
.height = extent.height,
.depth = 1,
},
},
vk::BufferImageCopy{
.bufferOffset = vk::DeviceSize(extent.width * extent.height),
.imageSubresource = {
.aspectMask = vk::ImageAspectFlagBits::ePlane1,
.layerCount = 1,
},
.imageExtent = {
.width = extent.width / 2u,
.height = extent.height / 2u,
.depth = 1,
},
},
};
cmd.copyBufferToImage(
input[0],
item->image,
item->current_layout,
stream_index < 2 ? 2 : 1,
regions.data());
vk::ImageMemoryBarrier barrier{
.srcAccessMask = vk::AccessFlagBits::eMemoryWrite,
.dstAccessMask = vk::AccessFlagBits::eMemoryRead,
.oldLayout = item->current_layout,
.newLayout = vk::ImageLayout::eShaderReadOnlyOptimal,
.image = item->image,
.subresourceRange = {
.aspectMask = vk::ImageAspectFlagBits::eColor,
.levelCount = 1,
.layerCount = 1,
},
};
item->current_layout = barrier.newLayout;
cmd.pipelineBarrier(
vk::PipelineStageFlagBits::eTransfer,
vk::PipelineStageFlagBits::eFragmentShader,
{},
{},
{},
barrier);
cmd.end();
device.resetFences(*fence);
application::get_queue().lock()->submit(
vk::StructureChain{
vk::SubmitInfo{
.commandBufferCount = 1,
.pCommandBuffers = &cmd,
.signalSemaphoreCount = 1,
.pSignalSemaphores = &*item->semaphore,
},
vk::TimelineSemaphoreSubmitInfo{
.signalSemaphoreValueCount = 1,
.pSignalSemaphoreValues = &++item->semaphore_val,
},
}
.get(),
*fence);
if (auto scene = weak_scene.lock())
scene->push_blit_handle(accumulator, std::move(handle));
std::swap(input[0], input[1]);
input_pos = (uint8_t *)input[0].map();
}
raw_decoder::image * raw_decoder::get_free()
{
for (auto & item: image_pool)
{
if (item.free.exchange(false))
return &item;
}
return nullptr;
}
std::vector<wivrn::video_codec> raw_decoder::supported_codecs()
{
return {video_codec::raw};
}
} // namespace wivrn
+90
View File
@@ -0,0 +1,90 @@
/*
* WiVRn VR streaming
* Copyright (C) 2025 Patrick Nicolas <patricknicolas@laposte.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include "decoder.h"
#include "vk/allocation.h"
#include <atomic>
namespace wivrn
{
class raw_decoder : public decoder
{
private:
static const int image_count = 5;
struct image
{
image_allocation image;
vk::raii::ImageView view_full = nullptr;
vk::ImageLayout current_layout = vk::ImageLayout::eUndefined;
std::atomic_bool free = true;
vk::raii::Semaphore semaphore = nullptr;
uint64_t semaphore_val = 0;
};
vk::raii::Device & device;
vk::raii::SamplerYcbcrConversion ycbcr_conversion;
vk::raii::Sampler sampler_;
vk::raii::CommandPool command_pool;
vk::CommandBuffer cmd;
vk::raii::Fence fence;
uint8_t stream_index;
const vk::Extent2D extent;
std::array<image, image_count> image_pool;
std::weak_ptr<scenes::stream> weak_scene;
shard_accumulator * accumulator;
uint64_t current_frame = 0;
std::array<buffer_allocation, 2> input;
uint8_t * input_pos;
from_headset::feedback feedback;
public:
raw_decoder(vk::raii::Device & device,
vk::raii::PhysicalDevice & physical_device,
uint32_t vk_queue_family_index,
const wivrn::to_headset::video_stream_description & description,
uint8_t stream_index,
std::weak_ptr<scenes::stream> scene,
shard_accumulator * accumulator);
void push_data(std::span<std::span<const uint8_t>> data, uint64_t frame_index, bool partial) override;
void frame_completed(
const wivrn::from_headset::feedback & feedback,
const wivrn::to_headset::video_stream_data_shard::view_info_t & view_info) override;
vk::Sampler sampler() override
{
return *sampler_;
}
static std::vector<wivrn::video_codec> supported_codecs();
private:
image * get_free();
};
} // namespace wivrn
+14 -14
View File
@@ -18,9 +18,9 @@
*/
#include "shard_accumulator.h"
#include "application.h"
#include "scenes/stream.h"
#include "scenes/stream.h" // IWYU pragma: keep
#include "spdlog/spdlog.h"
#include "xr/instance.h"
namespace wivrn
{
@@ -55,7 +55,7 @@ static bool is_complete(const shard_set & shards)
const auto & frame = shards.data;
if (frame.empty())
return false;
if (not(frame.back() and frame.back()->flags & video_stream_data_shard::end_of_frame))
if (not(frame.back() and frame.back()->timing_info))
return false;
for (const auto & shard: frame)
if (not shard)
@@ -63,10 +63,10 @@ static bool is_complete(const shard_set & shards)
return true;
}
std::optional<uint16_t> shard_set::insert(data_shard && shard)
std::optional<uint16_t> shard_set::insert(data_shard && shard, xr::instance & instance)
{
if (empty())
feedback.received_first_packet = application::now();
feedback.received_first_packet = instance.now();
auto idx = shard.shard_idx;
if (idx >= data.size())
@@ -99,7 +99,7 @@ static void debug_why_not_sent(const shard_set & shards)
++missing;
}
bool end = frame.back() and frame.back()->flags & video_stream_data_shard::end_of_frame;
bool end = frame.back() and frame.back()->timing_info;
spdlog::info("frame {} was not sent with {} data shards, {}{} missing", frame_idx, data, end ? "" : "at least ", missing);
}
@@ -113,7 +113,7 @@ void shard_accumulator::push_shard(video_stream_data_shard && shard)
{
assert(current.frame_index() + 1 == next.frame_index());
uint8_t frame_diff = shard.frame_idx - current.frame_index();
auto frame_diff = shard.frame_idx - current.frame_index();
if (shard.frame_idx < current.frame_index())
{
// frame is in the past, drop it
@@ -121,12 +121,12 @@ void shard_accumulator::push_shard(video_stream_data_shard && shard)
}
else if (frame_diff == 0)
{
auto shard_idx = current.insert(std::move(shard));
auto shard_idx = current.insert(std::move(shard), instance);
try_submit_frame(shard_idx);
}
else if (frame_diff == 1)
{
next.insert(std::move(shard));
next.insert(std::move(shard), instance);
if (is_complete(next))
{
debug_why_not_sent(current);
@@ -185,13 +185,13 @@ void shard_accumulator::try_submit_frame(uint16_t shard_idx)
for (size_t idx = shard_idx; idx < last_idx; ++idx)
payload.emplace_back(data_shards[idx]->payload);
bool frame_complete = last_idx == data_shards.size() and data_shards.back()->flags & video_stream_data_shard::end_of_frame;
decoder->push_data(payload, data_shards[shard_idx]->frame_idx, not frame_complete);
bool frame_complete = last_idx == data_shards.size() and data_shards.back()->timing_info;
decoder_->push_data(payload, data_shards[shard_idx]->frame_idx, not frame_complete);
if (not frame_complete)
return;
current.feedback.received_last_packet = application::now();
current.feedback.received_last_packet = instance.now();
current.feedback.sent_to_decoder = current.feedback.received_last_packet;
data_shard::timing_info_t timing_info = data_shards.back()->timing_info.value_or(data_shard::timing_info_t{});
current.feedback.encode_begin = timing_info.encode_begin;
@@ -206,7 +206,7 @@ void shard_accumulator::try_submit_frame(uint16_t shard_idx)
}
// Try to extract a frame
decoder->frame_completed(current.feedback, *data_shards.front()->view_info);
decoder_->frame_completed(current.feedback, *data_shards.front()->view_info);
send_feedback(current.feedback);
@@ -216,7 +216,7 @@ void shard_accumulator::try_submit_frame(uint16_t shard_idx)
void shard_accumulator::send_feedback(wivrn::from_headset::feedback & feedback)
{
if (not feedback.received_last_packet)
feedback.received_first_packet = application::now();
feedback.received_first_packet = instance.now();
auto scene = weak_scene.lock();
if (scene)
scene->send_feedback(feedback);
+25 -29
View File
@@ -19,27 +19,30 @@
#pragma once
#include <memory>
#include <vulkan/vulkan.hpp>
#ifdef __ANDROID__
#include "decoder/android/android_decoder.h"
using decoder_impl = ::wivrn::android::decoder;
#else
#include "decoder/ffmpeg/ffmpeg_decoder.h"
using decoder_impl = ::wivrn::ffmpeg::decoder;
#endif
#include "decoder.h"
#include "wivrn_packets.h"
#include <memory>
#include <optional>
#include <vector>
#include <vulkan/vulkan_raii.hpp>
namespace xr
{
class instance;
}
namespace scenes
{
class stream;
}
namespace wivrn
{
class shard_accumulator
{
std::shared_ptr<decoder_impl> decoder;
std::shared_ptr<decoder> decoder_;
public:
using data_shard = wivrn::to_headset::video_stream_data_shard;
@@ -50,7 +53,7 @@ public:
void reset(uint64_t frame_index);
bool empty() const;
std::optional<uint16_t> insert(data_shard &&);
std::optional<uint16_t> insert(data_shard &&, xr::instance & instance);
wivrn::from_headset::feedback feedback{};
@@ -70,41 +73,34 @@ private:
shard_set current;
shard_set next;
std::weak_ptr<scenes::stream> weak_scene;
xr::instance & instance;
public:
explicit shard_accumulator(
vk::raii::Device & device,
vk::raii::PhysicalDevice & physical_device,
const wivrn::to_headset::video_stream_description::item & description,
float fps,
xr::instance & instance,
uint32_t vk_queue_family_index,
const wivrn::to_headset::video_stream_description & description,
std::weak_ptr<scenes::stream> scene,
uint8_t stream_index) :
decoder(std::make_shared<decoder_impl>(device, physical_device, description, fps, stream_index, scene, this)),
decoder_(decoder::make(device, physical_device, vk_queue_family_index, description, stream_index, scene, this)),
current(stream_index),
next(stream_index),
weak_scene(scene)
weak_scene(scene),
instance(instance)
{
next.reset(1);
}
void push_shard(wivrn::to_headset::video_stream_data_shard &&);
auto & desc() const
{
return decoder->desc();
}
vk::Sampler sampler()
{
return decoder->sampler();
return decoder_->sampler();
}
vk::Extent2D image_size()
{
return decoder->image_size();
}
using blit_handle = decoder_impl::blit_handle;
using blit_handle = decoder::blit_handle;
private:
void try_submit_frame(std::optional<uint16_t> shard_idx);
File diff suppressed because it is too large Load Diff
+183
View File
@@ -0,0 +1,183 @@
/*
* WiVRn VR streaming
* Copyright (C) 2026 galister <galister-dev@pm.me>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
#pragma once
#include "decoder/decoder.h"
#include "wivrn_sockets.h"
#include <cstdint>
#include <deque>
#include <exception>
#include <memory>
#include <mutex>
#include <optional>
#include <span>
#include <stop_token>
#include <string>
#include <sys/mman.h>
#include <thread>
#include <vector>
#include <vulkan/vulkan_raii.hpp>
namespace scenes
{
class stream;
}
namespace wivrn
{
class shard_accumulator;
}
namespace wivrn::v4l2
{
class decoder : public wivrn::decoder
{
private:
struct v4l2_blit_handle;
struct mapped_plane
{
void * address = nullptr;
size_t length = 0;
};
struct output_buffer
{
std::vector<mapped_plane> planes;
~output_buffer()
{
for (auto & p: planes)
if (p.address && p.address != MAP_FAILED)
munmap(p.address, p.length);
}
};
struct capture_buffer
{
std::vector<size_t> plane_lengths;
vk::raii::DeviceMemory memory = nullptr;
vk::raii::Image image = nullptr;
vk::raii::ImageView image_view = nullptr;
vk::ImageLayout current_layout = vk::ImageLayout::eUndefined;
bool held_by_vulkan = false;
};
struct pending_frame
{
uint64_t timestamp = 0;
wivrn::from_headset::feedback feedback;
wivrn::to_headset::video_stream_data_shard::view_info_t view_info;
};
struct ready_output
{
uint32_t buffer_index;
size_t bytes_used;
pending_frame pending;
};
struct assembling_frame
{
uint32_t buffer_index;
size_t bytes_used;
uint64_t frame_index;
};
vk::raii::Device & device;
vk::raii::PhysicalDevice & physical_device;
vk::raii::SamplerYcbcrConversion ycbcr_conversion = nullptr;
vk::raii::Sampler ycbcr_sampler = nullptr;
vk::Format capture_vk_format = vk::Format::eUndefined;
wivrn::fd_base fd;
std::vector<output_buffer> output_buffers;
std::vector<capture_buffer> capture_buffers;
std::vector<unsigned int> free_output_buffers;
std::deque<pending_frame> pending_frames;
std::deque<ready_output> input_queue;
std::mutex input_mutex;
std::optional<assembling_frame> assembling;
std::optional<uint64_t> dropped_frame_index;
std::mutex output_mutex;
std::deque<unsigned int> recycle_capture_queue;
std::deque<unsigned int> recycle_capture_local;
std::mutex recycle_mutex;
wivrn::fd_base wake_fd;
std::jthread worker;
std::exception_ptr worker_exception;
std::mutex worker_exception_mutex;
uint64_t next_timestamp = 1;
unsigned int queued_output_count = 0;
uint32_t capture_width = 0;
uint32_t capture_height = 0;
uint32_t capture_bytesperline = 0;
uint32_t capture_sizeimage = 0;
uint32_t capture_pixelformat = 0;
uint32_t capture_num_planes = 0;
bool output_streaming = false;
bool capture_streaming = false;
std::weak_ptr<scenes::stream> weak_scene;
shard_accumulator * accumulator;
const vk::Extent2D extent;
const wivrn::video_codec codec_type;
const uint32_t vk_queue_family_index;
void setup_device(wivrn::fd_base device_fd);
void setup_output_queue();
void setup_capture_queue();
void teardown_capture_queue();
void setup_ycbcr_sampler();
void import_capture_buffer(unsigned int index, const std::vector<size_t> & plane_lengths);
void initialize_capture_ownership();
void queue_capture_buffer(unsigned int index);
void release_capture_buffer(unsigned int index);
void recycle_capture_buffers();
void handle_events();
void reclaim_output_buffers();
void drain_capture();
void queue_ready_frames();
void queue_output_buffer(const ready_output & ready);
void abandon_assembling_frame();
void worker_loop(std::stop_token stop_token);
void wake_worker();
void rethrow_worker_exception();
void submit_capture(unsigned int capture_index, uint64_t timestamp);
pending_frame take_pending(uint64_t timestamp);
public:
decoder(vk::raii::Device & device,
vk::raii::PhysicalDevice & physical_device,
uint32_t vk_queue_family_index,
const wivrn::to_headset::video_stream_description & description,
uint8_t stream_index,
std::weak_ptr<scenes::stream> scene,
shard_accumulator * accumulator);
~decoder() override;
void push_data(std::span<std::span<const uint8_t>> data, uint64_t frame_index, bool partial) override;
void frame_completed(
const wivrn::from_headset::feedback & feedback,
const wivrn::to_headset::video_stream_data_shard::view_info_t & view_info) override;
vk::Sampler sampler() override
{
return *ycbcr_sampler;
}
static bool available_for(wivrn::video_codec codec);
static bool supports_10bit(wivrn::video_codec codec);
static void supported_codecs(std::vector<wivrn::video_codec> & result);
};
} // namespace wivrn::v4l2
+90
View File
@@ -0,0 +1,90 @@
/*
* WiVRn VR streaming
* Copyright (C) 2025 Guillaume Meunier <guillaume.meunier@centraliens.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "file_picker.h"
#include "application.h"
#include "utils/mapped_file.h"
#include <exception>
#ifdef __ANDROID__
#include "android/intent.h"
#endif
std::future<file_picker_result> file_picker::open()
{
// Put it in a shared_ptr because clang does not support std::move_only_function
auto promise = std::make_shared<std::promise<file_picker_result>>();
auto future = promise->get_future();
#ifdef __ANDROID__
// https://developer.android.com/training/data-storage/shared/documents-files#open
// https://developer.android.com/reference/android/content/Intent#ACTION_OPEN_DOCUMENT
// https://developer.android.com/guide/components/intents-common#OpenFile
intent open_doc{"android.intent.action.OPEN_DOCUMENT"}; // Intent.ACTION_OPEN_DOCUMENT
open_doc.set_type("*/*");
open_doc.add_category("android.intent.category.OPENABLE"); // Intent.CATEGORY_OPENABLE
open_doc.start([promise](int result_code, intent && data) mutable {
try
{
if (result_code == -1 /* Activity.RESULT_OK */)
{
auto uri = data.get_uri();
auto uri_string = (std::string)uri.call<jni::string>("toString");
jni::object<""> activity(application::native_app()->activity->clazz);
auto content_resolver = activity.call<jni::object<"android/content/ContentResolver">>("getContentResolver");
content_resolver.call<void>("takePersistableUriPermission", uri, jni::Int{1} /* Intent.FLAG_GRANT_READ_URI_PERMISSION */);
auto pfd = content_resolver.call<jni::object<"android/os/ParcelFileDescriptor">>("openFileDescriptor", uri, jni::string{"r"});
int fd = pfd.call<int>("getFd");
// The file descriptor is owned by the ParcelFileDescriptor, dup it before
// passing it to mapped_file to ensure the original fd is not closed
promise->set_value({
.accepted = true,
.path = uri_string,
.file = utils::mapped_file{fd},
});
}
else
{
promise->set_value({.accepted = false});
}
}
catch (...)
{
promise->set_exception(std::current_exception());
}
});
#else
// TODO
#endif
return future;
}
void file_picker::display()
{
#ifdef __ANDROID__
// No-op on Android, the file picker is displayed by the OS
#else
// TODO
#endif
}
+41
View File
@@ -0,0 +1,41 @@
/*
* WiVRn VR streaming
* Copyright (C) 2025 Guillaume Meunier <guillaume.meunier@centraliens.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include "utils/mapped_file.h"
#include <future>
struct file_picker_result
{
bool accepted = false;
std::filesystem::path path;
utils::mapped_file file;
operator bool() const
{
return accepted;
}
};
class file_picker
{
public:
[[nodiscard]] std::future<file_picker_result> open();
void display();
};
+474
View File
@@ -0,0 +1,474 @@
/*
* WiVRn VR streaming
* Copyright (C) 2026 galister <galister-dev@pm.me>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "foveation.h"
#include "application.h"
#include "xr/instance.h"
#include "xr/session.h"
#include "xr/system.h"
#include <algorithm>
#include <cassert>
#include <cmath>
#include <spdlog/spdlog.h>
#include <stdexcept>
namespace
{
float convergence_angle(float distance, float eye_x, float yaw)
{
const float target_x = distance * std::sin(yaw);
const float target_z = distance * std::cos(yaw);
return std::atan2(target_x - eye_x, target_z);
}
XrVector2f yaw_pitch(const XrQuaternionf & q)
{
const float sine_theta = std::clamp(-2.0f * (q.y * q.z - q.w * q.x), -1.0f, 1.0f);
const float pitch = std::asin(sine_theta);
if (std::abs(sine_theta) > 0.99999f)
{
const float scale = std::copysign(2.0f, sine_theta);
return {scale * std::atan2(-q.z, q.w), pitch};
}
return {
std::atan2(2.0f * (q.x * q.z + q.w * q.y),
q.w * q.w - q.x * q.x - q.y * q.y + q.z * q.z),
pitch};
}
float ndc_to_angle(float center, float a0, float a1)
{
const float u = std::clamp(center * 0.5f + 0.5f, 0.0f, 1.0f);
const float tangent = std::lerp(std::tan(a0), std::tan(a1), u);
return std::atan(tangent);
}
client_foveation::angles center_to_angles(const std::array<XrVector2f, 2> & center, std::span<const XrFovf> fovs)
{
assert(fovs.size() == 2);
client_foveation::angles result{};
for (size_t i = 0; i < result.size(); ++i)
{
result[i].x = ndc_to_angle(center[i].x, fovs[i].angleLeft, fovs[i].angleRight);
result[i].y = ndc_to_angle(center[i].y, fovs[i].angleUp, fovs[i].angleDown);
}
return result;
}
bool fov_equal(const XrFovf & a, const XrFovf & b, const float epsilon)
{
return std::abs(a.angleLeft - b.angleLeft) <= epsilon and
std::abs(a.angleRight - b.angleRight) <= epsilon and
std::abs(a.angleUp - b.angleUp) <= epsilon and
std::abs(a.angleDown - b.angleDown) <= epsilon;
}
client_foveation::angles target_angles(
float yaw,
float pitch,
float convergence_distance,
std::span<const XrView> views)
{
assert(views.size() == 2);
client_foveation::angles result{};
for (size_t i = 0; i < result.size(); ++i)
{
result[i].x = convergence_angle(convergence_distance, views[i].pose.position.x, yaw);
result[i].y = pitch;
}
return result;
}
std::optional<client_foveation::angles> eye_gaze_angles(
XrTime time,
XrViewStateFlags view_flags,
std::span<const XrView> views)
{
if (not(view_flags & XR_VIEW_STATE_POSITION_VALID_BIT))
return std::nullopt;
auto gaze_quat = application::instance().locate_gaze(time);
if (not gaze_quat)
return std::nullopt;
const XrVector2f gaze = yaw_pitch(*gaze_quat);
return target_angles(-gaze.x, gaze.y, client_foveation::default_convergence_distance, views);
}
} // namespace
namespace client_foveation
{
center::center(xr::instance & inst, xr::system & sys, xr::session & xr_session, vk::raii::Device & vk_device, vk::raii::CommandPool & vk_commandpool, thread_safe<vk::raii::Queue> & vk_queue, vk::Format format) :
instance(inst),
session(xr_session),
device(vk_device),
commandpool(vk_commandpool),
queue(vk_queue),
swapchain_format(format)
{
if (application::get_foveation_center_supported() and
application::get_foveation_vulkan_supported() and
inst.has_extension(XR_META_FOVEATION_EYE_TRACKED_EXTENSION_NAME) and
inst.has_extension(XR_FB_FOVEATION_EXTENSION_NAME) and
inst.has_extension(XR_FB_FOVEATION_CONFIGURATION_EXTENSION_NAME) and
inst.has_extension(XR_FB_FOVEATION_VULKAN_EXTENSION_NAME) and
inst.has_extension(XR_FB_SWAPCHAIN_UPDATE_STATE_EXTENSION_NAME) and
inst.has_extension(XR_META_VULKAN_SWAPCHAIN_CREATE_INFO_EXTENSION_NAME) and
sys.foveation_eye_tracked_properties().supportsFoveationEyeTracked)
{
xrCreateFoveationProfileFB = inst.get_proc<PFN_xrCreateFoveationProfileFB>("xrCreateFoveationProfileFB");
xrDestroyFoveationProfileFB = inst.get_proc<PFN_xrDestroyFoveationProfileFB>("xrDestroyFoveationProfileFB");
xrUpdateSwapchainFB = inst.get_proc<PFN_xrUpdateSwapchainFB>("xrUpdateSwapchainFB");
xrGetFoveationEyeTrackedStateMETA = inst.get_proc<PFN_xrGetFoveationEyeTrackedStateMETA>("xrGetFoveationEyeTrackedStateMETA");
if (xrCreateFoveationProfileFB and xrDestroyFoveationProfileFB and
xrUpdateSwapchainFB and xrGetFoveationEyeTrackedStateMETA)
{
XrFoveationEyeTrackedProfileCreateInfoMETA eye_tracked_info{
.type = XR_TYPE_FOVEATION_EYE_TRACKED_PROFILE_CREATE_INFO_META,
.flags = 0,
};
XrFoveationLevelProfileCreateInfoFB level_info{
.type = XR_TYPE_FOVEATION_LEVEL_PROFILE_CREATE_INFO_FB,
.next = &eye_tracked_info,
.level = XR_FOVEATION_LEVEL_LOW_FB,
.verticalOffset = 0,
.dynamic = XR_FOVEATION_DYNAMIC_DISABLED_FB,
};
XrFoveationProfileCreateInfoFB profile_info{
.type = XR_TYPE_FOVEATION_PROFILE_CREATE_INFO_FB,
.next = &level_info,
};
XrFoveationProfileFB raw_profile = XR_NULL_HANDLE;
XrResult profile_result = xrCreateFoveationProfileFB(session, &profile_info, &raw_profile);
if (XR_SUCCEEDED(profile_result))
foveation_profile.emplace(raw_profile, xrDestroyFoveationProfileFB);
}
}
if (foveation_profile.has_value())
spdlog::info("XR_META_foveation_eye_tracked will be used for this stream");
else if (application::get_eye_gaze_supported())
spdlog::info("Eye gaze tracking will be used for this stream");
else
spdlog::info("Static foveation will be used for this stream");
auto [flags, views] = session.locate_views(
XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO,
instance.now(),
application::space(xr::spaces::view));
(void)flags;
assert(views.size() == headset_fov.size());
for (size_t i = 0; i < headset_fov.size(); ++i)
headset_fov[i] = views[i].fov;
const auto & config = application::get_config();
set_manual_mode({
.enabled = config.override_foveation_enable,
.pitch = config.override_foveation_pitch,
.distance = config.override_foveation_distance,
});
}
// member order ensures swapchain is dropped before foveation profile
center::~center() = default;
bool center::supports_meta() const
{
return foveation_profile.has_value();
}
manual_override center::get_manual_mode() const
{
return *manual_mode_.lock();
}
void center::set_manual_mode(manual_override mode)
{
*manual_mode_.lock() = mode;
}
bool center::is_cropped(std::span<const XrFovf> submitted_fov, std::span<const bool> valid) const
{
assert(submitted_fov.size() == view_count and valid.size() == view_count);
for (size_t i = 0; i < view_count; ++i)
{
// generous epsilon of ~6° per-side to filter out false positives
if (valid[i] and not fov_equal(submitted_fov[i], headset_fov[i], 0.1f))
return true;
}
return false;
}
bool center::needs_swapchain_recreation(bool cropped) const
{
return supports_meta() and (not cropped_mode or *cropped_mode != cropped);
}
bool center::use_meta_swapchain(bool cropped) const
{
return supports_meta() and not cropped;
}
void center::set_cropped(bool cropped)
{
if (not cropped_mode or *cropped_mode != cropped)
spdlog::info("Stream FOV mode: {}", cropped ? "cropped" : "full");
cropped_mode = cropped;
}
void center::on_swapchain_recreated(bool cropped)
{
dummy_swapchain = {};
if (supports_meta() and cropped)
create_dummy_swapchain();
set_cropped(cropped);
}
bool center::update_meta_swapchain(XrSwapchain swapchain) const
{
if (not supports_meta() or not swapchain)
return false;
XrSwapchainStateFoveationFB swapchain_state{
.type = XR_TYPE_SWAPCHAIN_STATE_FOVEATION_FB,
.flags = 0,
.profile = *foveation_profile,
};
XrResult update_result = xrUpdateSwapchainFB(
swapchain,
reinterpret_cast<const XrSwapchainStateBaseHeaderFB *>(&swapchain_state));
return XR_SUCCEEDED(update_result);
}
std::optional<angles> center::meta_angles(XrSwapchain swapchain, std::span<const XrFovf> fov) const
{
if (not update_meta_swapchain(swapchain))
return {};
XrFoveationEyeTrackedStateMETA state{
.type = XR_TYPE_FOVEATION_EYE_TRACKED_STATE_META,
};
XrResult result = xrGetFoveationEyeTrackedStateMETA(session, &state);
if (XR_FAILED(result) or not(state.flags & XR_FOVEATION_EYE_TRACKED_STATE_VALID_BIT_META))
return {};
std::array<XrVector2f, view_count> ndc_center{state.foveationCenter[0], state.foveationCenter[1]};
return center_to_angles(ndc_center, fov);
}
void center::update(std::span<const XrFovf> submitted_fov, std::span<const bool> valid, XrSwapchain stream_swapchain, XrTime display_time)
{
assert(submitted_fov.size() == view_count and valid.size() == view_count);
layer_.reset();
packet_.reset();
XrSpace view_space = application::space(xr::spaces::view);
auto [view_flags, views] = session.locate_views(
XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO, display_time, view_space);
constexpr XrViewStateFlags layer_flags =
XR_VIEW_STATE_POSITION_VALID_BIT | XR_VIEW_STATE_ORIENTATION_VALID_BIT;
if (supports_meta() and cropped_mode.value_or(false) and dummy_swapchain and
views.size() == view_count and (view_flags & layer_flags) == layer_flags)
{
projection_layer layer{
.flags = XR_COMPOSITION_LAYER_BLEND_TEXTURE_SOURCE_ALPHA_BIT,
.space = view_space,
};
for (size_t i = 0; i < view_count; ++i)
{
layer.views[i] = {
.type = XR_TYPE_COMPOSITION_LAYER_PROJECTION_VIEW,
.pose = views[i].pose,
.fov = headset_fov[i],
.subImage = {
.swapchain = dummy_swapchain,
.imageRect = {
.offset = {0, 0},
.extent = {dummy_swapchain_size, dummy_swapchain_size},
},
.imageArrayIndex = uint32_t(i),
},
};
}
layer_ = layer;
}
if (views.size() != view_count or not(view_flags & XR_VIEW_STATE_POSITION_VALID_BIT))
return;
// dummy layer is always full FOV
std::array<XrFovf, view_count> effective_fov{};
for (size_t i = 0; i < view_count; ++i)
effective_fov[i] = valid[i] ? submitted_fov[i] : headset_fov[i];
const XrSwapchain meta_swapchain = cropped_mode.value_or(false) ? static_cast<XrSwapchain>(dummy_swapchain) : stream_swapchain;
const std::span<const XrFovf> meta_fov = cropped_mode.value_or(false) ? std::span<const XrFovf>(headset_fov) : std::span<const XrFovf>(effective_fov);
const auto manual = get_manual_mode();
std::optional<angles> angles;
if (manual.enabled)
{
if (supports_meta())
update_meta_swapchain(meta_swapchain);
angles = target_angles(0, manual.pitch, manual.distance, views);
}
else
{
if (supports_meta())
{
if (auto a = meta_angles(meta_swapchain, meta_fov))
angles = *a;
}
if (not angles and application::get_eye_gaze_supported())
{
if (auto a = eye_gaze_angles(display_time,
view_flags,
views))
angles = *a;
}
if (not angles)
angles = target_angles(0, default_foveation_pitch, default_convergence_distance, views);
}
// angles guaranteed to have a value at this point
packet_ = wivrn::from_headset::foveation{.angles = *angles};
}
std::optional<center::projection_layer> center::get_layer() const
{
return layer_;
}
std::optional<wivrn::from_headset::foveation> center::take_packet()
{
// A skipped render must not resend the previous frame's center.
auto result = packet_;
packet_.reset();
return result;
}
void center::create_dummy_swapchain()
{
device.waitIdle();
dummy_swapchain = xr::swapchain(
instance,
session,
device,
swapchain_format,
dummy_swapchain_size,
dummy_swapchain_size,
1,
view_count,
true,
true);
if (not update_meta_swapchain(dummy_swapchain))
throw std::runtime_error("Failed to apply eye-tracked foveation profile to dummy swapchain");
const int image_index = dummy_swapchain.acquire();
dummy_swapchain.wait();
auto clear_command_buffer = std::move(device.allocateCommandBuffers({
.commandPool = *commandpool,
.level = vk::CommandBufferLevel::ePrimary,
.commandBufferCount = 1,
})[0]);
auto clear_fence = device.createFence({});
clear_command_buffer.begin(vk::CommandBufferBeginInfo{
.flags = vk::CommandBufferUsageFlagBits::eOneTimeSubmit,
});
vk::ImageMemoryBarrier to_transfer{
.srcAccessMask = vk::AccessFlagBits::eNone,
.dstAccessMask = vk::AccessFlagBits::eTransferWrite,
.oldLayout = vk::ImageLayout::eUndefined,
.newLayout = vk::ImageLayout::eTransferDstOptimal,
.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED,
.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED,
.image = dummy_swapchain.image(image_index),
.subresourceRange = {
.aspectMask = vk::ImageAspectFlagBits::eColor,
.baseMipLevel = 0,
.levelCount = 1,
.baseArrayLayer = 0,
.layerCount = view_count,
},
};
clear_command_buffer.pipelineBarrier(
vk::PipelineStageFlagBits::eTopOfPipe,
vk::PipelineStageFlagBits::eTransfer,
{},
{},
{},
to_transfer);
clear_command_buffer.clearColorImage(
dummy_swapchain.image(image_index),
vk::ImageLayout::eTransferDstOptimal,
vk::ClearColorValue{std::array<float, 4>{0, 0, 0, 0}},
to_transfer.subresourceRange);
vk::ImageMemoryBarrier to_runtime{
.srcAccessMask = vk::AccessFlagBits::eTransferWrite,
.dstAccessMask = vk::AccessFlagBits::eMemoryRead,
.oldLayout = vk::ImageLayout::eTransferDstOptimal,
.newLayout = vk::ImageLayout::eColorAttachmentOptimal,
.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED,
.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED,
.image = dummy_swapchain.image(image_index),
.subresourceRange = to_transfer.subresourceRange,
};
clear_command_buffer.pipelineBarrier(
vk::PipelineStageFlagBits::eTransfer,
vk::PipelineStageFlagBits::eAllCommands,
{},
{},
{},
to_runtime);
clear_command_buffer.end();
vk::SubmitInfo submit_info;
submit_info.setCommandBuffers(*clear_command_buffer);
queue.lock()->submit(submit_info, *clear_fence);
if (device.waitForFences(*clear_fence, VK_TRUE, UINT64_MAX) == vk::Result::eTimeout)
throw std::runtime_error("Vulkan fence timeout while clearing foveation dummy swapchain");
dummy_swapchain.release();
spdlog::info(
"Created {}x{} eye-tracked foveation dummy swapchain",
dummy_swapchain_size,
dummy_swapchain_size);
}
} // namespace client_foveation
+112
View File
@@ -0,0 +1,112 @@
/*
* WiVRn VR streaming
* Copyright (C) 2026 galister <galister-dev@pm.me>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include "utils/handle.h"
#include "utils/thread_safe.h"
#include "wivrn_packets.h"
#include "xr/swapchain.h"
#include <array>
#include <optional>
#include <span>
#include <openxr/openxr.h>
namespace xr
{
class instance;
class session;
class system;
} // namespace xr
namespace client_foveation
{
using angles = std::array<XrVector2f, 2>;
inline constexpr float default_convergence_distance = 1.0f;
// Default foveation target is 1 m forward and 10 degrees below horizontal.
inline constexpr float default_foveation_pitch = -0.17453292519943295f; // -10 degrees
struct manual_override
{
bool enabled = false;
float pitch = default_foveation_pitch;
float distance = default_convergence_distance;
};
// Unified class for static, meta and eye-gaze based foveation.
class center
{
public:
static constexpr size_t view_count = 2;
static constexpr int32_t dummy_swapchain_size = 512;
struct projection_layer
{
XrCompositionLayerFlags flags;
XrSpace space;
std::array<XrCompositionLayerProjectionView, view_count> views;
};
center(xr::instance &, xr::system &, xr::session &, vk::raii::Device &, vk::raii::CommandPool &, thread_safe<vk::raii::Queue> &, vk::Format swapchain_format);
~center();
bool supports_meta() const;
manual_override get_manual_mode() const;
void set_manual_mode(manual_override mode);
bool is_cropped(std::span<const XrFovf> submitted_fov, std::span<const bool> valid) const;
bool needs_swapchain_recreation(bool cropped) const;
bool use_meta_swapchain(bool cropped) const;
void on_swapchain_recreated(bool cropped);
void set_cropped(bool cropped);
void update(std::span<const XrFovf> submitted_fov, std::span<const bool> valid, XrSwapchain stream_swapchain, XrTime display_time);
std::optional<projection_layer> get_layer() const;
std::optional<wivrn::from_headset::foveation> take_packet();
private:
mutable thread_safe<manual_override> manual_mode_{};
xr::instance & instance;
xr::session & session;
vk::raii::Device & device;
vk::raii::CommandPool & commandpool;
thread_safe<vk::raii::Queue> & queue;
vk::Format swapchain_format;
PFN_xrCreateFoveationProfileFB xrCreateFoveationProfileFB = nullptr;
PFN_xrDestroyFoveationProfileFB xrDestroyFoveationProfileFB = nullptr;
PFN_xrUpdateSwapchainFB xrUpdateSwapchainFB = nullptr;
PFN_xrGetFoveationEyeTrackedStateMETA xrGetFoveationEyeTrackedStateMETA = nullptr;
std::optional<utils::handle<XrFoveationProfileFB>> foveation_profile;
std::array<XrFovf, view_count> headset_fov{};
std::optional<bool> cropped_mode;
xr::swapchain dummy_swapchain;
std::optional<projection_layer> layer_;
std::optional<wivrn::from_headset::foveation> packet_;
bool update_meta_swapchain(XrSwapchain swapchain) const;
std::optional<angles> meta_angles(XrSwapchain swapchain, std::span<const XrFovf> fov) const;
void create_dummy_swapchain();
};
} // namespace client_foveation

Some files were not shown because too many files have changed in this diff Show More