Compare commits
56
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8b25a85843 | ||
|
|
53a6efe27a | ||
|
|
248a533d0e | ||
|
|
bd2f6a632e | ||
|
|
e2d9641019 | ||
|
|
b24c6e5ea1 | ||
|
|
cd72cf68b0 | ||
|
|
f7b77d21b8 | ||
|
|
5bf4da0c50 | ||
|
|
512eb5a45b | ||
|
|
774702007d | ||
|
|
c2c94a57bb | ||
|
|
908d21ffec | ||
|
|
1165fdbe0a | ||
|
|
5130bdeda5 | ||
|
|
38b64fe09c | ||
|
|
de7b1aba11 | ||
|
|
adcf159916 | ||
|
|
7f60c4e179 | ||
|
|
b630771522 | ||
|
|
07dfd529db | ||
|
|
fb3592244a | ||
|
|
c84cc9cc2c | ||
|
|
e8b0312835 | ||
|
|
f97cac0b85 | ||
|
|
8297c38d7f | ||
|
|
9ea224b049 | ||
|
|
d88d8230d4 | ||
|
|
a33fae434e | ||
|
|
b53261d981 | ||
|
|
d6fb4d6f36 | ||
|
|
7756002896 | ||
|
|
61152d95a0 | ||
|
|
4b103ef6b0 | ||
|
|
aa86ee7212 | ||
|
|
ac3003ef54 | ||
|
|
4a0a5818ae | ||
|
|
d9dc4fb8df | ||
|
|
d3e7201774 | ||
|
|
b5fc4ce293 | ||
|
|
309bd92fbb | ||
|
|
8b1de4ab71 | ||
|
|
917032b254 | ||
|
|
b29abf073e | ||
|
|
03b121fa55 | ||
|
|
bc7d0ad6e0 | ||
|
|
a68a068898 | ||
|
|
bb0c847b92 | ||
|
|
d90baecfef | ||
|
|
f59015654c | ||
|
|
a0f6a2247d | ||
|
|
ca053be9a7 | ||
|
|
4125cad44e | ||
|
|
6969e5f972 | ||
|
|
d0250abbc9 | ||
|
|
7485cd0880 |
@@ -77,6 +77,7 @@ body:
|
||||
- Quest 3
|
||||
- Quest 3S
|
||||
- Pico 4
|
||||
- Pico 4 Pro/Enterprise
|
||||
- Pico Neo 3
|
||||
- HTC Vive Focus 3
|
||||
- HTC Vive XR Elite
|
||||
|
||||
@@ -22,14 +22,14 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
# Checkout from upstream instead of WiVRn-APK to ensure the GIT_DESC variable is set correctly
|
||||
repository: 'WiVRn/WiVRn'
|
||||
repository: 'Vindicus999/WiVRn'
|
||||
ref: ${{ github.sha }}
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'Vindicus999/WiVRn'
|
||||
ref: sneed
|
||||
#
|
||||
# - uses: actions/checkout@v4
|
||||
# with:
|
||||
# repository: 'Vindicus999/WiVRn'
|
||||
# ref: sneed
|
||||
|
||||
- name: set up JDK
|
||||
uses: actions/setup-java@v4
|
||||
|
||||
@@ -150,6 +150,18 @@ jobs:
|
||||
include-hidden-files: true
|
||||
retention-days: 1
|
||||
|
||||
nix-test:
|
||||
name: Test Nix package and devshell
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
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
|
||||
@@ -462,7 +474,7 @@ jobs:
|
||||
|
||||
- name: Download monado
|
||||
run: |
|
||||
MONADO_COMMIT=$(grep -zo "FetchContent_Declare(monado[^)]*)" wivrn/CMakeLists.txt | sed -ze "s/^.*GIT_TAG *\([^ )]*\).*$/\1/" | tr -d '\0')
|
||||
MONADO_COMMIT=$(cat wivrn/monado-rev)
|
||||
wget https://gitlab.freedesktop.org/monado/monado/-/archive/$MONADO_COMMIT/monado-$MONADO_COMMIT.tar.gz
|
||||
|
||||
mkdir wivrn/monado-src
|
||||
@@ -470,7 +482,10 @@ jobs:
|
||||
|
||||
- name: Patch monado
|
||||
working-directory: wivrn/monado-src
|
||||
run: ../patches/apply.sh ../patches/monado/*
|
||||
run: >
|
||||
for p in ../patches/monado/*; do
|
||||
patch -p1 --fuzz=0 --forward < "$p"
|
||||
done
|
||||
|
||||
- name: Edit changelog
|
||||
working-directory: wivrn
|
||||
@@ -510,10 +525,21 @@ jobs:
|
||||
fetch-depth: 0
|
||||
path: wivrn
|
||||
|
||||
- name: Check for FLATHUB_TOKEN
|
||||
id: flathub-token-check
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ "${{ secrets.FLATHUB_TOKEN}}" != '' ]]; then
|
||||
echo "available=true" >> $GITHUB_OUTPUT;
|
||||
else
|
||||
echo "available=false" >> $GITHUB_OUTPUT;
|
||||
fi
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
if: ${{ steps.flathub-token-check.outputs.available == 'true' }}
|
||||
with:
|
||||
fetch-depth: 0
|
||||
repository: WiVRn/io.github.wivrn.wivrn
|
||||
repository: ${{ github.repository_owner }}/io.github.wivrn.wivrn
|
||||
path: flathub
|
||||
token: ${{ secrets.FLATHUB_TOKEN }}
|
||||
|
||||
@@ -541,13 +567,14 @@ jobs:
|
||||
flatpak/*.flatpak
|
||||
|
||||
- name: Update flatpak manifest for flathub
|
||||
if: ${{ steps.flathub-token-check.outputs.available == 'true' }}
|
||||
run: |
|
||||
WIVRN_TAG=$(echo $GITHUB_REF | sed -E -e "s,refs/[^/]*/v?,,")
|
||||
|
||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git config --global user.name "github-actions[bot]"
|
||||
|
||||
apt install python-toml python-aiohttp
|
||||
sudo apt-get install python-toml python-aiohttp
|
||||
|
||||
cd flathub
|
||||
git remote add upstream https://github.com/flathub/io.github.wivrn.wivrn.git
|
||||
@@ -568,8 +595,9 @@ jobs:
|
||||
- name: Update release branch
|
||||
run: |
|
||||
cd wivrn
|
||||
git fetch origin release
|
||||
git push origin HEAD:release
|
||||
if git fetch origin release; then
|
||||
git push origin HEAD:release
|
||||
fi
|
||||
|
||||
sync_fork_downstream:
|
||||
name: Sync fork downstream
|
||||
|
||||
@@ -16,7 +16,19 @@ jobs:
|
||||
steps:
|
||||
- name: GitHub Sync to Upstream Repository
|
||||
uses: dabreadman/sync-upstream-repo@v1.3.0
|
||||
with:
|
||||
with:
|
||||
upstream_repo: ${{ env.UPSTREAM_URL }}
|
||||
upstream_branch: ${{ env.UPSTREAM_BRANCH }}
|
||||
token: ${{ env.WORKFLOW_TOKEN }}
|
||||
|
||||
- name: Checkout stuff
|
||||
uses: actions/checkout@master
|
||||
|
||||
- name: Merge sneed -> master
|
||||
uses: devmasx/merge-branch@master
|
||||
with:
|
||||
type: now
|
||||
from_branch: sneed
|
||||
target_branch: master
|
||||
github_token: ${{ env.WORKFLOW_TOKEN }}
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
<uses-permission android:name="com.oculus.permission.EYE_TRACKING" />
|
||||
<uses-permission android:name="com.picovr.permission.EYE_TRACKING" />
|
||||
<uses-permission android:name="com.oculus.permission.FACE_TRACKING" />
|
||||
<uses-permission android:name="com.picovr.permission.FACE_TRACKING" />
|
||||
|
||||
<!-- Required for XR_FB_render_model -->
|
||||
<uses-feature android:name="com.oculus.feature.RENDER_MODEL" android:required="false" />
|
||||
@@ -70,6 +71,7 @@
|
||||
<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" />
|
||||
<meta-data android:name="picovr.software.face_tracking" android:value="true" />
|
||||
<meta-data android:name="com.oculus.intent.category.VR" android:value="vr_only"/>
|
||||
<meta-data android:name="com.oculus.supportedDevices" android:value="${ComOculusSupportedDevices}"/> <!-- "quest2|questpro|quest3" on Oculus Store, "all" otherwise -->
|
||||
<meta-data android:name="com.oculus.vr.focusaware" android:value="true"/>
|
||||
|
||||
+3
-2
@@ -46,7 +46,7 @@ set(OVR_COMPAT_SEARCH_PATH "/usr/local/lib/OpenComposite:/usr/lib/OpenComposite:
|
||||
|
||||
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_SOLARXR "Enable SolarXR driver" OFF)
|
||||
option(WIVRN_FEATURE_STEAMVR_LIGHTHOUSE "Enable SteamVR Lighthouse driver" OFF)
|
||||
|
||||
option(WIVRN_CHECK_CAPSYSNICE "Check if CAP_SYS_NICE is available at startup" ON)
|
||||
@@ -284,11 +284,12 @@ FetchContent_Declare(uni-algo EXCLUDE_FROM_ALL SYSTEM URL https://github.co
|
||||
URL_HASH SHA256=f2a1539cd8635bc6088d05144a73ecfe7b4d74ee0361fabed6f87f9f19e74ca9)
|
||||
|
||||
file(GLOB MONADO_PATCHES CONFIGURE_DEPENDS patches/monado/*)
|
||||
file(READ monado-rev MONADO_REV)
|
||||
# Server dependencies
|
||||
FetchContent_Declare(monado
|
||||
GIT_REPOSITORY https://gitlab.freedesktop.org/monado/monado
|
||||
# The flatpak manifest is updated automatically
|
||||
GIT_TAG 2a6932d46dad9aa957205e8a47ec2baa33041076
|
||||
GIT_TAG ${MONADO_REV}
|
||||
PATCH_COMMAND ${CMAKE_CURRENT_LIST_DIR}/patches/apply.sh ${MONADO_PATCHES}
|
||||
EXCLUDE_FROM_ALL
|
||||
)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 581 B After Width: | Height: | Size: 306 B |
+3
-13
@@ -225,14 +225,8 @@ 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})
|
||||
|
||||
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
|
||||
)
|
||||
${ASSETS_DIR}/wivrn.png)
|
||||
|
||||
add_dependencies(wivrn assets)
|
||||
|
||||
@@ -241,9 +235,6 @@ if(ANDROID)
|
||||
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
|
||||
@@ -255,10 +246,9 @@ if(ANDROID)
|
||||
|
||||
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
|
||||
)
|
||||
${ASSETS_DIR}/vr_splash.png)
|
||||
|
||||
add_dependencies(assets-android assets)
|
||||
add_dependencies(wivrn assets-android)
|
||||
endif()
|
||||
|
||||
+26
-4
@@ -19,6 +19,7 @@
|
||||
|
||||
#include "application.h"
|
||||
#include "asset.h"
|
||||
#include "hardware.h"
|
||||
#include "openxr/openxr.h"
|
||||
#include "scene.h"
|
||||
#include "spdlog/common.h"
|
||||
@@ -30,6 +31,7 @@
|
||||
#include "wifi_lock.h"
|
||||
#include "xr/actionset.h"
|
||||
#include "xr/check.h"
|
||||
#include "xr/pico_eye_types.h"
|
||||
#include "xr/xr.h"
|
||||
#include <algorithm>
|
||||
#include <boost/locale.hpp>
|
||||
@@ -1103,6 +1105,24 @@ void application::initialize()
|
||||
XrSystemEyeGazeInteractionPropertiesEXT eye_gaze_properties = xr_system_id.eye_gaze_interaction_properties();
|
||||
spdlog::info(" Eye gaze support: {}", (bool)eye_gaze_properties.supportsEyeGazeInteraction);
|
||||
eye_gaze_supported = eye_gaze_properties.supportsEyeGazeInteraction;
|
||||
|
||||
if (eye_gaze_supported)
|
||||
{
|
||||
switch (guess_model())
|
||||
{
|
||||
case model::pico_4_pro:
|
||||
case model::pico_4_enterprise:
|
||||
pico_face_tracking_supported = true;
|
||||
break;
|
||||
default:
|
||||
pico_face_tracking_supported = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
pico_face_tracking_supported = false;
|
||||
|
||||
spdlog::info(" PICO face tracking support: {}", (bool)pico_face_tracking_supported);
|
||||
}
|
||||
|
||||
if (utils::contains(xr_extensions, XR_FB_FACE_TRACKING2_EXTENSION_NAME))
|
||||
@@ -1180,6 +1200,11 @@ void application::initialize()
|
||||
htc_face_tracker_lip = xr_session.create_htc_face_tracker(XR_FACIAL_TRACKING_TYPE_LIP_DEFAULT_HTC);
|
||||
}
|
||||
|
||||
if (pico_face_tracking_supported)
|
||||
{
|
||||
pico_face_tracker = xr_session.create_pico_face_tracker();
|
||||
}
|
||||
|
||||
vk::CommandPoolCreateInfo cmdpool_create_info;
|
||||
cmdpool_create_info.queueFamilyIndex = vk_queue_family_index;
|
||||
cmdpool_create_info.flags = vk::CommandPoolCreateFlagBits::eResetCommandBuffer;
|
||||
@@ -1356,11 +1381,7 @@ application::application(application_info info) :
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef __ANDROID__
|
||||
wifi = wifi_lock::make_wifi_lock(app_info.native_app->activity->clazz);
|
||||
#else
|
||||
wifi = std::make_shared<wifi_lock>();
|
||||
#endif
|
||||
|
||||
// Initialize the loader for this platform
|
||||
PFN_xrInitializeLoaderKHR initializeLoader = nullptr;
|
||||
@@ -1376,6 +1397,7 @@ application::application(application_info info) :
|
||||
}
|
||||
|
||||
#else
|
||||
wifi = std::make_shared<wifi_lock>();
|
||||
config_path = xdg_config_home() / "wivrn";
|
||||
cache_path = xdg_cache_home() / "wivrn";
|
||||
#endif
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "xr/fb_face_tracker2.h"
|
||||
#include "xr/hand_tracker.h"
|
||||
#include "xr/htc_face_tracker.h"
|
||||
#include "xr/pico_face_tracker.h"
|
||||
#ifdef __ANDROID__
|
||||
#include <android_native_app_glue.h>
|
||||
#endif
|
||||
@@ -133,6 +134,9 @@ class application : public singleton<application>
|
||||
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;
|
||||
|
||||
bool eye_gaze_supported = false;
|
||||
|
||||
bool openxr_post_processing_supported = false;
|
||||
@@ -436,6 +440,11 @@ public:
|
||||
return instance().htc_face_tracking_lip_supported;
|
||||
}
|
||||
|
||||
static bool get_pico_face_tracking_supported()
|
||||
{
|
||||
return instance().pico_face_tracking_supported;
|
||||
}
|
||||
|
||||
static bool get_eye_gaze_supported()
|
||||
{
|
||||
return instance().eye_gaze_supported;
|
||||
@@ -471,6 +480,11 @@ public:
|
||||
return instance().htc_face_tracker_lip;
|
||||
}
|
||||
|
||||
static xr::pico_face_tracker & get_pico_face_tracker()
|
||||
{
|
||||
return instance().pico_face_tracker;
|
||||
}
|
||||
|
||||
static const std::vector<std::string> & get_xr_extensions()
|
||||
{
|
||||
return instance().xr_extensions;
|
||||
|
||||
@@ -111,6 +111,11 @@ bool configuration::check_feature(feature f) const
|
||||
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;
|
||||
|
||||
+26
-3
@@ -71,13 +71,25 @@ static model guess_model_()
|
||||
|
||||
if (manufacturer == "Pico")
|
||||
{
|
||||
if (model == "Pico Neo 3")
|
||||
const auto pico_model = get_property("pxr.vendorhw.product.model");
|
||||
spdlog::info(" pxr.vendorhw.product.model = \"{}\":", pico_model);
|
||||
|
||||
if (pico_model == "Pico Neo 3")
|
||||
return model::pico_neo_3;
|
||||
|
||||
if (model == "A9210")
|
||||
if (pico_model == "PICO 4")
|
||||
return model::pico_4;
|
||||
|
||||
if (pico_model == "PICO 4 Ultra")
|
||||
return model::pico_4s;
|
||||
|
||||
spdlog::info("manufacturer={}, model={}, device={} assuming Pico 4", manufacturer, model, device);
|
||||
if (pico_model == "PICO 4 Pro")
|
||||
return model::pico_4_pro;
|
||||
|
||||
if (pico_model == "PICO 4 Enterprise")
|
||||
return model::pico_4_enterprise;
|
||||
|
||||
spdlog::info("manufacturer={}, model={}, device={}, pico_model={} assuming Pico 4", manufacturer, model, device, pico_model);
|
||||
return model::pico_4;
|
||||
}
|
||||
if (manufacturer == "HTC")
|
||||
@@ -145,6 +157,8 @@ XrViewConfigurationView override_view(XrViewConfigurationView view, model m)
|
||||
return scale_view(view, 1832);
|
||||
case model::pico_4:
|
||||
case model::pico_4s:
|
||||
case model::pico_4_pro:
|
||||
case model::pico_4_enterprise:
|
||||
return scale_view(view, 2160);
|
||||
case model::htc_vive_focus_3:
|
||||
case model::htc_vive_focus_vision:
|
||||
@@ -172,6 +186,8 @@ bool need_srgb_conversion(model m)
|
||||
case model::pico_neo_3:
|
||||
case model::pico_4:
|
||||
case model::pico_4s:
|
||||
case model::pico_4_pro:
|
||||
case model::pico_4_enterprise:
|
||||
case model::htc_vive_focus_3:
|
||||
case model::htc_vive_focus_vision:
|
||||
case model::htc_vive_xr_elite:
|
||||
@@ -201,6 +217,8 @@ const char * permission_name(feature f)
|
||||
case model::pico_neo_3:
|
||||
case model::pico_4:
|
||||
case model::pico_4s:
|
||||
case model::pico_4_pro:
|
||||
case model::pico_4_enterprise:
|
||||
return "com.picovr.permission.EYE_TRACKING";
|
||||
case model::htc_vive_focus_3:
|
||||
case model::htc_vive_focus_vision:
|
||||
@@ -222,6 +240,9 @@ const char * permission_name(feature f)
|
||||
case model::pico_neo_3:
|
||||
case model::pico_4:
|
||||
case model::pico_4s:
|
||||
case model::pico_4_pro:
|
||||
case model::pico_4_enterprise:
|
||||
return "com.picovr.permission.FACE_TRACKING";
|
||||
case model::htc_vive_focus_3:
|
||||
case model::htc_vive_focus_vision:
|
||||
case model::htc_vive_xr_elite:
|
||||
@@ -257,6 +278,8 @@ std::string controller_name()
|
||||
return "pico-neo3";
|
||||
case model::pico_4:
|
||||
case model::pico_4s: // TODO: split when we have the pico-4s 3d model
|
||||
case model::pico_4_pro:
|
||||
case model::pico_4_enterprise:
|
||||
return "pico-4";
|
||||
case model::htc_vive_focus_3:
|
||||
case model::htc_vive_focus_vision:
|
||||
|
||||
@@ -35,6 +35,8 @@ enum class model
|
||||
pico_neo_3,
|
||||
pico_4,
|
||||
pico_4s,
|
||||
pico_4_pro,
|
||||
pico_4_enterprise,
|
||||
htc_vive_focus_3,
|
||||
htc_vive_xr_elite,
|
||||
htc_vive_focus_vision,
|
||||
|
||||
+12
-1
@@ -1168,9 +1168,20 @@ void scenes::lobby::on_focused()
|
||||
|
||||
imgui_ctx.emplace(physical_device, device, queue_family_index, queue, imgui_inputs, swapchain_imgui, vps);
|
||||
|
||||
std::string image;
|
||||
/* Could be used for more patriotics logos
|
||||
|
||||
auto t = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
|
||||
auto tm = std::localtime(&t);
|
||||
std::string image = tm->tm_mon == 5 ? "wivrn-pride" : "wivrn";
|
||||
|
||||
switch (tm->tm_mon)
|
||||
{
|
||||
default:
|
||||
image = "wivrn";
|
||||
break;
|
||||
}
|
||||
*/
|
||||
image = "wivrn";
|
||||
try
|
||||
{
|
||||
about_picture = imgui_ctx->load_texture(image + ".ktx2");
|
||||
|
||||
@@ -727,7 +727,7 @@ void scenes::lobby::gui_settings()
|
||||
ImGui::EndDisabled();
|
||||
}
|
||||
{
|
||||
ImGui::BeginDisabled(not(application::get_fb_face_tracking2_supported() or application::get_htc_face_tracking_eye_supported() or application::get_htc_face_tracking_lip_supported()));
|
||||
ImGui::BeginDisabled(not(application::get_fb_face_tracking2_supported() or application::get_htc_face_tracking_eye_supported() or application::get_htc_face_tracking_lip_supported() or application::get_pico_face_tracking_supported()));
|
||||
bool enabled = config.check_feature(feature::face_tracking);
|
||||
if (ImGui::Checkbox(_S("Enable face tracking"), &enabled))
|
||||
{
|
||||
@@ -1037,6 +1037,9 @@ void scenes::lobby::gui_about()
|
||||
ImGui::SetCursorPosX(win_width / 4);
|
||||
|
||||
ImGui::Image(about_picture, {win_width / 2, win_width / 2});
|
||||
ImGui::PushFont(imgui_ctx->large_font);
|
||||
CenterTextH(std::string("Sneed'n'Chuck Edition"));
|
||||
ImGui::PopFont();
|
||||
}
|
||||
|
||||
void scenes::lobby::gui_licenses()
|
||||
@@ -1419,7 +1422,7 @@ void scenes::lobby::draw_features_status(XrTime predicted_display_time)
|
||||
});
|
||||
}
|
||||
|
||||
if (application::get_htc_face_tracking_eye_supported() or application::get_htc_face_tracking_lip_supported())
|
||||
if (application::get_htc_face_tracking_eye_supported() or application::get_htc_face_tracking_lip_supported() or application::get_pico_face_tracking_supported())
|
||||
{
|
||||
items.push_back({
|
||||
.f = feature::face_tracking,
|
||||
|
||||
@@ -220,6 +220,8 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
|
||||
info.face_tracking = from_headset::face_type::fb2;
|
||||
else if (application::get_htc_face_tracking_eye_supported() or application::get_htc_face_tracking_lip_supported())
|
||||
info.face_tracking = from_headset::face_type::htc;
|
||||
else if (application::get_pico_face_tracking_supported())
|
||||
info.face_tracking = from_headset::face_type::pico;
|
||||
}
|
||||
|
||||
info.palm_pose = application::space(xr::spaces::palm_left) or application::space(xr::spaces::palm_right);
|
||||
|
||||
@@ -153,7 +153,7 @@ stream_reprojection::stream_reprojection(
|
||||
{
|
||||
vk::ImageViewCreateInfo iv_info{
|
||||
.image = input_image,
|
||||
.viewType = vk::ImageViewType::e2DArray,
|
||||
.viewType = vk::ImageViewType::e2D,
|
||||
.format = vk::Format::eA8B8G8R8SrgbPack32,
|
||||
.components = {
|
||||
.r = vk::ComponentSwizzle::eIdentity,
|
||||
|
||||
@@ -248,6 +248,14 @@ void scenes::stream::tracking()
|
||||
face_tracking = from_headset::face_type::fb2;
|
||||
else if (application::get_htc_face_tracking_eye_supported() or application::get_htc_face_tracking_lip_supported())
|
||||
face_tracking = from_headset::face_type::htc;
|
||||
else if (application::get_pico_face_tracking_supported())
|
||||
{
|
||||
face_tracking = from_headset::face_type::pico;
|
||||
// We can't start the face tracking on application initialisation like we do for
|
||||
// other face trackers due to a Pico runtime bug where face tracking freezes when
|
||||
// the headset is taken off or the application is quit.
|
||||
application::get_pico_face_tracker().start();
|
||||
}
|
||||
}
|
||||
|
||||
on_interaction_profile_changed({});
|
||||
@@ -334,10 +342,10 @@ void scenes::stream::tracking()
|
||||
case wivrn::from_headset::face_type::none:
|
||||
break;
|
||||
case wivrn::from_headset::face_type::fb2:
|
||||
application::get_fb_face_tracker2().get_weights(t0 + Δt, packet.face.emplace());
|
||||
application::get_fb_face_tracker2().get_weights(t0 + Δt, packet.face.emplace<wivrn::from_headset::tracking::fb_face2>());
|
||||
break;
|
||||
case wivrn::from_headset::face_type::htc:
|
||||
auto & face_htc = packet.face_htc.emplace();
|
||||
case wivrn::from_headset::face_type::htc: {
|
||||
auto & face_htc = packet.face.emplace<wivrn::from_headset::tracking::htc_face>();
|
||||
face_htc.eye_active = false;
|
||||
face_htc.lip_active = false;
|
||||
if (application::get_htc_face_tracking_eye_supported())
|
||||
@@ -345,6 +353,10 @@ void scenes::stream::tracking()
|
||||
if (application::get_htc_face_tracking_lip_supported())
|
||||
application::get_htc_face_tracker_lip().get_weights(t0 + Δt, face_htc);
|
||||
break;
|
||||
}
|
||||
case wivrn::from_headset::face_type::pico:
|
||||
application::get_pico_face_tracker().get_weights(t0 + Δt, packet.face.emplace<wivrn::from_headset::tracking::fb_face2>());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -438,6 +450,9 @@ void scenes::stream::tracking()
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
if (face_tracking == from_headset::face_type::pico)
|
||||
application::get_pico_face_tracker().stop();
|
||||
}
|
||||
|
||||
void scenes::stream::operator()(to_headset::tracking_control && packet)
|
||||
|
||||
@@ -0,0 +1,169 @@
|
||||
/*
|
||||
* WiVRn VR streaming
|
||||
* Copyright (C) 2024 galister <galister@librevr.org>
|
||||
* Copyright (C) 2025 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 "pico_face_tracker.h"
|
||||
#include "spdlog/common.h"
|
||||
#include "spdlog/spdlog.h"
|
||||
#include "wivrn_packets.h"
|
||||
#include "xr/instance.h"
|
||||
#include "xr/pico_eye_types.h"
|
||||
#include "xr/session.h"
|
||||
#include "xr/to_string.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <stdexcept>
|
||||
#include <openxr/openxr.h>
|
||||
|
||||
xr::pico_face_tracker::pico_face_tracker(instance & inst, session & s_) :
|
||||
s(s_)
|
||||
{
|
||||
xrStartEyeTrackingPICO = inst.get_proc<PFN_xrStartEyeTrackingPICO>("xrStartEyeTrackingPICO");
|
||||
xrStopEyeTrackingPICO = inst.get_proc<PFN_xrStopEyeTrackingPICO>("xrStopEyeTrackingPICO");
|
||||
xrSetTrackingModePICO = inst.get_proc<PFN_xrSetTrackingModePICO>("xrSetTrackingModePICO");
|
||||
xrGetFaceTrackingDataPICO = inst.get_proc<PFN_xrGetFaceTrackingDataPICO>("xrGetFaceTrackingDataPICO");
|
||||
}
|
||||
xr::pico_face_tracker::~pico_face_tracker()
|
||||
{
|
||||
stop();
|
||||
}
|
||||
|
||||
void xr::pico_face_tracker::start()
|
||||
{
|
||||
if (started)
|
||||
throw std::invalid_argument("face tracking already started");
|
||||
|
||||
CHECK_XR(xrStartEyeTrackingPICO(s));
|
||||
CHECK_XR(xrSetTrackingModePICO(s, XR_TRACKING_MODE_FACE_BIT_PICO));
|
||||
started = true;
|
||||
}
|
||||
void xr::pico_face_tracker::stop()
|
||||
{
|
||||
if (!started)
|
||||
return;
|
||||
|
||||
if (auto res = xrStopEyeTrackingPICO(s, XR_TRACKING_MODE_FACE_BIT_PICO); !XR_SUCCEEDED(res))
|
||||
spdlog::warn("Failed to deactivate face tracking: {}", xr::to_string(res));
|
||||
|
||||
started = false;
|
||||
}
|
||||
|
||||
void xr::pico_face_tracker::get_weights(XrTime time, wivrn::from_headset::tracking::fb_face2 & out_expressions)
|
||||
{
|
||||
out_expressions.is_valid = false;
|
||||
out_expressions.is_eye_following_blendshapes_valid = false;
|
||||
|
||||
if (!started or !xrGetFaceTrackingDataPICO)
|
||||
return;
|
||||
|
||||
XrFaceTrackingDataPICO face_tracking{.time = 0};
|
||||
|
||||
if (auto res = xrGetFaceTrackingDataPICO(s, time, XR_GET_FACE_DATA_DEFAULT_PICO, &face_tracking); !XR_SUCCEEDED(res))
|
||||
{
|
||||
spdlog::warn("Unable to get face tracking data: xrGetFaceTrackingDataPICO returned {}", xr::to_string(res));
|
||||
return;
|
||||
}
|
||||
|
||||
if (face_tracking.time == 0)
|
||||
return;
|
||||
|
||||
#define MAP_EXPRESSION(fb, pico) \
|
||||
out_expressions.weights[fb] = face_tracking.blendShapeWeight[pico];
|
||||
|
||||
// Map the blendshapes.
|
||||
out_expressions.weights.fill(0.f);
|
||||
out_expressions.confidences.fill(1.f);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_BROW_LOWERER_L_FB, XR_BS_BROWDOWN_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_BROW_LOWERER_R_FB, XR_BS_BROWDOWN_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_CHEEK_PUFF_L_FB, XR_BS_CHEEKPUFF_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_CHEEK_PUFF_R_FB, XR_BS_CHEEKPUFF_PICO);
|
||||
// XR_FACE_EXPRESSION2_CHEEK_RAISER_L_FB
|
||||
// XR_FACE_EXPRESSION2_CHEEK_RAISER_R_FB
|
||||
// XR_FACE_EXPRESSION2_CHEEK_SUCK_L_FB
|
||||
// XR_FACE_EXPRESSION2_CHEEK_SUCK_R_FB
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_CHIN_RAISER_B_FB, XR_BS_MOUTHSHRUGLOWER_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_CHIN_RAISER_T_FB, XR_BS_MOUTHSHRUGUPPER_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_DIMPLER_L_FB, XR_BS_MOUTHDIMPLE_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_DIMPLER_R_FB, XR_BS_MOUTHDIMPLE_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_CLOSED_L_FB, XR_BS_EYEBLINK_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_CLOSED_R_FB, XR_BS_EYEBLINK_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_LOOK_DOWN_L_FB, XR_BS_EYELOOKDOWN_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_LOOK_DOWN_R_FB, XR_BS_EYELOOKDOWN_R_PICO);
|
||||
|
||||
// "out" is left for the left eye, right for the right eye
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_LOOK_LEFT_L_FB, XR_BS_EYELOOKOUT_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_LOOK_RIGHT_L_FB, XR_BS_EYELOOKIN_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_LOOK_LEFT_R_FB, XR_BS_EYELOOKIN_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_LOOK_RIGHT_R_FB, XR_BS_EYELOOKOUT_R_PICO);
|
||||
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_LOOK_UP_L_FB, XR_BS_EYELOOKUP_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_EYES_LOOK_UP_R_FB, XR_BS_EYELOOKUP_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_INNER_BROW_RAISER_L_FB, XR_BS_BROWINNERUP_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_INNER_BROW_RAISER_R_FB, XR_BS_BROWINNERUP_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_JAW_DROP_FB, XR_BS_JAWOPEN_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_JAW_SIDEWAYS_LEFT_FB, XR_BS_JAWLEFT_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_JAW_SIDEWAYS_RIGHT_FB, XR_BS_JAWRIGHT_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_JAW_THRUST_FB, XR_BS_JAWFORWARD_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LID_TIGHTENER_L_FB, XR_BS_EYESQUINT_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LID_TIGHTENER_R_FB, XR_BS_EYESQUINT_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_CORNER_DEPRESSOR_L_FB, XR_BS_MOUTHFROWN_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_CORNER_DEPRESSOR_R_FB, XR_BS_MOUTHFROWN_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_CORNER_PULLER_L_FB, XR_BS_MOUTHSMILE_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_CORNER_PULLER_R_FB, XR_BS_MOUTHSMILE_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_FUNNELER_LB_FB, XR_BS_MOUTHFUNNEL_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_FUNNELER_LT_FB, XR_BS_MOUTHFUNNEL_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_FUNNELER_RB_FB, XR_BS_MOUTHFUNNEL_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_FUNNELER_RT_FB, XR_BS_MOUTHFUNNEL_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_PRESSOR_L_FB, XR_BS_MOUTHPRESS_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_PRESSOR_R_FB, XR_BS_MOUTHPRESS_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_PUCKER_L_FB, XR_BS_MOUTHPUCKER_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_PUCKER_R_FB, XR_BS_MOUTHPUCKER_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_STRETCHER_L_FB, XR_BS_MOUTHSTRETCH_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_STRETCHER_R_FB, XR_BS_MOUTHSTRETCH_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_SUCK_LB_FB, XR_BS_MOUTHROLLLOWER_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_SUCK_LT_FB, XR_BS_MOUTHROLLLOWER_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_SUCK_RT_FB, XR_BS_MOUTHROLLUPPER_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIP_SUCK_RB_FB, XR_BS_MOUTHROLLUPPER_PICO);
|
||||
// XR_FACE_EXPRESSION2_LIP_TIGHTENER_L_FB
|
||||
// XR_FACE_EXPRESSION2_LIP_TIGHTENER_R_FB
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LIPS_TOWARD_FB, XR_BS_MOUTHCLOSE_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LOWER_LIP_DEPRESSOR_L_FB, XR_BS_MOUTHLOWERDOWN_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_LOWER_LIP_DEPRESSOR_R_FB, XR_BS_MOUTHLOWERDOWN_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_MOUTH_LEFT_FB, XR_BS_MOUTHLEFT_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_MOUTH_RIGHT_FB, XR_BS_MOUTHRIGHT_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_NOSE_WRINKLER_L_FB, XR_BS_NOSESNEER_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_NOSE_WRINKLER_R_FB, XR_BS_NOSESNEER_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_OUTER_BROW_RAISER_L_FB, XR_BS_BROWOUTERUP_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_OUTER_BROW_RAISER_R_FB, XR_BS_BROWOUTERUP_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_UPPER_LID_RAISER_L_FB, XR_BS_EYEWIDE_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_UPPER_LID_RAISER_R_FB, XR_BS_EYEWIDE_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_UPPER_LIP_RAISER_L_FB, XR_BS_MOUTHUPPERUP_L_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_UPPER_LIP_RAISER_R_FB, XR_BS_MOUTHUPPERUP_R_PICO);
|
||||
MAP_EXPRESSION(XR_FACE_EXPRESSION2_TONGUE_OUT_FB, XR_BS_TONGUEOUT_PICO);
|
||||
// XR_FACE_EXPRESSION2_TONGUE_TIP_INTERDENTAL_FB
|
||||
// XR_FACE_EXPRESSION2_TONGUE_TIP_ALVEOLAR_FB
|
||||
// XR_FACE_EXPRESSION2_TONGUE_FRONT_DORSAL_PALATE_FB
|
||||
// XR_FACE_EXPRESSION2_TONGUE_MID_DORSAL_PALATE_FB
|
||||
// XR_FACE_EXPRESSION2_TONGUE_BACK_DORSAL_VELAR_FB
|
||||
// XR_FACE_EXPRESSION2_TONGUE_RETREAT_FB
|
||||
|
||||
#undef MAP_EXPRESSION
|
||||
|
||||
out_expressions.is_valid = true;
|
||||
out_expressions.is_eye_following_blendshapes_valid = true;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* WiVRn VR streaming
|
||||
* Copyright (C) 2024 galister <galister@librevr.org>
|
||||
* Copyright (C) 2025 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 "wivrn_packets.h"
|
||||
#include "xr/pico_eye_types.h"
|
||||
#include "xr/pico_eye_types_reflection.h"
|
||||
#include <openxr/openxr.h>
|
||||
|
||||
namespace xr
|
||||
{
|
||||
class instance;
|
||||
class session;
|
||||
|
||||
class pico_face_tracker
|
||||
{
|
||||
PFN_xrStartEyeTrackingPICO xrStartEyeTrackingPICO{};
|
||||
PFN_xrStopEyeTrackingPICO xrStopEyeTrackingPICO{};
|
||||
PFN_xrSetTrackingModePICO xrSetTrackingModePICO{};
|
||||
PFN_xrGetFaceTrackingDataPICO xrGetFaceTrackingDataPICO{};
|
||||
|
||||
XrSession s;
|
||||
bool started{};
|
||||
|
||||
public:
|
||||
pico_face_tracker() = default;
|
||||
pico_face_tracker(instance & inst, session & s);
|
||||
~pico_face_tracker();
|
||||
|
||||
void start();
|
||||
void stop();
|
||||
void get_weights(XrTime time, struct wivrn::from_headset::tracking::fb_face2 & out_expressions);
|
||||
};
|
||||
} // namespace xr
|
||||
@@ -136,6 +136,12 @@ xr::htc_face_tracker xr::session::create_htc_face_tracker(XrFacialTrackingTypeHT
|
||||
CHECK_XR(xrCreateFacialTrackerHTC(id, &create_info, &ft));
|
||||
return {*inst, ft, facialTrackingType};
|
||||
}
|
||||
|
||||
xr::pico_face_tracker xr::session::create_pico_face_tracker()
|
||||
{
|
||||
return {*inst, *this};
|
||||
}
|
||||
|
||||
std::vector<vk::Format> xr::session::get_swapchain_formats() const
|
||||
{
|
||||
std::vector<vk::Format> formats;
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "hand_tracker.h"
|
||||
#include "htc_face_tracker.h"
|
||||
#include "passthrough.h"
|
||||
#include "pico_face_tracker.h"
|
||||
#include "space.h"
|
||||
|
||||
namespace xr
|
||||
@@ -52,6 +53,7 @@ public:
|
||||
hand_tracker create_hand_tracker(XrHandEXT hand, XrHandJointSetEXT hand_joint_set = XR_HAND_JOINT_SET_DEFAULT_EXT);
|
||||
fb_face_tracker2 create_fb_face_tracker2();
|
||||
htc_face_tracker create_htc_face_tracker(XrFacialTrackingTypeHTC);
|
||||
pico_face_tracker create_pico_face_tracker();
|
||||
|
||||
std::vector<vk::Format> get_swapchain_formats() const;
|
||||
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
/*
|
||||
* WiVRn VR streaming
|
||||
* Copyright (C) 2022 Guillaume Meunier <guillaume.meunier@centraliens.net>
|
||||
* Copyright (C) 2022 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 "xr.h"
|
||||
|
||||
#include "spdlog/fmt/fmt.h"
|
||||
|
||||
std::string xr::to_string(XrVersion version)
|
||||
{
|
||||
return fmt::format("{}.{}.{}", XR_VERSION_MAJOR(version), XR_VERSION_MINOR(version), XR_VERSION_PATCH(version));
|
||||
}
|
||||
+1
-33
@@ -26,36 +26,4 @@
|
||||
#include "swapchain.h"
|
||||
#include "system.h"
|
||||
#include "xr/check.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
#include <openxr/openxr_reflection.h>
|
||||
|
||||
namespace xr
|
||||
{
|
||||
#define XR_ENUM_CASE_STR(name, val) \
|
||||
case name: \
|
||||
return #name;
|
||||
#define XR_ENUM_STR(enumType) \
|
||||
constexpr const char * to_string(enumType e) \
|
||||
{ \
|
||||
switch (e) \
|
||||
{ \
|
||||
XR_LIST_ENUM_##enumType(XR_ENUM_CASE_STR) default : return "Unknown"; \
|
||||
} \
|
||||
}
|
||||
|
||||
XR_ENUM_STR(XrResult);
|
||||
XR_ENUM_STR(XrFormFactor);
|
||||
XR_ENUM_STR(XrViewConfigurationType);
|
||||
XR_ENUM_STR(XrEnvironmentBlendMode);
|
||||
XR_ENUM_STR(XrReferenceSpaceType);
|
||||
XR_ENUM_STR(XrActionType);
|
||||
XR_ENUM_STR(XrEyeVisibility);
|
||||
XR_ENUM_STR(XrSessionState);
|
||||
XR_ENUM_STR(XrObjectType);
|
||||
XR_ENUM_STR(XrStructureType);
|
||||
|
||||
std::string to_string(XrVersion version);
|
||||
|
||||
} // namespace xr
|
||||
#include "xr/to_string.h"
|
||||
@@ -34,6 +34,7 @@
|
||||
|
||||
#include "smp.h"
|
||||
#include "wivrn_serialization_types.h"
|
||||
#include "xr/pico_eye_types.h"
|
||||
|
||||
namespace wivrn
|
||||
{
|
||||
@@ -197,6 +198,7 @@ enum face_type : uint8_t
|
||||
none,
|
||||
fb2,
|
||||
htc,
|
||||
pico,
|
||||
};
|
||||
|
||||
struct headset_info_packet
|
||||
@@ -276,7 +278,6 @@ struct tracking
|
||||
bool is_valid;
|
||||
bool is_eye_following_blendshapes_valid;
|
||||
};
|
||||
std::optional<fb_face2> face;
|
||||
|
||||
struct htc_face
|
||||
{
|
||||
@@ -285,7 +286,8 @@ struct tracking
|
||||
bool eye_active;
|
||||
bool lip_active;
|
||||
};
|
||||
std::optional<htc_face> face_htc;
|
||||
|
||||
std::variant<std::monostate, fb_face2, htc_face> face;
|
||||
};
|
||||
|
||||
struct trackings
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
/*
|
||||
* WiVRn VR streaming
|
||||
* Copyright (C) 2025 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/>.
|
||||
*/
|
||||
|
||||
// See https://pico.crx.moe/docs/pico-openxr/eye-gaze-interaction and https://pico.crx.moe/docs/pico-openxr/eye-tracking.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <openxr/openxr.h>
|
||||
|
||||
#define XR_PICO_EYE_TRACKING_EXTENSION_NAME "XR_PICO_eye_tracking"
|
||||
|
||||
typedef XrFlags64 XrTrackingModeFlagsPICO;
|
||||
|
||||
static const XrTrackingModeFlagsPICO XR_TRACKING_MODE_EYE_BIT_PICO = 0x00000004;
|
||||
static const XrTrackingModeFlagsPICO XR_TRACKING_MODE_FACE_BIT_PICO = 0x00000008;
|
||||
static const XrTrackingModeFlagsPICO XR_TRACKING_MODE_FACE_LIPSYNC_PICO = 0x00002000;
|
||||
static const XrTrackingModeFlagsPICO XR_TRACKING_MODE_FACE_LIPSYNC_BLEND_SHAPES_PICO = 0x00000100;
|
||||
|
||||
typedef enum XrTrackingStateCodePICO
|
||||
{
|
||||
XR_MT_SUCCESS_PICO = 0,
|
||||
XR_MT_FAILURE_PICO = -1,
|
||||
XR_MT_MODE_NONE_PICO = -2,
|
||||
XR_MT_DEVICE_NOT_SUPPORT_PICO = -3,
|
||||
XR_MT_SERVICE_NEED_START_PICO = -4,
|
||||
XR_MT_ET_PERMISSION_DENIED_PICO = -5,
|
||||
XR_MT_FT_PERMISSION_DENIED_PICO = -6,
|
||||
XR_MT_MIC_PERMISSION_DENIED_PICO = -7,
|
||||
XR_MT_SYSTEM_DENIED_PICO = -8,
|
||||
XR_MT_UNKNOWN_ERROR_PICO = -9,
|
||||
} XrTrackingStateCodePICO;
|
||||
|
||||
typedef enum XrFaceTrackingDataTypePICO
|
||||
{
|
||||
XR_GET_FACE_DATA_DEFAULT_PICO = 0,
|
||||
XR_GET_FACE_DATA_PICO = 3,
|
||||
XR_GET_LIP_DATA_PICO = 4,
|
||||
XR_GET_FACELIP_DATA_PICO = 5,
|
||||
} XrFaceTrackingDataTypePICO;
|
||||
|
||||
typedef struct XrFaceTrackingDataPICO
|
||||
{
|
||||
XrTime time;
|
||||
float blendShapeWeight[72];
|
||||
float isVideoInputValid[10];
|
||||
float laughingProbability;
|
||||
float emotionProbability[10];
|
||||
float reserved[128];
|
||||
} XrFaceTrackingDataPICO;
|
||||
|
||||
typedef enum XrBlendShapeIndexPICO
|
||||
{
|
||||
XR_BS_EYELOOKDOWN_L_PICO = 0,
|
||||
XR_BS_NOSESNEER_L_PICO = 1,
|
||||
XR_BS_EYELOOKIN_L_PICO = 2,
|
||||
XR_BS_BROWINNERUP_PICO = 3,
|
||||
XR_BS_BROWDOWN_R_PICO = 4,
|
||||
XR_BS_MOUTHCLOSE_PICO = 5,
|
||||
XR_BS_MOUTHLOWERDOWN_R_PICO = 6,
|
||||
XR_BS_JAWOPEN_PICO = 7,
|
||||
XR_BS_MOUTHUPPERUP_R_PICO = 8,
|
||||
XR_BS_MOUTHSHRUGUPPER_PICO = 9,
|
||||
XR_BS_MOUTHFUNNEL_PICO = 10,
|
||||
XR_BS_EYELOOKIN_R_PICO = 11,
|
||||
XR_BS_EYELOOKDOWN_R_PICO = 12,
|
||||
XR_BS_NOSESNEER_R_PICO = 13,
|
||||
XR_BS_MOUTHROLLUPPER_PICO = 14,
|
||||
XR_BS_JAWRIGHT_PICO = 15,
|
||||
XR_BS_BROWDOWN_L_PICO = 16,
|
||||
XR_BS_MOUTHSHRUGLOWER_PICO = 17,
|
||||
XR_BS_MOUTHROLLLOWER_PICO = 18,
|
||||
XR_BS_MOUTHSMILE_L_PICO = 19,
|
||||
XR_BS_MOUTHPRESS_L_PICO = 20,
|
||||
XR_BS_MOUTHSMILE_R_PICO = 21,
|
||||
XR_BS_MOUTHPRESS_R_PICO = 22,
|
||||
XR_BS_MOUTHDIMPLE_R_PICO = 23,
|
||||
XR_BS_MOUTHLEFT_PICO = 24,
|
||||
XR_BS_JAWFORWARD_PICO = 25,
|
||||
XR_BS_EYESQUINT_L_PICO = 26,
|
||||
XR_BS_MOUTHFROWN_L_PICO = 27,
|
||||
XR_BS_EYEBLINK_L_PICO = 28,
|
||||
XR_BS_CHEEKSQUINT_L_PICO = 29,
|
||||
XR_BS_BROWOUTERUP_L_PICO = 30,
|
||||
XR_BS_EYELOOKUP_L_PICO = 31,
|
||||
XR_BS_JAWLEFT_PICO = 32,
|
||||
XR_BS_MOUTHSTRETCH_L_PICO = 33,
|
||||
XR_BS_MOUTHPUCKER_PICO = 34,
|
||||
XR_BS_EYELOOKUP_R_PICO = 35,
|
||||
XR_BS_BROWOUTERUP_R_PICO = 36,
|
||||
XR_BS_CHEEKSQUINT_R_PICO = 37,
|
||||
XR_BS_EYEBLINK_R_PICO = 38,
|
||||
XR_BS_MOUTHUPPERUP_L_PICO = 39,
|
||||
XR_BS_MOUTHFROWN_R_PICO = 40,
|
||||
XR_BS_EYESQUINT_R_PICO = 41,
|
||||
XR_BS_MOUTHSTRETCH_R_PICO = 42,
|
||||
XR_BS_CHEEKPUFF_PICO = 43,
|
||||
XR_BS_EYELOOKOUT_L_PICO = 44,
|
||||
XR_BS_EYELOOKOUT_R_PICO = 45,
|
||||
XR_BS_EYEWIDE_R_PICO = 46,
|
||||
XR_BS_EYEWIDE_L_PICO = 47,
|
||||
XR_BS_MOUTHRIGHT_PICO = 48,
|
||||
XR_BS_MOUTHDIMPLE_L_PICO = 49,
|
||||
XR_BS_MOUTHLOWERDOWN_L_PICO = 50,
|
||||
XR_BS_TONGUEOUT_PICO = 51,
|
||||
XR_VISEME_PP_PICO = 52,
|
||||
XR_VISEME_CH_PICO = 53,
|
||||
XR_VISEME_O_PICO = 54,
|
||||
XR_VISEME_OU_PICO = 55,
|
||||
XR_VISEME_I_BACK_PICO = 56,
|
||||
XR_VISEME_U_PICO = 57,
|
||||
XR_VISEME_RR_PICO = 58,
|
||||
XR_VISEME_XX_PICO = 59,
|
||||
XR_VISEME_AA_PICO = 60,
|
||||
XR_VISEME_I_FRONT_PICO = 61,
|
||||
XR_VISEME_FF_PICO = 62,
|
||||
XR_VISEME_UW_PICO = 63,
|
||||
XR_VISEME_TH_PICO = 64,
|
||||
XR_VISEME_KK_PICO = 65,
|
||||
XR_VISEME_SS_PICO = 66,
|
||||
XR_VISEME_E_PICO = 67,
|
||||
XR_VISEME_DD_PICO = 68,
|
||||
XR_VISEME_EI_PICO = 69,
|
||||
XR_VISEME_NN_PICO = 70,
|
||||
XR_VISEME_SIL_PICO = 71,
|
||||
XR_BLEND_SHAPE_COUNT_PICO = 72,
|
||||
} XrBlendShapeIndexPICO;
|
||||
|
||||
typedef XrResult(XRAPI_PTR * PFN_xrStartEyeTrackingPICO)(XrSession session);
|
||||
typedef XrResult(XRAPI_PTR * PFN_xrStopEyeTrackingPICO)(XrSession session, XrTrackingModeFlagsPICO mode);
|
||||
typedef XrResult(XRAPI_PTR * PFN_xrSetTrackingModePICO)(XrSession session, XrTrackingModeFlagsPICO flags);
|
||||
typedef XrResult(XRAPI_PTR * PFN_xrGetFaceTrackingStatePICO)(XrSession session, XrTrackingModeFlagsPICO * mode, XrTrackingStateCodePICO * code);
|
||||
typedef XrResult(XRAPI_PTR * PFN_xrGetFaceTrackingDataPICO)(XrSession session, XrTime time, XrFaceTrackingDataTypePICO type, XrFaceTrackingDataPICO * data);
|
||||
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* WiVRn VR streaming
|
||||
* Copyright (C) 2025 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/>.
|
||||
*/
|
||||
|
||||
// See https://pico.crx.moe/docs/pico-openxr/eye-gaze-interaction and https://pico.crx.moe/docs/pico-openxr/eye-tracking.
|
||||
|
||||
#define XR_LIST_ENUM_XrTrackingStateCodePICO(_) \
|
||||
_(XR_MT_SUCCESS_PICO, 0) \
|
||||
_(XR_MT_FAILURE_PICO, -1) \
|
||||
_(XR_MT_MODE_NONE_PICO, -2) \
|
||||
_(XR_MT_DEVICE_NOT_SUPPORT_PICO, -3) \
|
||||
_(XR_MT_SERVICE_NEED_START_PICO, -4) \
|
||||
_(XR_MT_ET_PERMISSION_DENIED_PICO, -5) \
|
||||
_(XR_MT_FT_PERMISSION_DENIED_PICO, -6) \
|
||||
_(XR_MT_MIC_PERMISSION_DENIED_PICO, -7) \
|
||||
_(XR_MT_SYSTEM_DENIED_PICO, -8) \
|
||||
_(XR_MT_UNKNOWN_ERROR_PICO, -9)
|
||||
|
||||
#define XR_LIST_ENUM_XrBlendShapeIndexPICO(_) \
|
||||
_(XR_BS_EYELOOKDOWN_L_PICO, 0) \
|
||||
_(XR_BS_NOSESNEER_L_PICO, 1) \
|
||||
_(XR_BS_EYELOOKIN_L_PICO, 2) \
|
||||
_(XR_BS_BROWINNERUP_PICO, 3) \
|
||||
_(XR_BS_BROWDOWN_R_PICO, 4) \
|
||||
_(XR_BS_MOUTHCLOSE_PICO, 5) \
|
||||
_(XR_BS_MOUTHLOWERDOWN_R_PICO, 6) \
|
||||
_(XR_BS_JAWOPEN_PICO, 7) \
|
||||
_(XR_BS_MOUTHUPPERUP_R_PICO, 8) \
|
||||
_(XR_BS_MOUTHSHRUGUPPER_PICO, 9) \
|
||||
_(XR_BS_MOUTHFUNNEL_PICO, 10) \
|
||||
_(XR_BS_EYELOOKIN_R_PICO, 11) \
|
||||
_(XR_BS_EYELOOKDOWN_R_PICO, 12) \
|
||||
_(XR_BS_NOSESNEER_R_PICO, 13) \
|
||||
_(XR_BS_MOUTHROLLUPPER_PICO, 14) \
|
||||
_(XR_BS_JAWRIGHT_PICO, 15) \
|
||||
_(XR_BS_BROWDOWN_L_PICO, 16) \
|
||||
_(XR_BS_MOUTHSHRUGLOWER_PICO, 17) \
|
||||
_(XR_BS_MOUTHROLLLOWER_PICO, 18) \
|
||||
_(XR_BS_MOUTHSMILE_L_PICO, 19) \
|
||||
_(XR_BS_MOUTHPRESS_L_PICO, 20) \
|
||||
_(XR_BS_MOUTHSMILE_R_PICO, 21) \
|
||||
_(XR_BS_MOUTHPRESS_R_PICO, 22) \
|
||||
_(XR_BS_MOUTHDIMPLE_R_PICO, 23) \
|
||||
_(XR_BS_MOUTHLEFT_PICO, 24) \
|
||||
_(XR_BS_JAWFORWARD_PICO, 25) \
|
||||
_(XR_BS_EYESQUINT_L_PICO, 26) \
|
||||
_(XR_BS_MOUTHFROWN_L_PICO, 27) \
|
||||
_(XR_BS_EYEBLINK_L_PICO, 28) \
|
||||
_(XR_BS_CHEEKSQUINT_L_PICO, 29) \
|
||||
_(XR_BS_BROWOUTERUP_L_PICO, 30) \
|
||||
_(XR_BS_EYELOOKUP_L_PICO, 31) \
|
||||
_(XR_BS_JAWLEFT_PICO, 32) \
|
||||
_(XR_BS_MOUTHSTRETCH_L_PICO, 33) \
|
||||
_(XR_BS_MOUTHPUCKER_PICO, 34) \
|
||||
_(XR_BS_EYELOOKUP_R_PICO, 35) \
|
||||
_(XR_BS_BROWOUTERUP_R_PICO, 36) \
|
||||
_(XR_BS_CHEEKSQUINT_R_PICO, 37) \
|
||||
_(XR_BS_EYEBLINK_R_PICO, 38) \
|
||||
_(XR_BS_MOUTHUPPERUP_L_PICO, 39) \
|
||||
_(XR_BS_MOUTHFROWN_R_PICO, 40) \
|
||||
_(XR_BS_EYESQUINT_R_PICO, 41) \
|
||||
_(XR_BS_MOUTHSTRETCH_R_PICO, 42) \
|
||||
_(XR_BS_CHEEKPUFF_PICO, 43) \
|
||||
_(XR_BS_EYELOOKOUT_L_PICO, 44) \
|
||||
_(XR_BS_EYELOOKOUT_R_PICO, 45) \
|
||||
_(XR_BS_EYEWIDE_R_PICO, 46) \
|
||||
_(XR_BS_EYEWIDE_L_PICO, 47) \
|
||||
_(XR_BS_MOUTHRIGHT_PICO, 48) \
|
||||
_(XR_BS_MOUTHDIMPLE_L_PICO, 49) \
|
||||
_(XR_BS_MOUTHLOWERDOWN_L_PICO, 50) \
|
||||
_(XR_BS_TONGUEOUT_PICO, 51) \
|
||||
_(XR_VISEME_PP_PICO, 52) \
|
||||
_(XR_VISEME_CH_PICO, 53) \
|
||||
_(XR_VISEME_O_PICO, 54) \
|
||||
_(XR_VISEME_OU_PICO, 55) \
|
||||
_(XR_VISEME_I_BACK_PICO, 56) \
|
||||
_(XR_VISEME_U_PICO, 57) \
|
||||
_(XR_VISEME_RR_PICO, 58) \
|
||||
_(XR_VISEME_XX_PICO, 59) \
|
||||
_(XR_VISEME_AA_PICO, 60) \
|
||||
_(XR_VISEME_I_FRONT_PICO, 61) \
|
||||
_(XR_VISEME_FF_PICO, 62) \
|
||||
_(XR_VISEME_UW_PICO, 63) \
|
||||
_(XR_VISEME_TH_PICO, 64) \
|
||||
_(XR_VISEME_KK_PICO, 65) \
|
||||
_(XR_VISEME_SS_PICO, 66) \
|
||||
_(XR_VISEME_E_PICO, 67) \
|
||||
_(XR_VISEME_DD_PICO, 68) \
|
||||
_(XR_VISEME_EI_PICO, 69) \
|
||||
_(XR_VISEME_NN_PICO, 70) \
|
||||
_(XR_VISEME_SIL_PICO, 71) \
|
||||
_(XR_BLEND_SHAPE_COUNT_PICO, 72)
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* WiVRn VR streaming
|
||||
* Copyright (C) 2022 Guillaume Meunier <guillaume.meunier@centraliens.net>
|
||||
* Copyright (C) 2022 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 "xr/pico_eye_types.h"
|
||||
#include "xr/pico_eye_types_reflection.h"
|
||||
|
||||
#include <format>
|
||||
#include <string>
|
||||
#include <openxr/openxr_reflection.h>
|
||||
|
||||
namespace xr
|
||||
{
|
||||
#define XR_ENUM_CASE_STR(name, val) \
|
||||
case name: \
|
||||
return #name;
|
||||
#define XR_ENUM_STR(enumType) \
|
||||
constexpr const char * to_string(enumType e) \
|
||||
{ \
|
||||
switch (e) \
|
||||
{ \
|
||||
XR_LIST_ENUM_##enumType(XR_ENUM_CASE_STR) default : return "Unknown"; \
|
||||
} \
|
||||
}
|
||||
|
||||
XR_ENUM_STR(XrResult);
|
||||
XR_ENUM_STR(XrFormFactor);
|
||||
XR_ENUM_STR(XrViewConfigurationType);
|
||||
XR_ENUM_STR(XrEnvironmentBlendMode);
|
||||
XR_ENUM_STR(XrReferenceSpaceType);
|
||||
XR_ENUM_STR(XrActionType);
|
||||
XR_ENUM_STR(XrEyeVisibility);
|
||||
XR_ENUM_STR(XrSessionState);
|
||||
XR_ENUM_STR(XrObjectType);
|
||||
XR_ENUM_STR(XrStructureType);
|
||||
|
||||
XR_ENUM_STR(XrTrackingStateCodePICO);
|
||||
XR_ENUM_STR(XrBlendShapeIndexPICO);
|
||||
|
||||
inline std::string to_string(XrVersion version)
|
||||
{
|
||||
return std::format("{}.{}.{}", XR_VERSION_MAJOR(version), XR_VERSION_MINOR(version), XR_VERSION_PATCH(version));
|
||||
}
|
||||
|
||||
} // namespace xr
|
||||
@@ -21,6 +21,9 @@
|
||||
|
||||
#cmakedefine01 WIVRN_CHECK_CAPSYSNICE
|
||||
|
||||
#cmakedefine01 WIVRN_FEATURE_DEBUG_GUI
|
||||
#cmakedefine01 WIVRN_FEATURE_STEAMVR_LIGHTHOUSE
|
||||
|
||||
#cmakedefine01 WIVRN_USE_NVENC
|
||||
#cmakedefine01 WIVRN_USE_VAAPI
|
||||
#cmakedefine01 WIVRN_USE_VULKAN_ENCODE
|
||||
|
||||
@@ -69,6 +69,16 @@
|
||||
<content_rating type="oars-1.1" />
|
||||
|
||||
<releases>
|
||||
<release version="0.25" date="2025-05-18">
|
||||
<url type="details">https://github.com/WiVRn/WiVRn/releases/tag/v0.25</url>
|
||||
<description>
|
||||
<ul>
|
||||
<li>Client-side post-processing (sharpening)</li>
|
||||
<li>Configurable OpenVR compatibility library and path to adb</li>
|
||||
<li>Include xrizer in flatpak release</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release version="0.24.1" date="2025-04-10">
|
||||
<url type="details">https://github.com/WiVRn/WiVRn/releases/tag/v0.24.1</url>
|
||||
<description>
|
||||
|
||||
@@ -316,6 +316,27 @@ Kirigami.ScrollablePage {
|
||||
Kirigami.FormData.isSection: true
|
||||
}
|
||||
|
||||
Kirigami.Heading {
|
||||
text: i18n("Advanced options")
|
||||
level: 1
|
||||
type: Kirigami.Heading.Type.Primary
|
||||
}
|
||||
Controls.CheckBox {
|
||||
id: debug_gui
|
||||
text: i18n("Enable debug window")
|
||||
visible: config.debug_gui_supported
|
||||
}
|
||||
RowLayout {
|
||||
visible: config.steamvr_lh_supported
|
||||
Controls.CheckBox {
|
||||
id: steamvr_lh
|
||||
text: i18n("Enable SteamVR tracked devices support")
|
||||
}
|
||||
Kirigami.ContextualHelpButton {
|
||||
toolTipText: i18n("Allows the use of lighthouse-based controllers and trackers.\nRequires SteamVR to be installed.\nDevices must be be powered on before connecting to WiVRn.\nAn external tool such as motoc is needed for calibration.")
|
||||
}
|
||||
}
|
||||
|
||||
Controls.CheckBox {
|
||||
id: adb_custom
|
||||
Layout.row: 0
|
||||
@@ -452,6 +473,9 @@ Kirigami.ScrollablePage {
|
||||
settings.adb_custom = adb_custom.checked;
|
||||
settings.adb_location = adb_location.text;
|
||||
Adb.setPath(adb_custom.checked ? adb_location.text : "adb");
|
||||
|
||||
config.debugGui = debug_gui.checked;
|
||||
config.steamVrLh = steamvr_lh.checked;
|
||||
}
|
||||
|
||||
function load() {
|
||||
@@ -471,6 +495,10 @@ Kirigami.ScrollablePage {
|
||||
// auto_encoders.checked = true;
|
||||
encoder_layout.currentIndex = 0;
|
||||
}
|
||||
|
||||
debug_gui.checked = config.debugGui;
|
||||
steamvr_lh.checked = config.steamVrLh;
|
||||
|
||||
openvr_combobox.load()
|
||||
|
||||
adb_custom.checked = settings.adb_custom;
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "settings.h"
|
||||
|
||||
#include "escape_string.h"
|
||||
#include "gui_config.h"
|
||||
#include "utils/flatpak.h"
|
||||
#include "wivrn_server.h"
|
||||
#include <QList>
|
||||
@@ -213,6 +214,25 @@ void Settings::load(const wivrn_server * server)
|
||||
set_application("");
|
||||
}
|
||||
|
||||
// Advanced options (debug window, steamvr_lh)
|
||||
try
|
||||
{
|
||||
set_debugGui(json_doc.value("debug-gui", false));
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
set_debugGui(false);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
set_steamVrLh(json_doc.value("use-steamvr-lh", false));
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
set_steamVrLh(false);
|
||||
}
|
||||
|
||||
// OpenVR compat library
|
||||
try
|
||||
{
|
||||
@@ -298,6 +318,9 @@ void Settings::save(wivrn_server * server)
|
||||
if (application() != "")
|
||||
json_doc["application"] = unescape_string(application());
|
||||
|
||||
json_doc["debug-gui"] = debugGui();
|
||||
json_doc["use-steamvr-lh"] = steamVrLh();
|
||||
|
||||
if (openvr() == "-")
|
||||
json_doc["openvr-compat-path"] = nullptr;
|
||||
else if (openvr() == "")
|
||||
@@ -315,6 +338,8 @@ void Settings::restore_defaults()
|
||||
set_bitrate(50'000'000);
|
||||
set_scale(-1);
|
||||
set_application("");
|
||||
set_debugGui(false);
|
||||
set_steamVrLh(false);
|
||||
set_tcpOnly(false);
|
||||
}
|
||||
|
||||
@@ -347,4 +372,21 @@ bool Settings::flatpak() const
|
||||
return wivrn::is_flatpak();
|
||||
}
|
||||
|
||||
bool Settings::debug_gui() const
|
||||
{
|
||||
#if WIVRN_FEATURE_DEBUG_GUI
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
bool Settings::steamvr_lh() const
|
||||
{
|
||||
#if WIVRN_FEATURE_STEAMVR_LIGHTHOUSE
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
#include "moc_settings.cpp"
|
||||
|
||||
@@ -122,10 +122,14 @@ class Settings : public QObject
|
||||
Q_PROPERTY(int bitrate READ bitrate WRITE set_bitrate NOTIFY bitrateChanged)
|
||||
Q_PROPERTY(float scale READ scale WRITE set_scale NOTIFY scaleChanged)
|
||||
Q_PROPERTY(QString application READ application WRITE set_application NOTIFY applicationChanged)
|
||||
Q_PROPERTY(bool debugGui READ debugGui WRITE set_debugGui NOTIFY debugGuiChanged)
|
||||
Q_PROPERTY(bool steamVrLh READ steamVrLh WRITE set_steamVrLh NOTIFY steamVrLhChanged)
|
||||
Q_PROPERTY(bool tcpOnly READ tcpOnly WRITE set_tcpOnly NOTIFY tcpOnlyChanged)
|
||||
Q_PROPERTY(QString openvr READ openvr WRITE set_openvr NOTIFY openvrChanged)
|
||||
|
||||
Q_PROPERTY(bool flatpak READ flatpak CONSTANT)
|
||||
Q_PROPERTY(bool debug_gui_supported READ debug_gui CONSTANT)
|
||||
Q_PROPERTY(bool steamvr_lh_supported READ steamvr_lh CONSTANT)
|
||||
|
||||
SETTER_GETTER_NOTIFY(bool, manualEncoders)
|
||||
SETTER_GETTER_NOTIFY(std::vector<encoder>, encoders)
|
||||
@@ -133,6 +137,8 @@ class Settings : public QObject
|
||||
SETTER_GETTER_NOTIFY(int, bitrate)
|
||||
SETTER_GETTER_NOTIFY(float, scale)
|
||||
SETTER_GETTER_NOTIFY(QString, application)
|
||||
SETTER_GETTER_NOTIFY(bool, debugGui)
|
||||
SETTER_GETTER_NOTIFY(bool, steamVrLh)
|
||||
SETTER_GETTER_NOTIFY(bool, tcpOnly)
|
||||
SETTER_GETTER_NOTIFY(QString, openvr)
|
||||
|
||||
@@ -146,6 +152,8 @@ public:
|
||||
Q_INVOKABLE void set_encoder_preset(QJSValue preset);
|
||||
|
||||
bool flatpak() const;
|
||||
bool debug_gui() const;
|
||||
bool steamvr_lh() const;
|
||||
|
||||
static std::optional<encoder::encoder_name> encoder_id_from_string(std::string_view s);
|
||||
static std::optional<encoder::video_codec> codec_id_from_string(std::string_view s);
|
||||
|
||||
+2
-2
@@ -60,7 +60,7 @@ See [Server](#server-pc) for the server compile options.
|
||||
# Client (headset)
|
||||
|
||||
#### Build dependencies
|
||||
As Arch package names: git pkgconf glslang cmake jdk17-temurin librsvg cli11 ktx_software-git ([AUR](https://aur.archlinux.org/packages/ktx_software-git))
|
||||
As Arch package names: git pkgconf glslang cmake jdk17-openjdk librsvg cli11 ktx_software-git ([AUR](https://aur.archlinux.org/packages/ktx_software-git))
|
||||
|
||||
OpenSSL build dependencies are also needed, as described [here](https://github.com/openssl/openssl/blob/master/INSTALL.md#prerequisites), in particular perl 5.
|
||||
|
||||
@@ -93,7 +93,7 @@ Once you have generated the keys, the apk will be automatically signed at build
|
||||
From the main directory.
|
||||
```bash
|
||||
export ANDROID_HOME=~/Android
|
||||
export JAVA_HOME=/usr/lib/jvm/java-17-temurin/
|
||||
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk/
|
||||
|
||||
./gradlew assembleStandardRelease
|
||||
```
|
||||
|
||||
@@ -190,3 +190,17 @@ Provides the path to the directory of an OpenVR compatibility tool (such as Open
|
||||
If unset, WiVRn will autodetect the path of such a tool as usual (see [the SteamVR guide](./steamvr.md)).
|
||||
|
||||
If set to an null, WiVRn will not manage the OpenVR configuration.
|
||||
|
||||
## `debug-gui`
|
||||
Default value: `false`
|
||||
|
||||
Only available when built with `WIVRN_FEATURE_DEBUG_GUI`.
|
||||
|
||||
Enables the Monado debug gui.
|
||||
|
||||
## `use-steamvr-lh`
|
||||
Default value: `false`
|
||||
|
||||
Only available when built with `WIVRN_FEATURE_STEAMVR_LIGHTHOUSE`
|
||||
|
||||
Enables the driver to load SteamVR Lighthouse devices.
|
||||
|
||||
Generated
+61
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1743550720,
|
||||
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "c621e8422220273271f52058f618c94e405bb0f5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1747744144,
|
||||
"narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1743296961,
|
||||
"narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
{
|
||||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
inputs.flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
|
||||
outputs = inputs@{ nixpkgs, flake-parts, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = [ "x86_64-linux" ];
|
||||
perSystem = { pkgs, ... }: let
|
||||
# Tools used for development work (clangd, clang-format)
|
||||
devTools = with pkgs; [
|
||||
clang-tools
|
||||
];
|
||||
# Extra build inputs not yet in the nixpkgs recipe.
|
||||
# Should be submitted to nixpkgs on release
|
||||
extraBuildInputs = with pkgs; [
|
||||
# XRT_FEATURE_DEBUG_GUI requires SDL2
|
||||
sdl2-compat
|
||||
];
|
||||
|
||||
package = pkgs.wivrn.overrideAttrs (finalAttrs: oldAttrs: {
|
||||
src = ./.;
|
||||
version = "next";
|
||||
|
||||
# Because src is just a folder path and not a set from a fetcher, it doesn't need to be unpacked, so having a postUnpack throws an error.
|
||||
# We also don't need the check since we read the revision from the monado-rev file.
|
||||
postUnpack = null;
|
||||
|
||||
monado = pkgs.applyPatches {
|
||||
inherit (oldAttrs.monado) patches postPatch;
|
||||
# Force a refetch when the monado rev changes.
|
||||
src = pkgs.invalidateFetcherByDrvHash pkgs.fetchFromGitLab {
|
||||
inherit (oldAttrs.monado.src) owner repo;
|
||||
domain = "gitlab.freedesktop.org";
|
||||
# Keep in sync with CMakeLists.txt monado rev
|
||||
rev = builtins.readFile ./monado-rev;
|
||||
# Nix will output the correct hash when it doesn't match
|
||||
hash = "sha256-Bus9GTNC4+nOSwN8pUsMaFsiXjlpHYioQfBLxbQEF+0=";
|
||||
};
|
||||
};
|
||||
|
||||
buildInputs = oldAttrs.buildInputs ++ extraBuildInputs;
|
||||
});
|
||||
in {
|
||||
packages.default = package;
|
||||
devShells.default = package.overrideAttrs (oldAttrs: {
|
||||
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ devTools;
|
||||
});
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -28,6 +28,9 @@ finish-args:
|
||||
# Set the active OpenXR / OpenVR runtime
|
||||
- --filesystem=xdg-config/openxr:create
|
||||
- --filesystem=xdg-config/openvr:create
|
||||
# SlimeVR
|
||||
- --filesystem=xdg-run/SlimeVRInput
|
||||
- --filesystem=xdg-run/SlimeVRRpc
|
||||
# Let outside application access the WiVRn socket
|
||||
- --filesystem=xdg-run/wivrn:create
|
||||
- --own-name=io.github.wivrn.Server
|
||||
@@ -371,6 +374,7 @@ modules:
|
||||
- -DWIVRN_USE_NVENC=ON
|
||||
- -DWIVRN_USE_VULKAN_ENCODE=ON
|
||||
- -DWIVRN_USE_PULSEAUDIO=OFF
|
||||
- -DWIVRN_FEATURE_SOLARXR=ON
|
||||
- -DWIVRN_WERROR=ON
|
||||
- -DWIVRN_CHECK_CAPSYSNICE=OFF # Capabilities don't work inside flatpak
|
||||
- -DFETCHCONTENT_FULLY_DISCONNECTED=ON
|
||||
|
||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 158 KiB |
@@ -5,8 +5,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WiVRn-dashboard\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-04-27 16:16+0200\n"
|
||||
"PO-Revision-Date: 2025-04-27 16:20+0200\n"
|
||||
"POT-Creation-Date: 2025-05-22 18:25+0200\n"
|
||||
"PO-Revision-Date: 2025-05-22 18:33+0200\n"
|
||||
"Last-Translator: Guillaume Meunier <guillaume.meunier@centraliens.net>\n"
|
||||
"Language-Team: French <>\n"
|
||||
"Language: French\n"
|
||||
@@ -530,54 +530,73 @@ msgstr "H.265"
|
||||
msgid "AV1"
|
||||
msgstr "AV1"
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:323
|
||||
#: dashboard/qml/SettingsPage.qml:320
|
||||
#, kde-format
|
||||
msgid "Advanced options"
|
||||
msgstr "Paramètres avancés"
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:326
|
||||
#, kde-format
|
||||
msgid "Enable debug window"
|
||||
msgstr "Activer la fenêtre de débogage"
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:333
|
||||
#, kde-format
|
||||
msgid "Enable SteamVR tracked devices support"
|
||||
msgstr "Activer le support des manettes SteamVR"
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:336
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Allows the use of lighthouse-based controllers and trackers.\n"
|
||||
"Requires SteamVR to be installed.\n"
|
||||
"Devices must be be powered on before connecting to WiVRn.\n"
|
||||
"An external tool such as motoc is needed for calibration."
|
||||
msgstr ""
|
||||
"Permet d'utiliser les manettes et trackers utilisant Lighthouse.\n"
|
||||
"Nécessite SteamVR installé.\n"
|
||||
"Les manettes et trackers doivent être allumés avant de connecter le casque à "
|
||||
"WiVRn.\n"
|
||||
"Un utilitaire tiers tel que motoc est nécessaire pour la calibration."
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:344
|
||||
#, kde-format
|
||||
msgid "Custom adb location"
|
||||
msgstr "Spécifier l'emplacement d'adb"
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:334
|
||||
#: dashboard/qml/SettingsPage.qml:355
|
||||
#, kde-format
|
||||
msgid "Adb location:"
|
||||
msgstr "Emplacement d'adb"
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:343
|
||||
#: dashboard/qml/SettingsPage.qml:364
|
||||
#, kde-format
|
||||
msgctxt "browse a file to choose the adb binary"
|
||||
msgid "Browse"
|
||||
msgstr "Parcourir"
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:353
|
||||
#: dashboard/qml/SettingsPage.qml:374
|
||||
#, kde-format
|
||||
msgid "Default"
|
||||
msgstr "Par défaut"
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:360
|
||||
#, kde-format
|
||||
msgid "xrizer"
|
||||
msgstr "xrizer"
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:365
|
||||
#, kde-format
|
||||
msgid "Open Composite"
|
||||
msgstr "Open Composite"
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:372
|
||||
#: dashboard/qml/SettingsPage.qml:388
|
||||
#, kde-format
|
||||
msgctxt "set a custom OpenVR compatibility library"
|
||||
msgid "Custom"
|
||||
msgstr "Personnalisé"
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:377
|
||||
#: dashboard/qml/SettingsPage.qml:393
|
||||
#, kde-format
|
||||
msgid "Disabled"
|
||||
msgstr "Désactivé"
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:385
|
||||
#: dashboard/qml/SettingsPage.qml:401
|
||||
#, kde-format
|
||||
msgid "OpenVR compatibility library:"
|
||||
msgstr "Compatibilité OpenVR :"
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:411
|
||||
#: dashboard/qml/SettingsPage.qml:427
|
||||
#, kde-format
|
||||
msgid "Library path, excluding bin/linux64/vrclient.so"
|
||||
msgstr "Chemin de la bibliothèque, en enlevant bin/linux64/vrclient.so"
|
||||
@@ -887,3 +906,13 @@ msgstr "Finir"
|
||||
#, kde-format
|
||||
msgid "Finished"
|
||||
msgstr "Terminé"
|
||||
|
||||
#: dashboard/wivrn_server.cpp:584
|
||||
#, kde-format
|
||||
msgid "xrizer"
|
||||
msgstr "xrizer"
|
||||
|
||||
#: dashboard/wivrn_server.cpp:585
|
||||
#, kde-format
|
||||
msgid "Open Composite"
|
||||
msgstr "Open Composite"
|
||||
|
||||
@@ -2,7 +2,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WiVRn-dashboard\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-05-05 23:41+0900\n"
|
||||
"POT-Creation-Date: 2025-05-22 03:31+0900\n"
|
||||
"PO-Revision-Date: 2025-04-10 07:14+0900\n"
|
||||
"Last-Translator: Mitsuami Megane <hello@mitsua.me>\n"
|
||||
"Language-Team: Japanese <>\n"
|
||||
@@ -517,54 +517,72 @@ msgstr "H.265"
|
||||
msgid "AV1"
|
||||
msgstr "AV1"
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:323
|
||||
#: dashboard/qml/SettingsPage.qml:320
|
||||
#, kde-format
|
||||
msgid "Advanced options"
|
||||
msgstr "詳細設定"
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:326
|
||||
#, kde-format
|
||||
msgid "Enable debug window"
|
||||
msgstr "デバッグ・ウィンドウを表示する"
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:333
|
||||
#, kde-format
|
||||
msgid "Enable SteamVR tracked devices support"
|
||||
msgstr "SteamVR・ライトハウス・トラッキング"
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:336
|
||||
#, kde-format
|
||||
msgid ""
|
||||
"Allows the use of lighthouse-based controllers and trackers.\n"
|
||||
"Requires SteamVR to be installed.\n"
|
||||
"Devices must be be powered on before connecting to WiVRn.\n"
|
||||
"An external tool such as motoc is needed for calibration."
|
||||
msgstr ""
|
||||
"ライトハウスのコントローラーやトラッカーなどを使用します。\n"
|
||||
"SteamVRをインストールする必要があります。\n"
|
||||
"すべてのデバイスの電源が入ってからHMDを接続しましょう。\n"
|
||||
"キャリブレーションはmotocなどのソフトウェアで行います。"
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:344
|
||||
#, kde-format
|
||||
msgid "Custom adb location"
|
||||
msgstr "特定なADBの場所"
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:334
|
||||
#: dashboard/qml/SettingsPage.qml:355
|
||||
#, kde-format
|
||||
msgid "Adb location:"
|
||||
msgstr "ADBの場所:"
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:343
|
||||
#: dashboard/qml/SettingsPage.qml:364
|
||||
#, kde-format
|
||||
msgctxt "browse a file to choose the adb binary"
|
||||
msgid "Browse"
|
||||
msgstr "検索する"
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:353
|
||||
#: dashboard/qml/SettingsPage.qml:374
|
||||
#, kde-format
|
||||
msgid "Default"
|
||||
msgstr "デフォルト"
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:360
|
||||
#, kde-format
|
||||
msgid "xrizer"
|
||||
msgstr "xrizer"
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:365
|
||||
#, kde-format
|
||||
msgid "Open Composite"
|
||||
msgstr "OpenComposite"
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:372
|
||||
#: dashboard/qml/SettingsPage.qml:388
|
||||
#, kde-format
|
||||
msgctxt "set a custom OpenVR compatibility library"
|
||||
msgid "Custom"
|
||||
msgstr "カスタム"
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:377
|
||||
#: dashboard/qml/SettingsPage.qml:393
|
||||
#, kde-format
|
||||
msgid "Disabled"
|
||||
msgstr "無し"
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:385
|
||||
#: dashboard/qml/SettingsPage.qml:401
|
||||
#, kde-format
|
||||
msgid "OpenVR compatibility library:"
|
||||
msgstr "OpenVR実装ライブラリー"
|
||||
|
||||
#: dashboard/qml/SettingsPage.qml:411
|
||||
#: dashboard/qml/SettingsPage.qml:427
|
||||
#, kde-format
|
||||
msgid "Library path, excluding bin/linux64/vrclient.so"
|
||||
msgstr "ライブラリーの場所(bin/linux64/vrclient.so 無し)"
|
||||
@@ -862,3 +880,13 @@ msgstr "完了"
|
||||
#, kde-format
|
||||
msgid "Finished"
|
||||
msgstr "完了しました"
|
||||
|
||||
#: dashboard/wivrn_server.cpp:584
|
||||
#, kde-format
|
||||
msgid "xrizer"
|
||||
msgstr "xrizer"
|
||||
|
||||
#: dashboard/wivrn_server.cpp:585
|
||||
#, kde-format
|
||||
msgid "Open Composite"
|
||||
msgstr "OpenComposite"
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
2a6932d46dad9aa957205e8a47ec2baa33041076
|
||||
+4
-4
@@ -1,12 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -d ".git" ] ; then
|
||||
git config user.email > /dev/null || git config user.email "git-am@invalid"
|
||||
git config user.name > /dev/null || git config user.name "no name"
|
||||
git config --local commit.gpgsign false
|
||||
git config --worktree user.email "git-am@invalid"
|
||||
git config --worktree user.name "no name"
|
||||
git config --worktree commit.gpgsign false
|
||||
git am --abort 2> /dev/null
|
||||
git checkout .
|
||||
exec git am "$@"
|
||||
exec git am --committer-date-is-author-date "$@"
|
||||
fi
|
||||
|
||||
# There is no reliable way to apply a patch and succeed if it was
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From a0e439f723394452ab79a09c04df5135c3613d11 Mon Sep 17 00:00:00 2001
|
||||
From e18311e2b207f784cdd48ab6faf3834f912a1f8d Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Nicolas <patricknicolas@laposte.net>
|
||||
Date: Tue, 22 Oct 2024 15:23:19 +0200
|
||||
Subject: [PATCH 01/13] c/multi: early wake of compositor
|
||||
Subject: [PATCH 01/11] c/multi: early wake of compositor
|
||||
|
||||
---
|
||||
.../compositor/multi/comp_multi_compositor.c | 14 +++++++++
|
||||
@@ -10,7 +10,7 @@ Subject: [PATCH 01/13] c/multi: early wake of compositor
|
||||
3 files changed, 41 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/xrt/compositor/multi/comp_multi_compositor.c b/src/xrt/compositor/multi/comp_multi_compositor.c
|
||||
index 2895ccb0f..0c940cb3a 100644
|
||||
index d19eda4ff..b9fcd0ca6 100644
|
||||
--- a/src/xrt/compositor/multi/comp_multi_compositor.c
|
||||
+++ b/src/xrt/compositor/multi/comp_multi_compositor.c
|
||||
@@ -231,7 +231,21 @@ wait_for_scheduled_free(struct multi_compositor *mc)
|
||||
@@ -128,5 +128,5 @@ index b06b03a58..249e07d7d 100644
|
||||
//! @todo Make the clients not go from IDLE to READY before we have completed a first frame.
|
||||
// Make sure there is at least some sort of valid frame data here.
|
||||
--
|
||||
2.48.1
|
||||
2.49.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 6e5926f76f8a7ee66eff164ebe630c65d024237f Mon Sep 17 00:00:00 2001
|
||||
From 0b802694d3a46668acbb7962cb6cc9e7634fa519 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Nicolas <patricknicolas@laposte.net>
|
||||
Date: Tue, 2 Apr 2024 17:14:42 +0200
|
||||
Subject: [PATCH 02/10] ipc/server: Always listen to stdin
|
||||
Subject: [PATCH 02/11] ipc/server: Always listen to stdin
|
||||
|
||||
---
|
||||
src/xrt/ipc/server/ipc_server_mainloop_linux.c | 2 +-
|
||||
@@ -21,5 +21,5 @@ index d364fbed3..ad6b473b7 100644
|
||||
// default.
|
||||
// This polls stdin.
|
||||
--
|
||||
2.48.0
|
||||
2.49.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 95631921f2dd8f422281d5d94bca167bcb773471 Mon Sep 17 00:00:00 2001
|
||||
From 7a53f4a771a8386d659ad03a025447e8193c284c Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Nicolas <patricknicolas@laposte.net>
|
||||
Date: Tue, 8 Oct 2024 22:13:15 +0200
|
||||
Subject: [PATCH 03/10] Use extern socket fd
|
||||
Subject: [PATCH 03/11] Use extern socket fd
|
||||
|
||||
---
|
||||
src/xrt/ipc/server/ipc_server_mainloop_linux.c | 8 ++++++++
|
||||
@@ -34,5 +34,5 @@ index ad6b473b7..ea6fad65b 100644
|
||||
// We may have been launched with socket activation
|
||||
int num_fds = sd_listen_fds(0);
|
||||
--
|
||||
2.48.0
|
||||
2.49.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From c95362727746c19ff039168ebec3e6e21e6bcc3c Mon Sep 17 00:00:00 2001
|
||||
From 018341025bf1ddd2a59e063e7dd972b914ebfbb5 Mon Sep 17 00:00:00 2001
|
||||
From: galister <3123227-galister@users.noreply.gitlab.com>
|
||||
Date: Mon, 19 Aug 2024 18:51:45 +0900
|
||||
Subject: [PATCH 04/10] c/render: Add storage usage to distortion mesh
|
||||
Subject: [PATCH 04/11] c/render: Add storage usage to distortion mesh
|
||||
|
||||
---
|
||||
src/xrt/compositor/render/render_distortion.c | 2 +-
|
||||
@@ -21,5 +21,5 @@ index 8ac24db8e..5a7e400c3 100644
|
||||
&image); // out_image
|
||||
VK_CHK_AND_RET(ret, "vk_create_image_simple");
|
||||
--
|
||||
2.48.0
|
||||
2.49.0
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
From 9a3e2f9bdc3149aaa6db1c54c95b0b4f9ab379ff Mon Sep 17 00:00:00 2001
|
||||
From e7159c1bb460909c7c8fe4d54f2a1513462e24b0 Mon Sep 17 00:00:00 2001
|
||||
From: galister <85970-galister@users.noreply.gitlab.freedesktop.org>
|
||||
Date: Sat, 23 Nov 2024 02:42:12 +0900
|
||||
Subject: [PATCH 05/10] change environment blend mode selection logic
|
||||
Subject: [PATCH 05/11] change environment blend mode selection logic
|
||||
|
||||
---
|
||||
src/xrt/compositor/multi/comp_multi_system.c | 26 +++++++++++++-------
|
||||
1 file changed, 17 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/src/xrt/compositor/multi/comp_multi_system.c b/src/xrt/compositor/multi/comp_multi_system.c
|
||||
index b7d2c2174..62a5a0c27 100644
|
||||
index 249e07d7d..12c8fc455 100644
|
||||
--- a/src/xrt/compositor/multi/comp_multi_system.c
|
||||
+++ b/src/xrt/compositor/multi/comp_multi_system.c
|
||||
@@ -232,23 +232,31 @@ find_active_blend_mode(struct multi_compositor **overlay_sorted_clients, size_t
|
||||
@@ -53,5 +53,5 @@ index b7d2c2174..62a5a0c27 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.48.0
|
||||
2.49.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 3f6883949ac235cc1e3f1ef8480ad08bd25da503 Mon Sep 17 00:00:00 2001
|
||||
From 5f506fb48a7dc284bb64598617bed6d8d481b662 Mon Sep 17 00:00:00 2001
|
||||
From: galister <3123227-galister@users.noreply.gitlab.com>
|
||||
Date: Thu, 31 Oct 2024 04:37:27 +0900
|
||||
Subject: [PATCH 06/10] Use mipmaps for distortion shader
|
||||
Subject: [PATCH 06/11] Use mipmaps for distortion shader
|
||||
|
||||
---
|
||||
src/external/CMakeLists.txt | 23 +
|
||||
@@ -42,10 +42,10 @@ Subject: [PATCH 06/10] Use mipmaps for distortion shader
|
||||
create mode 100644 src/xrt/compositor/util/comp_mipmap.h
|
||||
|
||||
diff --git a/src/external/CMakeLists.txt b/src/external/CMakeLists.txt
|
||||
index 0705627ae..51f89714f 100644
|
||||
index 6b1566e42..570d1a30f 100644
|
||||
--- a/src/external/CMakeLists.txt
|
||||
+++ b/src/external/CMakeLists.txt
|
||||
@@ -211,3 +211,26 @@ add_library(xrt-external-vdf INTERFACE)
|
||||
@@ -215,3 +215,26 @@ add_library(xrt-external-vdf INTERFACE)
|
||||
target_include_directories(
|
||||
xrt-external-vdf SYSTEM INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/valve-file-vdf
|
||||
)
|
||||
@@ -1673,7 +1673,7 @@ index 000000000..524a74120
|
||||
+ srgbFromLinear(arg.b), alpha);
|
||||
+}
|
||||
diff --git a/src/xrt/auxiliary/vk/vk_helpers.c b/src/xrt/auxiliary/vk/vk_helpers.c
|
||||
index 62f505391..80193f1ab 100644
|
||||
index 3aebad12a..7e6630d4d 100644
|
||||
--- a/src/xrt/auxiliary/vk/vk_helpers.c
|
||||
+++ b/src/xrt/auxiliary/vk/vk_helpers.c
|
||||
@@ -1382,6 +1382,7 @@ vk_create_sampler(struct vk_bundle *vk, VkSamplerAddressMode clamp_mode, VkSampl
|
||||
@@ -1716,7 +1716,7 @@ index f1c54ed4d..3bc9302f7 100644
|
||||
target_include_directories(comp_util PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif()
|
||||
diff --git a/src/xrt/compositor/main/comp_renderer.c b/src/xrt/compositor/main/comp_renderer.c
|
||||
index bd07a7744..112d14e32 100644
|
||||
index 6df4d2b29..89982e654 100644
|
||||
--- a/src/xrt/compositor/main/comp_renderer.c
|
||||
+++ b/src/xrt/compositor/main/comp_renderer.c
|
||||
@@ -366,6 +366,9 @@ renderer_build_rendering_target_resources(struct comp_renderer *r,
|
||||
@@ -2499,10 +2499,10 @@ index dbc2fec7e..fc11a0521 100644
|
||||
* Layer squashing.
|
||||
*/
|
||||
diff --git a/src/xrt/compositor/util/comp_render_helpers.h b/src/xrt/compositor/util/comp_render_helpers.h
|
||||
index aa5de56c2..bbf295c0a 100644
|
||||
index 8fa3af8f0..4e525be5a 100644
|
||||
--- a/src/xrt/compositor/util/comp_render_helpers.h
|
||||
+++ b/src/xrt/compositor/util/comp_render_helpers.h
|
||||
@@ -145,10 +145,10 @@ cmd_barrier_view_images(struct vk_bundle *vk,
|
||||
@@ -149,10 +149,10 @@ cmd_barrier_view_images(struct vk_bundle *vk,
|
||||
VkPipelineStageFlags src_stage_mask,
|
||||
VkPipelineStageFlags dst_stage_mask)
|
||||
{
|
||||
@@ -2515,7 +2515,7 @@ index aa5de56c2..bbf295c0a 100644
|
||||
.baseArrayLayer = 0,
|
||||
.layerCount = 1,
|
||||
};
|
||||
@@ -172,16 +172,16 @@ cmd_barrier_view_images(struct vk_bundle *vk,
|
||||
@@ -176,17 +176,17 @@ cmd_barrier_view_images(struct vk_bundle *vk,
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2543,6 +2543,7 @@ index aa5de56c2..bbf295c0a 100644
|
||||
+ all_color_level_subresource_range); // subresource_range
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/xrt/compositor/util/comp_scratch.c b/src/xrt/compositor/util/comp_scratch.c
|
||||
index 48bfda7c7..1d892a31b 100644
|
||||
--- a/src/xrt/compositor/util/comp_scratch.c
|
||||
@@ -2759,5 +2760,5 @@ index 44849c20e..f8c891e49 100644
|
||||
void
|
||||
comp_scratch_stereo_images_free(struct comp_scratch_stereo_images *cssi, struct vk_bundle *vk);
|
||||
--
|
||||
2.48.0
|
||||
2.49.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From cf75548500d8aff912f2e63d68e0ea3628941bf8 Mon Sep 17 00:00:00 2001
|
||||
From 30eb60e3716c0bb0df118f4b36eb1820c567ee5b Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Nicolas <patricknicolas@laposte.net>
|
||||
Date: Wed, 11 Sep 2024 22:56:29 +0200
|
||||
Subject: [PATCH 07/10] Convert to YCbCr in Monado
|
||||
Subject: [PATCH 07/11] Convert to YCbCr in Monado
|
||||
|
||||
---
|
||||
src/xrt/compositor/main/comp_renderer.c | 6 +-
|
||||
@@ -15,7 +15,7 @@ Subject: [PATCH 07/10] Convert to YCbCr in Monado
|
||||
8 files changed, 186 insertions(+), 85 deletions(-)
|
||||
|
||||
diff --git a/src/xrt/compositor/main/comp_renderer.c b/src/xrt/compositor/main/comp_renderer.c
|
||||
index 104f761bf..3b3439d5a 100644
|
||||
index 89982e654..55aaed69e 100644
|
||||
--- a/src/xrt/compositor/main/comp_renderer.c
|
||||
+++ b/src/xrt/compositor/main/comp_renderer.c
|
||||
@@ -1009,7 +1009,8 @@ dispatch_compute(struct comp_renderer *r,
|
||||
@@ -715,5 +715,5 @@ index fc11a0521..3db6c8d2e 100644
|
||||
d->do_timewarp); //
|
||||
}
|
||||
--
|
||||
2.48.0
|
||||
2.49.0
|
||||
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
From e17739a88a15ac26dfe9ccb9ffc97ff029fa7764 Mon Sep 17 00:00:00 2001
|
||||
From d5337b1e4811aef804057e26d67aace90adc36e8 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Nicolas <patricknicolas@laposte.net>
|
||||
Date: Sun, 3 Nov 2024 13:40:00 +0100
|
||||
Subject: [PATCH 10/10] store alpha channel in layer 1
|
||||
Subject: [PATCH 08/11] store alpha channel in layer 1
|
||||
|
||||
---
|
||||
src/xrt/compositor/shaders/clear.comp | 4 ++--
|
||||
@@ -90,5 +90,5 @@ index 461aeb4ec..237221a54 100644
|
||||
+ imageStore(luma, ivec3(offset.xy/2 + gl_GlobalInvocationID.xy, 1), alpha);
|
||||
}
|
||||
--
|
||||
2.48.0
|
||||
2.49.0
|
||||
|
||||
+4
-4
@@ -1,14 +1,14 @@
|
||||
From 6321ad3eee7d4a8b304a36de008d8fb8359f3dfe Mon Sep 17 00:00:00 2001
|
||||
From dffeb683c92b6ab2fbbf240817e4087a134d997f Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Nicolas <patricknicolas@laposte.net>
|
||||
Date: Wed, 19 Feb 2025 10:13:36 +0100
|
||||
Subject: [PATCH] st/oxr: bind to dynamic role's profile
|
||||
Subject: [PATCH 09/11] st/oxr: bind to dynamic role's profile
|
||||
|
||||
---
|
||||
src/xrt/state_trackers/oxr/oxr_binding.c | 17 +++++++++++++++++
|
||||
1 file changed, 17 insertions(+)
|
||||
|
||||
diff --git a/src/xrt/state_trackers/oxr/oxr_binding.c b/src/xrt/state_trackers/oxr/oxr_binding.c
|
||||
index eb8bb5489..b04977a8b 100644
|
||||
index 07378d7b3..83a7b241d 100644
|
||||
--- a/src/xrt/state_trackers/oxr/oxr_binding.c
|
||||
+++ b/src/xrt/state_trackers/oxr/oxr_binding.c
|
||||
@@ -380,6 +380,23 @@ oxr_find_profile_for_device(struct oxr_logger *log,
|
||||
@@ -36,5 +36,5 @@ index eb8bb5489..b04977a8b 100644
|
||||
oxr_get_profile_for_device_name(log, sess, xdev->name, out_p);
|
||||
if (*out_p != NULL) {
|
||||
--
|
||||
2.48.1
|
||||
2.49.0
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
From edd3447b25387908acbe005f1cbee5f17bae0260 Mon Sep 17 00:00:00 2001
|
||||
From 644f84e916d40d6341de91687a3dc9b0eecd13a4 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Nicolas <patricknicolas@laposte.net>
|
||||
Date: Thu, 27 Feb 2025 22:45:36 +0100
|
||||
Subject: [PATCH] c/main: allow custom pacing app factory
|
||||
Subject: [PATCH 10/11] c/main: allow custom pacing app factory
|
||||
|
||||
---
|
||||
src/xrt/compositor/main/comp_compositor.c | 10 ++++++----
|
||||
@@ -78,5 +78,5 @@ index 617561c37..e10ba8358 100644
|
||||
#else
|
||||
if (!use_null) {
|
||||
--
|
||||
2.48.1
|
||||
2.49.0
|
||||
|
||||
+5
-5
@@ -1,17 +1,17 @@
|
||||
From b9bef34f0362677d2a58c0b2b331c98e2f74f9b2 Mon Sep 17 00:00:00 2001
|
||||
From f3dbf64ec2a45ac0e44a5d017b66d12fd8d63e77 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Nicolas <patricknicolas@laposte.net>
|
||||
Date: Sat, 15 Mar 2025 22:19:48 +0100
|
||||
Subject: [PATCH] st/oxr: forward 0 refresh rate
|
||||
Subject: [PATCH 11/11] st/oxr: forward 0 refresh rate
|
||||
|
||||
---
|
||||
src/xrt/state_trackers/oxr/oxr_api_session.c | 6 +-----
|
||||
1 file changed, 1 insertion(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/xrt/state_trackers/oxr/oxr_api_session.c b/src/xrt/state_trackers/oxr/oxr_api_session.c
|
||||
index c84806bde..955019957 100644
|
||||
index df8ec96b7..cbc542130 100644
|
||||
--- a/src/xrt/state_trackers/oxr/oxr_api_session.c
|
||||
+++ b/src/xrt/state_trackers/oxr/oxr_api_session.c
|
||||
@@ -644,15 +644,11 @@ oxr_xrRequestDisplayRefreshRateFB(XrSession session, float displayRefreshRate)
|
||||
@@ -645,15 +645,11 @@ oxr_xrRequestDisplayRefreshRateFB(XrSession session, float displayRefreshRate)
|
||||
OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess, "xrRequestDisplayRefreshRateFB");
|
||||
OXR_VERIFY_SESSION_NOT_LOST(&log, sess);
|
||||
|
||||
@@ -29,5 +29,5 @@ index c84806bde..955019957 100644
|
||||
if ((int)(displayRefreshRate * 100.0f) == (int)(sess->sys->xsysc->info.refresh_rates_hz[i] * 100.0f)) {
|
||||
found = true;
|
||||
--
|
||||
2.48.1
|
||||
2.49.0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,292 @@
|
||||
From 7114d99942608a2f02d45d64d8eac3e1c2ea739c Mon Sep 17 00:00:00 2001
|
||||
From: rcelyte <rcelyte@battletrains.org>
|
||||
Date: Fri, 23 Aug 2024 20:54:53 +0000
|
||||
Subject: [PATCH] t/common: Load SolarXR driver
|
||||
|
||||
---
|
||||
src/xrt/drivers/qwerty/qwerty_device.c | 4 +++
|
||||
.../common/target_builder_lighthouse.c | 25 +++++++++++++++++
|
||||
.../targets/common/target_builder_qwerty.c | 25 +++++++++++++++++
|
||||
.../targets/common/target_builder_rift_s.c | 26 ++++++++++++++++++
|
||||
.../targets/common/target_builder_steamvr.c | 27 +++++++++++++++++++
|
||||
src/xrt/targets/common/target_builder_wmr.c | 25 +++++++++++++++++
|
||||
6 files changed, 132 insertions(+)
|
||||
|
||||
diff --git a/src/xrt/drivers/qwerty/qwerty_device.c b/src/xrt/drivers/qwerty/qwerty_device.c
|
||||
index 8841413efd..127644bc8b 100644
|
||||
--- a/src/xrt/drivers/qwerty/qwerty_device.c
|
||||
+++ b/src/xrt/drivers/qwerty/qwerty_device.c
|
||||
@@ -315,6 +315,8 @@ qwerty_hmd_create(void)
|
||||
|
||||
xd->inputs[0].name = XRT_INPUT_GENERIC_HEAD_POSE;
|
||||
|
||||
+ xd->orientation_tracking_supported = true;
|
||||
+ xd->position_tracking_supported = true;
|
||||
xd->update_inputs = u_device_noop_update_inputs;
|
||||
xd->get_tracked_pose = qwerty_get_tracked_pose;
|
||||
xd->get_view_poses = u_device_get_view_poses;
|
||||
@@ -367,6 +369,8 @@ qwerty_controller_create(bool is_left, struct qwerty_hmd *qhmd)
|
||||
xd->binding_profiles = binding_profiles;
|
||||
xd->binding_profile_count = ARRAY_SIZE(binding_profiles);
|
||||
|
||||
+ xd->orientation_tracking_supported = true;
|
||||
+ xd->position_tracking_supported = true;
|
||||
xd->update_inputs = qwerty_update_inputs;
|
||||
xd->get_tracked_pose = qwerty_get_tracked_pose;
|
||||
xd->set_output = qwerty_set_output;
|
||||
diff --git a/src/xrt/targets/common/target_builder_lighthouse.c b/src/xrt/targets/common/target_builder_lighthouse.c
|
||||
index 2386586be3..b8cbafdbed 100644
|
||||
--- a/src/xrt/targets/common/target_builder_lighthouse.c
|
||||
+++ b/src/xrt/targets/common/target_builder_lighthouse.c
|
||||
@@ -58,6 +58,10 @@
|
||||
#include "opengloves/opengloves_interface.h"
|
||||
#endif
|
||||
|
||||
+#ifdef XRT_BUILD_DRIVER_SOLARXR
|
||||
+#include "solarxr/solarxr_interface.h"
|
||||
+#endif
|
||||
+
|
||||
#if defined(XRT_BUILD_DRIVER_SURVIVE)
|
||||
#define DEFAULT_DRIVER "survive"
|
||||
#else
|
||||
@@ -509,6 +513,16 @@ try_add_opengloves(struct xrt_device *left,
|
||||
#endif
|
||||
}
|
||||
|
||||
+#ifdef XRT_BUILD_DRIVER_SOLARXR
|
||||
+static void
|
||||
+destroy_system_devices_solarxr(struct xrt_system_devices *xsysd)
|
||||
+{
|
||||
+ solarxr_device_set_feeder_devices(xsysd->static_roles.body, NULL, 0);
|
||||
+ u_system_devices_close(xsysd);
|
||||
+ free(xsysd);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
static xrt_result_t
|
||||
lighthouse_open_system_impl(struct xrt_builder *xb,
|
||||
cJSON *config,
|
||||
@@ -736,6 +750,17 @@ end_valve_index:
|
||||
try_add_opengloves(left, right, &left_ht, &right_ht);
|
||||
}
|
||||
|
||||
+#ifdef XRT_BUILD_DRIVER_SOLARXR
|
||||
+ const uint32_t count = solarxr_device_create_xdevs(head->tracking_origin, &xsysd->xdevs[xsysd->xdev_count],
|
||||
+ ARRAY_SIZE(xsysd->xdevs) - xsysd->xdev_count);
|
||||
+ if (count != 0) {
|
||||
+ xsysd->static_roles.body = xsysd->xdevs[xsysd->xdev_count];
|
||||
+ solarxr_device_set_feeder_devices(xsysd->static_roles.body, xsysd->xdevs, xsysd->xdev_count);
|
||||
+ xsysd->destroy = destroy_system_devices_solarxr;
|
||||
+ }
|
||||
+ xsysd->xdev_count += count;
|
||||
+#endif
|
||||
+
|
||||
// Assign to role(s).
|
||||
ubrh->head = head;
|
||||
ubrh->left = left;
|
||||
diff --git a/src/xrt/targets/common/target_builder_qwerty.c b/src/xrt/targets/common/target_builder_qwerty.c
|
||||
index 2c66ad3038..5a5059ee18 100644
|
||||
--- a/src/xrt/targets/common/target_builder_qwerty.c
|
||||
+++ b/src/xrt/targets/common/target_builder_qwerty.c
|
||||
@@ -18,6 +18,10 @@
|
||||
|
||||
#include "qwerty/qwerty_interface.h"
|
||||
|
||||
+#ifdef XRT_BUILD_DRIVER_SOLARXR
|
||||
+#include "solarxr/solarxr_interface.h"
|
||||
+#endif
|
||||
+
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
@@ -67,6 +71,16 @@ qwerty_estimate_system(struct xrt_builder *xb,
|
||||
return XRT_SUCCESS;
|
||||
}
|
||||
|
||||
+#ifdef XRT_BUILD_DRIVER_SOLARXR
|
||||
+static void
|
||||
+destroy_system_devices_solarxr(struct xrt_system_devices *xsysd)
|
||||
+{
|
||||
+ solarxr_device_set_feeder_devices(xsysd->static_roles.body, NULL, 0);
|
||||
+ u_system_devices_close(xsysd);
|
||||
+ free(xsysd);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
static xrt_result_t
|
||||
qwerty_open_system_impl(struct xrt_builder *xb,
|
||||
cJSON *config,
|
||||
@@ -100,6 +114,17 @@ qwerty_open_system_impl(struct xrt_builder *xb,
|
||||
ubrh->left = left;
|
||||
ubrh->right = right;
|
||||
|
||||
+#ifdef XRT_BUILD_DRIVER_SOLARXR
|
||||
+ const uint32_t count = solarxr_device_create_xdevs(head->tracking_origin, &xsysd->xdevs[xsysd->xdev_count],
|
||||
+ ARRAY_SIZE(xsysd->xdevs) - xsysd->xdev_count);
|
||||
+ if (count != 0) {
|
||||
+ xsysd->static_roles.body = xsysd->xdevs[xsysd->xdev_count];
|
||||
+ solarxr_device_set_feeder_devices(xsysd->static_roles.body, xsysd->xdevs, xsysd->xdev_count);
|
||||
+ xsysd->destroy = destroy_system_devices_solarxr;
|
||||
+ }
|
||||
+ xsysd->xdev_count += count;
|
||||
+#endif
|
||||
+
|
||||
return XRT_SUCCESS;
|
||||
}
|
||||
|
||||
diff --git a/src/xrt/targets/common/target_builder_rift_s.c b/src/xrt/targets/common/target_builder_rift_s.c
|
||||
index 675b303228..bf5581688d 100644
|
||||
--- a/src/xrt/targets/common/target_builder_rift_s.c
|
||||
+++ b/src/xrt/targets/common/target_builder_rift_s.c
|
||||
@@ -28,6 +28,10 @@
|
||||
#include "ht_ctrl_emu/ht_ctrl_emu_interface.h"
|
||||
#endif
|
||||
|
||||
+#ifdef XRT_BUILD_DRIVER_SOLARXR
|
||||
+#include "solarxr/solarxr_interface.h"
|
||||
+#endif
|
||||
+
|
||||
#include "rift_s/rift_s_interface.h"
|
||||
#include "rift_s/rift_s.h"
|
||||
|
||||
@@ -92,6 +96,16 @@ rift_s_estimate_system(struct xrt_builder *xb,
|
||||
return XRT_SUCCESS;
|
||||
}
|
||||
|
||||
+#ifdef XRT_BUILD_DRIVER_SOLARXR
|
||||
+static void
|
||||
+destroy_system_devices_solarxr(struct xrt_system_devices *xsysd)
|
||||
+{
|
||||
+ solarxr_device_set_feeder_devices(xsysd->static_roles.body, NULL, 0);
|
||||
+ u_system_devices_close(xsysd);
|
||||
+ free(xsysd);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
static xrt_result_t
|
||||
rift_s_open_system_impl(struct xrt_builder *xb,
|
||||
cJSON *config,
|
||||
@@ -200,6 +214,18 @@ rift_s_open_system_impl(struct xrt_builder *xb,
|
||||
}
|
||||
#endif
|
||||
|
||||
+#ifdef XRT_BUILD_DRIVER_SOLARXR
|
||||
+ const uint32_t count =
|
||||
+ solarxr_device_create_xdevs((hmd_xdev != NULL) ? hmd_xdev->tracking_origin : NULL,
|
||||
+ &xsysd->xdevs[xsysd->xdev_count], ARRAY_SIZE(xsysd->xdevs) - xsysd->xdev_count);
|
||||
+ if (count != 0) {
|
||||
+ xsysd->static_roles.body = xsysd->xdevs[xsysd->xdev_count];
|
||||
+ solarxr_device_set_feeder_devices(xsysd->static_roles.body, xsysd->xdevs, xsysd->xdev_count);
|
||||
+ xsysd->destroy = destroy_system_devices_solarxr;
|
||||
+ }
|
||||
+ xsysd->xdev_count += count;
|
||||
+#endif
|
||||
+
|
||||
// Assign to role(s).
|
||||
ubrh->head = hmd_xdev;
|
||||
ubrh->left = left_xdev;
|
||||
diff --git a/src/xrt/targets/common/target_builder_steamvr.c b/src/xrt/targets/common/target_builder_steamvr.c
|
||||
index 7b70e6b7c7..0267bb900d 100644
|
||||
--- a/src/xrt/targets/common/target_builder_steamvr.c
|
||||
+++ b/src/xrt/targets/common/target_builder_steamvr.c
|
||||
@@ -34,6 +34,10 @@
|
||||
#include "xrt/xrt_space.h"
|
||||
#include "util/u_space_overseer.h"
|
||||
|
||||
+#ifdef XRT_BUILD_DRIVER_SOLARXR
|
||||
+#include "solarxr/solarxr_interface.h"
|
||||
+#endif
|
||||
+
|
||||
#ifndef XRT_BUILD_DRIVER_STEAMVR_LIGHTHOUSE
|
||||
#error "This builder requires the SteamVR Lighthouse driver"
|
||||
#endif
|
||||
@@ -115,6 +119,17 @@ steamvr_destroy(struct xrt_builder *xb)
|
||||
free(svrb);
|
||||
}
|
||||
|
||||
+#ifdef XRT_BUILD_DRIVER_SOLARXR
|
||||
+static void
|
||||
+destroy_system_devices_solarxr(struct xrt_system_devices *xsysd)
|
||||
+{
|
||||
+ void _Z7destroyP18xrt_system_devices(struct xrt_system_devices * xsysd);
|
||||
+
|
||||
+ solarxr_device_set_feeder_devices(xsysd->static_roles.body, NULL, 0);
|
||||
+ _Z7destroyP18xrt_system_devices(xsysd);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
static xrt_result_t
|
||||
steamvr_open_system(struct xrt_builder *xb,
|
||||
cJSON *config,
|
||||
@@ -151,6 +166,18 @@ steamvr_open_system(struct xrt_builder *xb,
|
||||
svrb->right_ht = u_system_devices_get_ht_device_right(xsysd);
|
||||
xsysd->static_roles.hand_tracking.right = svrb->right_ht;
|
||||
|
||||
+#ifdef XRT_BUILD_DRIVER_SOLARXR
|
||||
+ const uint32_t count =
|
||||
+ solarxr_device_create_xdevs(xsysd->static_roles.head->tracking_origin, &xsysd->xdevs[xsysd->xdev_count],
|
||||
+ ARRAY_SIZE(xsysd->xdevs) - xsysd->xdev_count);
|
||||
+ if (count != 0) {
|
||||
+ xsysd->static_roles.body = xsysd->xdevs[xsysd->xdev_count];
|
||||
+ solarxr_device_set_feeder_devices(xsysd->static_roles.body, xsysd->xdevs, xsysd->xdev_count);
|
||||
+ xsysd->destroy = destroy_system_devices_solarxr;
|
||||
+ }
|
||||
+ xsysd->xdev_count += count;
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* Space overseer.
|
||||
*/
|
||||
diff --git a/src/xrt/targets/common/target_builder_wmr.c b/src/xrt/targets/common/target_builder_wmr.c
|
||||
index 40df6b6535..d543c441c2 100644
|
||||
--- a/src/xrt/targets/common/target_builder_wmr.c
|
||||
+++ b/src/xrt/targets/common/target_builder_wmr.c
|
||||
@@ -26,6 +26,10 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
+#ifdef XRT_BUILD_DRIVER_SOLARXR
|
||||
+#include "solarxr/solarxr_interface.h"
|
||||
+#endif
|
||||
+
|
||||
#ifndef XRT_BUILD_DRIVER_WMR
|
||||
#error "Must only be built with XRT_BUILD_DRIVER_WMR set"
|
||||
#endif
|
||||
@@ -175,6 +179,16 @@ wmr_estimate_system(struct xrt_builder *xb,
|
||||
return XRT_SUCCESS;
|
||||
}
|
||||
|
||||
+#ifdef XRT_BUILD_DRIVER_SOLARXR
|
||||
+static void
|
||||
+destroy_system_devices_solarxr(struct xrt_system_devices *xsysd)
|
||||
+{
|
||||
+ solarxr_device_set_feeder_devices(xsysd->static_roles.body, NULL, 0);
|
||||
+ u_system_devices_close(xsysd);
|
||||
+ free(xsysd);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
static xrt_result_t
|
||||
wmr_open_system_impl(struct xrt_builder *xb,
|
||||
cJSON *config,
|
||||
@@ -295,6 +309,17 @@ wmr_open_system_impl(struct xrt_builder *xb,
|
||||
right = ht_right;
|
||||
}
|
||||
|
||||
+#ifdef XRT_BUILD_DRIVER_SOLARXR
|
||||
+ const uint32_t count = solarxr_device_create_xdevs(head->tracking_origin, &xsysd->xdevs[xsysd->xdev_count],
|
||||
+ ARRAY_SIZE(xsysd->xdevs) - xsysd->xdev_count);
|
||||
+ if (count != 0) {
|
||||
+ xsysd->static_roles.body = xsysd->xdevs[xsysd->xdev_count];
|
||||
+ solarxr_device_set_feeder_devices(xsysd->static_roles.body, xsysd->xdevs, xsysd->xdev_count);
|
||||
+ xsysd->destroy = destroy_system_devices_solarxr;
|
||||
+ }
|
||||
+ xsysd->xdev_count += count;
|
||||
+#endif
|
||||
+
|
||||
|
||||
// Assign to role(s).
|
||||
ubrh->head = head;
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -16,6 +16,7 @@ set(XRT_BUILD_DRIVER_RIFT_S OFF)
|
||||
set(XRT_BUILD_DRIVER_ROKID OFF)
|
||||
set(XRT_BUILD_DRIVER_SIMULATED OFF)
|
||||
set(XRT_BUILD_DRIVER_STEAMVR_LIGHTHOUSE ${WIVRN_FEATURE_STEAMVR_LIGHTHOUSE})
|
||||
set(XRT_BUILD_DRIVER_SOLARXR ${WIVRN_FEATURE_SOLARXR})
|
||||
set(XRT_BUILD_DRIVER_TWRAP OFF)
|
||||
set(XRT_BUILD_DRIVER_VF OFF)
|
||||
set(XRT_BUILD_DRIVER_VIVE OFF)
|
||||
|
||||
@@ -140,6 +140,12 @@ configuration configuration::read_user_configuration()
|
||||
}
|
||||
}
|
||||
|
||||
if (auto it = json.find("debug-gui"); it != json.end())
|
||||
result.debug_gui = *it;
|
||||
|
||||
if (auto it = json.find("use-steamvr-lh"); it != json.end())
|
||||
result.use_steamvr_lh = *it;
|
||||
|
||||
if (auto it = json.find("tcp-only"); it != json.end())
|
||||
result.tcp_only = *it;
|
||||
else if (auto it = json.find("tcp_only"); it != json.end())
|
||||
|
||||
@@ -59,6 +59,8 @@ struct configuration
|
||||
std::optional<std::array<double, 2>> scale;
|
||||
std::optional<std::array<float, 3>> grip_surface;
|
||||
std::vector<std::string> application;
|
||||
bool debug_gui = false;
|
||||
bool use_steamvr_lh = false;
|
||||
bool tcp_only = false;
|
||||
service_publication publication = service_publication::avahi;
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "wivrn_session.h"
|
||||
|
||||
#include "util/u_logging.h"
|
||||
#include "utils/method.h"
|
||||
#include "xrt/xrt_defines.h"
|
||||
#include "xrt/xrt_device.h"
|
||||
#include "xrt/xrt_results.h"
|
||||
@@ -36,36 +37,21 @@
|
||||
namespace wivrn
|
||||
{
|
||||
|
||||
static void wivrn_fb_face2_tracker_destroy(xrt_device * xdev);
|
||||
|
||||
static xrt_result_t wivrn_fb_face2_tracker_update_inputs(xrt_device * xdev)
|
||||
{
|
||||
static_cast<wivrn_fb_face2_tracker *>(xdev)->update_inputs();
|
||||
return XRT_SUCCESS;
|
||||
}
|
||||
|
||||
static xrt_result_t wivrn_fb_face2_tracker_get_face_tracking(struct xrt_device * xdev,
|
||||
enum xrt_input_name facial_expression_type,
|
||||
int64_t at_timestamp_ns,
|
||||
struct xrt_facial_expression_set * out_value);
|
||||
|
||||
wivrn_fb_face2_tracker::wivrn_fb_face2_tracker(xrt_device * hmd,
|
||||
wivrn::wivrn_session & cnx) :
|
||||
xrt_device{}, cnx(cnx)
|
||||
xrt_device{
|
||||
.name = XRT_DEVICE_FB_FACE_TRACKING2,
|
||||
.device_type = XRT_DEVICE_TYPE_FACE_TRACKER,
|
||||
.str = "WiVRn FB v2 Face Tracker",
|
||||
.serial = "WiVRn FB v2 Face Tracker",
|
||||
.tracking_origin = hmd->tracking_origin,
|
||||
.face_tracking_supported = true,
|
||||
.update_inputs = method_pointer<&wivrn_fb_face2_tracker::update_inputs>,
|
||||
.get_face_tracking = method_pointer<&wivrn_fb_face2_tracker::get_face_tracking>,
|
||||
.destroy = [](xrt_device *) {},
|
||||
},
|
||||
cnx(cnx)
|
||||
{
|
||||
xrt_device * base = this;
|
||||
base->tracking_origin = hmd->tracking_origin;
|
||||
base->get_face_tracking = wivrn_fb_face2_tracker_get_face_tracking;
|
||||
base->update_inputs = wivrn_fb_face2_tracker_update_inputs;
|
||||
base->destroy = wivrn_fb_face2_tracker_destroy;
|
||||
name = XRT_DEVICE_FB_FACE_TRACKING2;
|
||||
device_type = XRT_DEVICE_TYPE_FACE_TRACKER;
|
||||
face_tracking_supported = true;
|
||||
|
||||
// Print name.
|
||||
strcpy(str, "WiVRn FB v2 Face Tracker");
|
||||
strcpy(serial, "WiVRn FB v2 Face Tracker");
|
||||
|
||||
// Setup input.
|
||||
face_input.name = XRT_INPUT_FB_FACE_TRACKING2_VISUAL;
|
||||
face_input.active = true;
|
||||
@@ -73,22 +59,22 @@ wivrn_fb_face2_tracker::wivrn_fb_face2_tracker(xrt_device * hmd,
|
||||
input_count = 1;
|
||||
}
|
||||
|
||||
void wivrn_fb_face2_tracker::update_inputs()
|
||||
xrt_result_t wivrn_fb_face2_tracker::update_inputs()
|
||||
{
|
||||
// Empty
|
||||
return XRT_SUCCESS;
|
||||
}
|
||||
|
||||
void wivrn_fb_face2_tracker::update_tracking(const from_headset::tracking & tracking, const clock_offset & offset)
|
||||
{
|
||||
if (not(tracking.face and tracking.face->is_valid))
|
||||
auto * face = std::get_if<from_headset::tracking::fb_face2>(&tracking.face);
|
||||
if (not(face and face->is_valid))
|
||||
return;
|
||||
const auto & face = *tracking.face;
|
||||
|
||||
wivrn_fb_face2_data data{
|
||||
.weights = face.weights,
|
||||
.confidences = face.confidences,
|
||||
.is_valid = face.is_valid,
|
||||
.is_eye_following_blendshapes_valid = face.is_eye_following_blendshapes_valid,
|
||||
.weights = face->weights,
|
||||
.confidences = face->confidences,
|
||||
.is_valid = face->is_valid,
|
||||
.is_eye_following_blendshapes_valid = face->is_eye_following_blendshapes_valid,
|
||||
};
|
||||
|
||||
if (not face_list.update_tracking(tracking.production_timestamp, tracking.timestamp, data, offset))
|
||||
@@ -119,22 +105,4 @@ xrt_result_t wivrn_fb_face2_tracker::get_face_tracking(enum xrt_input_name facia
|
||||
|
||||
return XRT_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
* Functions
|
||||
*
|
||||
*/
|
||||
|
||||
static void wivrn_fb_face2_tracker_destroy(xrt_device * xdev)
|
||||
{
|
||||
}
|
||||
|
||||
static xrt_result_t wivrn_fb_face2_tracker_get_face_tracking(struct xrt_device * xdev,
|
||||
enum xrt_input_name facial_expression_type,
|
||||
int64_t at_timestamp_ns,
|
||||
struct xrt_facial_expression_set * inout_value)
|
||||
{
|
||||
return static_cast<wivrn_fb_face2_tracker *>(xdev)->get_face_tracking(facial_expression_type, at_timestamp_ns, inout_value);
|
||||
}
|
||||
} // namespace wivrn
|
||||
|
||||
@@ -92,9 +92,10 @@ class wivrn_fb_face2_tracker : public xrt_device
|
||||
wivrn::wivrn_session & cnx;
|
||||
|
||||
public:
|
||||
using base = xrt_device;
|
||||
wivrn_fb_face2_tracker(xrt_device * hmd, wivrn::wivrn_session & cnx);
|
||||
|
||||
void update_inputs();
|
||||
xrt_result_t update_inputs();
|
||||
void update_tracking(const from_headset::tracking &, const clock_offset &);
|
||||
xrt_result_t get_face_tracking(enum xrt_input_name facial_expression_type, int64_t at_timestamp_ns, struct xrt_facial_expression_set * out_value);
|
||||
};
|
||||
|
||||
@@ -42,13 +42,6 @@ class wivrn_hmd : public xrt_device
|
||||
.name = XRT_INPUT_GENERIC_HEAD_POSE,
|
||||
};
|
||||
xrt_hmd_parts hmd_parts{};
|
||||
xrt_tracking_origin tracking_origin{
|
||||
.name = "WiVRn origin",
|
||||
.type = XRT_TRACKING_TYPE_OTHER,
|
||||
.initial_offset = {
|
||||
.orientation = {0, 0, 0, 1},
|
||||
},
|
||||
};
|
||||
|
||||
view_list views;
|
||||
std::array<to_headset::foveation_parameter, 2> foveation_parameters{};
|
||||
@@ -64,6 +57,15 @@ class wivrn_hmd : public xrt_device
|
||||
|
||||
public:
|
||||
using base = xrt_device;
|
||||
|
||||
xrt_tracking_origin tracking_origin{
|
||||
.name = "WiVRn origin",
|
||||
.type = XRT_TRACKING_TYPE_OTHER,
|
||||
.initial_offset = {
|
||||
.orientation = {0, 0, 0, 1},
|
||||
},
|
||||
};
|
||||
|
||||
wivrn_hmd(wivrn::wivrn_session * cnx,
|
||||
const from_headset::headset_info_packet & info);
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "wivrn_session.h"
|
||||
|
||||
#include "util/u_logging.h"
|
||||
#include "utils/method.h"
|
||||
#include "xrt/xrt_defines.h"
|
||||
#include "xrt/xrt_device.h"
|
||||
#include "xrt/xrt_results.h"
|
||||
@@ -36,36 +37,21 @@
|
||||
namespace wivrn
|
||||
{
|
||||
|
||||
static void wivrn_htc_face_tracker_destroy(xrt_device * xdev);
|
||||
|
||||
static xrt_result_t wivrn_htc_face_tracker_update_inputs(xrt_device * xdev)
|
||||
{
|
||||
static_cast<wivrn_htc_face_tracker *>(xdev)->update_inputs();
|
||||
return XRT_SUCCESS;
|
||||
}
|
||||
|
||||
static xrt_result_t wivrn_htc_face_tracker_get_face_tracking(struct xrt_device * xdev,
|
||||
enum xrt_input_name facial_expression_type,
|
||||
int64_t at_timestamp_ns,
|
||||
struct xrt_facial_expression_set * out_value);
|
||||
|
||||
wivrn_htc_face_tracker::wivrn_htc_face_tracker(xrt_device * hmd,
|
||||
wivrn::wivrn_session & cnx) :
|
||||
xrt_device{}, cnx(cnx)
|
||||
xrt_device{
|
||||
.name = XRT_DEVICE_HTC_FACE_TRACKING,
|
||||
.device_type = XRT_DEVICE_TYPE_FACE_TRACKER,
|
||||
.str = "WiVRn HTC Face Tracker",
|
||||
.serial = "WiVRn HTC Face Tracker",
|
||||
.tracking_origin = hmd->tracking_origin,
|
||||
.face_tracking_supported = true,
|
||||
.update_inputs = method_pointer<&wivrn_htc_face_tracker::update_inputs>,
|
||||
.get_face_tracking = method_pointer<&wivrn_htc_face_tracker::get_face_tracking>,
|
||||
.destroy = [](xrt_device *) {},
|
||||
},
|
||||
cnx(cnx)
|
||||
{
|
||||
xrt_device * base = this;
|
||||
base->tracking_origin = hmd->tracking_origin;
|
||||
base->get_face_tracking = wivrn_htc_face_tracker_get_face_tracking;
|
||||
base->update_inputs = wivrn_htc_face_tracker_update_inputs;
|
||||
base->destroy = wivrn_htc_face_tracker_destroy;
|
||||
name = XRT_DEVICE_HTC_FACE_TRACKING;
|
||||
device_type = XRT_DEVICE_TYPE_FACE_TRACKER;
|
||||
face_tracking_supported = true;
|
||||
|
||||
// Print name.
|
||||
strcpy(str, "WiVRn HTC Face Tracker");
|
||||
strcpy(serial, "WiVRn HTC Face Tracker");
|
||||
|
||||
// Setup input.
|
||||
inputs_array[0].name = XRT_INPUT_HTC_EYE_FACE_TRACKING;
|
||||
inputs_array[0].active = true;
|
||||
@@ -77,22 +63,22 @@ wivrn_htc_face_tracker::wivrn_htc_face_tracker(xrt_device * hmd,
|
||||
input_count = inputs_array.size();
|
||||
}
|
||||
|
||||
void wivrn_htc_face_tracker::update_inputs()
|
||||
xrt_result_t wivrn_htc_face_tracker::update_inputs()
|
||||
{
|
||||
// Empty
|
||||
return XRT_SUCCESS;
|
||||
}
|
||||
|
||||
void wivrn_htc_face_tracker::update_tracking(const from_headset::tracking & tracking, const clock_offset & offset)
|
||||
{
|
||||
if (not(tracking.face_htc))
|
||||
auto * face = std::get_if<from_headset::tracking::htc_face>(&tracking.face);
|
||||
if (not face)
|
||||
return;
|
||||
const auto & face = *tracking.face_htc;
|
||||
|
||||
wivrn_htc_face_data data{
|
||||
.eye = face.eye,
|
||||
.lip = face.lip,
|
||||
.eye_active = face.eye_active,
|
||||
.lip_active = face.lip_active};
|
||||
.eye = face->eye,
|
||||
.lip = face->lip,
|
||||
.eye_active = face->eye_active,
|
||||
.lip_active = face->lip_active};
|
||||
|
||||
if (not face_list.update_tracking(tracking.production_timestamp, tracking.timestamp, data, offset))
|
||||
cnx.set_enabled(to_headset::tracking_control::id::face, false);
|
||||
@@ -133,22 +119,4 @@ xrt_result_t wivrn_htc_face_tracker::get_face_tracking(enum xrt_input_name facia
|
||||
|
||||
return XRT_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
* Functions
|
||||
*
|
||||
*/
|
||||
|
||||
static void wivrn_htc_face_tracker_destroy(xrt_device * xdev)
|
||||
{
|
||||
}
|
||||
|
||||
static xrt_result_t wivrn_htc_face_tracker_get_face_tracking(struct xrt_device * xdev,
|
||||
enum xrt_input_name facial_expression_type,
|
||||
int64_t at_timestamp_ns,
|
||||
struct xrt_facial_expression_set * inout_value)
|
||||
{
|
||||
return static_cast<wivrn_htc_face_tracker *>(xdev)->get_face_tracking(facial_expression_type, at_timestamp_ns, inout_value);
|
||||
}
|
||||
} // namespace wivrn
|
||||
|
||||
@@ -105,9 +105,10 @@ class wivrn_htc_face_tracker : public xrt_device
|
||||
wivrn::wivrn_session & cnx;
|
||||
|
||||
public:
|
||||
using base = xrt_device;
|
||||
wivrn_htc_face_tracker(xrt_device * hmd, wivrn::wivrn_session & cnx);
|
||||
|
||||
void update_inputs();
|
||||
xrt_result_t update_inputs();
|
||||
void update_tracking(const from_headset::tracking &, const clock_offset &);
|
||||
xrt_result_t get_face_tracking(enum xrt_input_name facial_expression_type, int64_t at_timestamp_ns, struct xrt_facial_expression_set * out_value);
|
||||
};
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "wivrn_session.h"
|
||||
|
||||
#include "accept_connection.h"
|
||||
#include "configuration.h"
|
||||
#include "driver/app_pacer.h"
|
||||
#include "main/comp_compositor.h"
|
||||
#include "main/comp_main_interface.h"
|
||||
@@ -52,7 +53,7 @@
|
||||
#endif
|
||||
|
||||
#if WIVRN_FEATURE_SOLARXR
|
||||
#include "solarxr_device.h"
|
||||
#include "solarxr_interface.h"
|
||||
#endif
|
||||
|
||||
namespace wivrn
|
||||
@@ -169,7 +170,7 @@ wivrn::wivrn_session::wivrn_session(std::unique_ptr<wivrn_connection> connection
|
||||
static_roles.hand_tracking.right = xdevs[xdev_count++] = &right_hand;
|
||||
|
||||
#if WIVRN_FEATURE_STEAMVR_LIGHTHOUSE
|
||||
auto use_steamvr_lh = std::getenv("WIVRN_USE_STEAMVR_LH");
|
||||
auto use_steamvr_lh = configuration::read_user_configuration().use_steamvr_lh || std::getenv("WIVRN_USE_STEAMVR_LH");
|
||||
xrt_system_devices * lhdevs = NULL;
|
||||
|
||||
if (use_steamvr_lh && steamvr_lh_create_devices(&lhdevs) == XRT_SUCCESS)
|
||||
@@ -201,13 +202,15 @@ wivrn::wivrn_session::wivrn_session(std::unique_ptr<wivrn_connection> connection
|
||||
static_roles.eyes = eye_tracker.get();
|
||||
xdevs[xdev_count++] = eye_tracker.get();
|
||||
}
|
||||
if (get_info().face_tracking == wivrn::from_headset::face_type::fb2 || is_forced_extension("FB_face_tracking2"))
|
||||
|
||||
auto face = get_info().face_tracking;
|
||||
if (face == from_headset::face_type::fb2 || face == from_headset::face_type::pico || is_forced_extension("FB_face_tracking2"))
|
||||
{
|
||||
fb_face2_tracker = std::make_unique<wivrn_fb_face2_tracker>(&hmd, *this);
|
||||
static_roles.face = fb_face2_tracker.get();
|
||||
xdevs[xdev_count++] = fb_face2_tracker.get();
|
||||
}
|
||||
if (get_info().face_tracking == wivrn::from_headset::face_type::htc || is_forced_extension("HTC_facial_tracking"))
|
||||
if (face == wivrn::from_headset::face_type::htc || is_forced_extension("HTC_facial_tracking"))
|
||||
{
|
||||
htc_face_tracker = std::make_unique<wivrn_htc_face_tracker>(&hmd, *this);
|
||||
static_roles.face = htc_face_tracker.get();
|
||||
@@ -215,15 +218,13 @@ wivrn::wivrn_session::wivrn_session(std::unique_ptr<wivrn_connection> connection
|
||||
}
|
||||
|
||||
#if WIVRN_FEATURE_SOLARXR
|
||||
xrt_device * solar_devs[XRT_SYSTEM_MAX_DEVICES];
|
||||
uint32_t solar_devs_cap = XRT_SYSTEM_MAX_DEVICES - xdev_count;
|
||||
uint32_t num_devs = solarxr_device_create_xdevs(&hmd, solar_devs, XRT_SYSTEM_MAX_DEVICES - xdev_count);
|
||||
for (int i = 0; i < num_devs; i++)
|
||||
uint32_t num_devs = solarxr_device_create_xdevs(&hmd.tracking_origin, &xdevs[xdev_count], ARRAY_SIZE(xdevs) - xdev_count);
|
||||
if (num_devs != 0)
|
||||
{
|
||||
xdevs[xdev_count++] = solar_devs[i];
|
||||
if (i == 0)
|
||||
static_roles.body = solar_devs[i];
|
||||
static_roles.body = xdevs[xdev_count];
|
||||
solarxr_device_set_feeder_devices(static_roles.body, xdevs, xdev_count);
|
||||
}
|
||||
xdev_count += num_devs;
|
||||
#endif
|
||||
|
||||
if (roles.left >= 0)
|
||||
@@ -242,6 +243,10 @@ wivrn::wivrn_session::wivrn_session(std::unique_ptr<wivrn_connection> connection
|
||||
|
||||
wivrn_session::~wivrn_session()
|
||||
{
|
||||
#if WIVRN_FEATURE_SOLARXR
|
||||
solarxr_device_set_feeder_devices(static_roles.body, nullptr, 0);
|
||||
#endif
|
||||
|
||||
for (size_t i = 0; i < ARRAY_SIZE(xdevs); i++)
|
||||
{
|
||||
xrt_device_destroy(&xdevs[i]);
|
||||
|
||||
@@ -312,7 +312,7 @@ video_encoder_va::video_encoder_va(wivrn_vk_bundle & vk,
|
||||
auto & image = (i == 0 ? luma : chroma);
|
||||
image = vk.device.createImage(image_create_info.get());
|
||||
|
||||
auto [req, ded_req] = vk.device.getImageMemoryRequirements2<vk::MemoryRequirements2, vk::MemoryDedicatedRequirements>({.image = image});
|
||||
auto [req, ded_req] = vk.device.getImageMemoryRequirements2<vk::MemoryRequirements2, vk::MemoryDedicatedRequirements>({.image = *image});
|
||||
|
||||
const auto & object = desc->objects[desc->layers[i].planes[0].object_index];
|
||||
auto memory_props = vk.device.getMemoryFdPropertiesKHR(vk::ExternalMemoryHandleTypeFlagBits::eDmaBufEXT, object.fd);
|
||||
@@ -327,7 +327,7 @@ video_encoder_va::video_encoder_va(wivrn_vk_bundle & vk,
|
||||
.fd = dup(object.fd),
|
||||
},
|
||||
vk::MemoryDedicatedAllocateInfo{
|
||||
.image = image,
|
||||
.image = *image,
|
||||
},
|
||||
};
|
||||
if (not(ded_req.prefersDedicatedAllocation or ded_req.requiresDedicatedAllocation))
|
||||
|
||||
@@ -310,6 +310,8 @@ video_encoder_nvenc::~video_encoder_nvenc()
|
||||
{
|
||||
if (session_handle)
|
||||
fn.nvEncDestroyEncoder(session_handle);
|
||||
if (cuda)
|
||||
cuda_fn->cuCtxDestroy(cuda);
|
||||
}
|
||||
|
||||
std::pair<bool, vk::Semaphore> video_encoder_nvenc::present_image(vk::Image y_cbcr, vk::raii::CommandBuffer & cmd_buf, uint8_t slot, uint64_t)
|
||||
|
||||
+15
-6
@@ -49,6 +49,7 @@
|
||||
#include <glib.h>
|
||||
#include <libnotify/notify.h>
|
||||
|
||||
#include <server/ipc_server_interface.h>
|
||||
#include <shared/ipc_protocol.h>
|
||||
#include <util/u_file.h>
|
||||
|
||||
@@ -57,9 +58,6 @@ U_TRACE_TARGET_SETUP(U_TRACE_WHICH_SERVICE)
|
||||
|
||||
extern "C"
|
||||
{
|
||||
int
|
||||
ipc_server_main(int argc, char * argv[]);
|
||||
|
||||
int listen_socket = -1;
|
||||
}
|
||||
|
||||
@@ -267,7 +265,7 @@ void start_app()
|
||||
}
|
||||
}
|
||||
|
||||
void start_server()
|
||||
void start_server(configuration config)
|
||||
{
|
||||
server_pid = do_fork ? fork() : 0;
|
||||
|
||||
@@ -298,9 +296,20 @@ void start_server()
|
||||
|
||||
setenv("AMD_DEBUG", "lowlatencyenc", false);
|
||||
|
||||
ipc_server_main_info server_info{
|
||||
.udgci = {
|
||||
.window_title = "WiVRn",
|
||||
#if WIVRN_FEATURE_DEBUG_GUI
|
||||
.open = config.debug_gui ? U_DEBUG_GUI_OPEN_ALWAYS : U_DEBUG_GUI_OPEN_AUTO,
|
||||
#else
|
||||
.open = U_DEBUG_GUI_OPEN_NEVER,
|
||||
#endif
|
||||
},
|
||||
};
|
||||
|
||||
try
|
||||
{
|
||||
exit(ipc_server_main(0, 0 /*argc, argv*/));
|
||||
exit(ipc_server_main(0, 0, &server_info /*argc, argv, ismi*/));
|
||||
}
|
||||
catch (std::exception & e)
|
||||
{
|
||||
@@ -472,7 +481,7 @@ gboolean headset_connected_success(void *)
|
||||
|
||||
expose_known_keys_on_dbus();
|
||||
|
||||
start_server();
|
||||
start_server(configuration::read_user_configuration());
|
||||
start_app();
|
||||
|
||||
delay_next_try = default_delay_next_try;
|
||||
|
||||
@@ -51,7 +51,7 @@ def main():
|
||||
tree = ET.parse(args.metainfo)
|
||||
|
||||
if args.nightly:
|
||||
version = subprocess.check_output(["git", "describe", "--tags"]).decode().strip()
|
||||
version = subprocess.check_output(["git", "describe", "--tags", "--always"]).decode().strip()
|
||||
version = version[1:] # remove the initial "v"
|
||||
write_entry(
|
||||
out=args.out,
|
||||
|
||||
@@ -58,7 +58,7 @@ if __name__ == "__main__":
|
||||
json.dump(gen_src, f, indent=4, sort_keys=False)
|
||||
|
||||
|
||||
monado_commit = cmake.get("monado", "GIT_TAG")
|
||||
monado_commit = open(os.path.join(root, "monado-rev")).read()
|
||||
boostpfr_url = cmake.get("boostpfr", "URL")
|
||||
boostpfr_sha256 = cmake.get("boostpfr", "URL_HASH").split("=")[-1]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user