Compare commits

...
Author SHA1 Message Date
Just some guy de7b1aba11 2025-05-26 23:30:52 +00:00
Vindicus999 adcf159916 Update ray.png 2025-05-26 18:36:33 -04:00
Just some guy 7f60c4e179 2025-05-26 21:46:30 +00:00
Vindicus999 b630771522 Update Sync.yml 2025-05-26 17:43:59 -04:00
Vindicus999 07dfd529db Merge branch 'master' of https://github.com/Vindicus999/WiVRn 2025-05-26 17:31:37 -04:00
Vindicus999 fb3592244a Update APK-Release.yml 2025-05-26 17:31:36 -04:00
Vindicus999 c84cc9cc2c Update Sync.yml 2025-05-26 17:30:45 -04:00
Vindicus999 e8b0312835 Merge remote-tracking branch 'upstream/master' 2025-05-26 11:27:56 +00:00
Vindicus999 9ea224b049 Merge remote-tracking branch 'upstream/master' 2025-05-22 17:37:44 +00:00
Vindicus999 b53261d981 Merge remote-tracking branch 'upstream/master' 2025-05-21 23:31:22 +00:00
Vindicus999 b5fc4ce293 Merge remote-tracking branch 'upstream/master' 2025-05-21 17:37:23 +00:00
Vindicus999 917032b254 Merge remote-tracking branch 'upstream/master' 2025-05-21 11:28:55 +00:00
Vindicus999 03b121fa55 Merge remote-tracking branch 'upstream/master' 2025-05-20 23:31:01 +00:00
Vindicus999 a68a068898 Merge remote-tracking branch 'upstream/master' 2025-05-19 03:19:05 +00:00
Vindicus999 4125cad44e Add a last improvement 2025-05-16 18:39:23 -04:00
Vindicus999 22bda91950 Update APK-Release.yml 2025-05-16 18:36:57 -04:00
Vindicus999 6969e5f972 Update patches 2025-05-16 18:29:29 -04:00
Vindicus999 835f19a923 Update Sync.yml 2025-05-16 18:11:13 -04:00
Vindicus999 315444758c Update APK-Release.yml 2025-05-16 18:09:10 -04:00
Vindicus999 969513ec79 Update APK-Release.yml 2025-05-16 18:08:42 -04:00
Vindicus999 167986474f Update APK-Release.yml 2025-05-16 07:23:38 -04:00
Vindicus999 45cc514130 Update APK-Release.yml 2025-05-16 00:05:26 -04:00
Vindicus999 0082d365c0 Update APK-Release.yml 2025-05-15 23:35:47 -04:00
Vindicus999 cd800cc665 Update APK-Release.yml 2025-05-15 23:14:37 -04:00
Vindicus999 e40bcd8402 Update APK-Release.yml 2025-05-15 23:12:00 -04:00
Vindicus999 d0250abbc9 Update CMakeLists.txt 2025-05-15 23:00:09 -04:00
Vindicus999 fa0ad7eda9 Update APK-Release.yml 2025-05-15 22:50:38 -04:00
Vindicus999 4a053aa019 Update APK-Release.yml 2025-05-15 22:40:09 -04:00
Vindicus999 af6c55a269 Update APK-Release.yml 2025-05-15 22:39:15 -04:00
Vindicus999 89f98049b1 Update APK-Release.yml 2025-05-15 22:36:55 -04:00
Vindicus999 8dc07d7ea8 Update APK-Release.yml 2025-05-15 22:34:17 -04:00
Vindicus999 78a125d1cd Create pull.yml 2025-05-15 22:33:03 -04:00
Tool Man 7485cd0880 Adding solarxr patches
Remove potential statistics
2025-05-15 22:20:37 -04:00
Tool Man 76630efc1d Create pull.yml 2025-05-15 22:20:14 -04:00
15 changed files with 2954 additions and 660 deletions
+6
View File
@@ -0,0 +1,6 @@
version: "1"
rules:
- base: master
upstream: WiVRn:master
mergeMethod: hardreset
+22 -8
View File
@@ -22,9 +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
- name: set up JDK
uses: actions/setup-java@v4
@@ -68,7 +73,9 @@ jobs:
- name: Prepare before archiving artifacts
run: |
mkdir apk
ls build/outputs/apk/
mv $(find build/outputs/apk/ -name "*.apk") apk/
ls apk/
mkdir debug
mv build/intermediates/merged_native_libs/*/*/out/lib/* debug/
find debug -name libopenxr_loader.so -delete
@@ -102,13 +109,15 @@ jobs:
pattern: 'apk-*'
merge-multiple: true
- name: Rename APK artifacts
run: |
cd apk
for f in *.apk; do
BASENAME=`echo ${f}|awk -F '-APK-' '{print $2}'`
mv "${f}" "org.meumeu.wivrn-${BASENAME}"
done
# - name: Rename APK artifacts
# run: |
# cd apk
# ls
# for f in *.apk; do
# BASENAME=`echo ${f}|awk -F '-APK-' '{print $2}'`
# mv "${f}" "org.meumeu.wivrn-${BASENAME}"
# done
# ls
- name: Download APK debug artifacts
uses: actions/download-artifact@v4
@@ -122,6 +131,11 @@ jobs:
cd symbols
zip -r ../debug-symbols.zip .
- name: How the hell doesnt it work
run: |
ls apk
ls
- name: APK Release
uses: softprops/action-gh-release@v2
with:
+34
View File
@@ -0,0 +1,34 @@
name: Sync Upstream
env:
UPSTREAM_URL: "https://github.com/wivrn/wivrn.git"
WORKFLOW_TOKEN: ${{ secrets.DOWNSTREAM_GITHUB_TOKEN }}
UPSTREAM_BRANCH: "master"
on:
schedule:
- cron: '0 5/6 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: GitHub Sync to Upstream Repository
uses: dabreadman/sync-upstream-repo@v1.3.0
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 }}
+1 -1
View File
@@ -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)
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 581 B

After

Width:  |  Height:  |  Size: 306 B

+3 -13
View File
@@ -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()
+12 -1
View File
@@ -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");
+3
View File
@@ -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()
+4
View File
@@ -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

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
+1
View File
@@ -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)
+9 -7
View File
@@ -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);
+10 -8
View File
@@ -53,7 +53,7 @@
#endif
#if WIVRN_FEATURE_SOLARXR
#include "solarxr_device.h"
#include "solarxr_interface.h"
#endif
namespace wivrn
@@ -216,15 +216,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)
@@ -243,6 +241,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]);