Commit graph

1811 commits

Author SHA1 Message Date
Jakob Bornecrantz 40c764a290 os/ble: Large refactor of code 2020-10-05 14:19:52 +01:00
Jakob Bornecrantz 5af976a510 os/ble: Add os_ble_broadcast_write_value function 2020-10-05 14:19:52 +01:00
Jakob Bornecrantz 5b4d45ffcc os/ble: Correct documentation on os_ble_notify_open function 2020-10-05 14:19:52 +01:00
Jakob Bornecrantz 33879da21a xrt: Add XRT_HAVE_DBUS 2020-10-05 14:19:52 +01:00
Christoph Haag a0dd182dae build/ctl: Explicitly depend on generated ipc client header
Including a header in the build target is the documented solution for depending on
the generation of files via custom targets.

Fixes build on alpine linux.
2020-10-04 23:44:16 +02:00
Jakob Bornecrantz 02b33c668b st/oxr: Destroy client compositor when session is destroyed
Fixes #99
2020-10-04 13:04:57 +01:00
Jakob Bornecrantz 9dd8bfef28 st/oxr: Use xrt_comp_native_destroy helper 2020-10-04 13:04:55 +01:00
Jakob Bornecrantz 3729f2e8c9 ipc: Free client side compositor 2020-10-04 13:04:53 +01:00
Jakob Bornecrantz 309037a445 c/client: The client compositors doesn't own the native compositor 2020-10-04 13:04:52 +01:00
Jakob Bornecrantz 6ec6c2eac9 d/dummy: Make view rotate slightly with time 2020-10-01 23:49:12 +01:00
Jakob Bornecrantz 9f39410b64 d/dummy: Make the view move slightly with time 2020-10-01 15:50:51 +01:00
Jakob Bornecrantz 9a675cc7f3 xrt: Rename xrt_uv_triplet 2020-09-30 15:35:57 +01:00
Christoph Haag bb56e5f3c5 d/openhmd: Make struct oh_device private and refactor 2020-09-30 02:08:03 +02:00
Christoph Haag f6c3998d29 xrt: Use struct vive_values for u_compute_distortion_vive 2020-09-30 02:05:05 +02:00
Christoph Haag 29188d681c xrt: Remove all but mesh distortion values from xrt_hmd_parts::distortion
Move vive values to struct u_vive_values in u_distortion_mesh.
Move openhmd values to private struct inside ohmd driver.
2020-09-30 02:05:05 +02:00
Christoph Haag c5209c5ed4 comp: Move mesh generation to comp_renderer init
Use none shader when XRT_DISTORTION_MODEL_NONE is set.
Fall back to none distortion if mesh generation fails or unsupported
distortion model is set.

comp_render init updates comp_settings::distortion_model.

u_compute_distortion_mesh: Don't touch xdev::distortion::preferred,
just add XRT_DISTORTION_MODEL_MESHUV mesh to xdev::distortion::models.
2020-09-30 02:05:05 +02:00
Christoph Haag f82f247c19 comp: Rename distortion.vert to none.vert
After removing the other shaders, it is only used for no distortion anymore.
2020-09-30 02:05:05 +02:00
Christoph Haag bc7a948975 comp: More replacing of binding indices with variables 2020-09-30 02:05:05 +02:00
Christoph Haag 2e7451ca5e comp: Support only mesh and no istortion, remove pano and vive shaders
Also changes hardcoded binding indices into variables to make following the code easier
e.g. when adding new UBOs.
2020-09-30 02:05:04 +02:00
Christoph Haag 80f6fc9039 comp: Replace hardcoded binding indices with variables
Makes it easier to follow when changing code.
2020-09-30 01:30:30 +02:00
Christoph Haag fd883e26bf d/openhmd: Fix distortion_k value ordering
Their order is opposite to the psvr panotools values.
2020-09-30 01:30:30 +02:00
Christoph Haag fb71c71a8c xrt: Replace mesh generator with xdev->compute_distortion()
Each HMD driver now has to implement compute_distortion() which will be called
by the compositor implementation to generate a mesh (usually).

u_distortion_mesh contains implementations for the defaults (panotools, OpenHMD, vive).

Also adds compute_distortion function for Vive distortion

There are differences between OpenHMD and Panotools values, main differences for now:
* psvr has 5 pano coefficients, ohmd has 3
* psvr uses viewport size and lens center in pixels for distortion calculation, ohmd in meter
* psvr uses different distortion scaling than ohmd
2020-09-28 17:04:15 +01:00
Jakob Bornecrantz 2aaa3acfdf st/oxr: Do not destroy native compositor in sub-classed session creation functions
So it's owned by the instance.
2020-09-24 19:07:01 +01:00
Jakob Bornecrantz 6961bf885f st/oxr: Don't create a new native compositor in android session
Spotted by Jarvis.
2020-09-24 19:06:51 +01:00
Christoph Haag ee8fdb45fd d/ns: remove useless assignments 2020-09-22 02:19:13 +02:00
Christoph Haag e5683d4fde comp: remove useless pano ubo from mesh distortion
It was left in as a debug measure, but is more confusing than useful,
especially with northstar directly generating a mesh and vive with its own shader.
2020-09-22 02:19:13 +02:00
Christoph Haag 3c0ae7e61e d/dummy: reduce dummy HMD resolution to 720p 2020-09-21 20:37:28 +02:00
Christoph Haag 31539c800e d/ohmd: Add (OpenHMD) suffix to openhmd driver string 2020-09-21 20:37:28 +02:00
Christoph Haag 3d0235a450 st/prober: Fix build with v4l2 disabled 2020-09-21 20:21:56 +02:00
Jakob Bornecrantz 9ebf1c4d4d st/oxr: Fix warning 2020-09-18 20:51:31 +01:00
Ryan Pavlik 6af00ed8db u/file: Stub out Linux path manip code. 2020-09-18 18:27:46 +01:00
Ryan Pavlik 6ad46cb1b2 build: Be able to build against pthreads4w 2020-09-18 18:25:27 +01:00
Ryan Pavlik 7e600dd244 build: Adjust/fix missing dependencies 2020-09-18 18:25:27 +01:00
Ryan Pavlik 6779b1c0f8 st/p: Fix include of libusb 2020-09-18 18:25:27 +01:00
Ryan Pavlik b71f13c582 st/p: Tighten preprocessor conditionals for non-Linux 2020-09-18 18:25:15 +01:00
Milan Jaros 3f4bcb412e u/threading: Cast result of realloc. 2020-09-18 17:15:33 +01:00
Ryan Pavlik 695a2c1151 u/debug: Silence warnings on MSVC 2020-09-18 17:15:33 +01:00
Ryan Pavlik f7a132e635 u/time: Fix overflow. 2020-09-18 17:15:33 +01:00
Ryan Pavlik 1dffe58952 u/json: Silence warnings on MSVC 2020-09-18 17:15:33 +01:00
Milan Jaros 7685f49adb os/threading: Fix includes on Windows 2020-09-18 17:15:33 +01:00
Milan Jaros 367c01f354 os/time: Provide time functions for Windows 2020-09-18 17:15:33 +01:00
Ryan Pavlik 7c47293c52 os/time: Implement os_nanosleep for Windows 2020-09-18 13:56:34 +01:00
Ryan Pavlik dae3ab3a4f xrt: Be sure to include config headers 2020-09-18 13:56:24 +01:00
Ryan Pavlik a0c8839a71 xrt: Remove un-needed includes of unistd 2020-09-18 13:56:16 +01:00
Ryan Pavlik 54f6aa2166 inc/xrt: Some MSVC and Windows support 2020-09-18 13:56:11 +01:00
Ryan Pavlik 3ff56f4a3c inc/xrt: Add Windows implementations of atomic intrinsics. 2020-09-18 13:56:05 +01:00
Jakob Bornecrantz c411caf0cd st/oxr: Fix return length from oxr_action_get_input_source_localized_name 2020-09-17 23:04:37 +01:00
Jakob Bornecrantz 4a62e88f09 st/oxr: Return identifier name for bindings 2020-09-17 23:04:37 +01:00
Jakob Bornecrantz b6786f5bfc st/oxr: Return controller name for bindings 2020-09-17 15:28:59 +01:00
Jakob Bornecrantz 33713c790c st/oxr: Correctly return sub path for input source 2020-09-17 00:26:12 +01:00
Jakob Bornecrantz 0fc4cdcd0f st/gui: Get the number of samples in a fifo for graph 2020-09-16 17:27:16 +01:00
Jakob Bornecrantz 6a94b1cf80 m/ff: Improve interface 2020-09-16 17:27:16 +01:00
Bart Ribbers 71f912ffc5 Fix compilation on Musl
Without this fix, compilation failed on Musl due to ssize_t being an
unknown type

In file included from ../src/xrt/state_trackers/prober/p_prober.c:15:
../src/xrt/state_trackers/prober/p_prober.h:67:2: error: unknown type name 'ssize_t'
   67 |  ssize_t interface;
      |  ^~~~~~~
2020-09-16 10:44:06 +02:00
Jakob Bornecrantz b624d290d0 m/3dof: Add filter fifos to variable tracking code 2020-09-15 16:41:07 +00:00
Jakob Bornecrantz f7ff6c08ed st/gui: Plot vec3_f32 filter fifos 2020-09-15 16:41:07 +00:00
Jakob Bornecrantz 468f72d62f st/gui: Include ImPlot and Monado-ImGui in gui_imgui header 2020-09-15 16:41:07 +00:00
Jakob Bornecrantz 82ea385c6d imgui: Add igToggleButton function 2020-09-15 16:41:07 +00:00
Jakob Bornecrantz f843c59c37 imgui: Add ImPlot 2020-09-15 16:41:07 +00:00
Jakob Bornecrantz 36ea1825bf imgui: Update to 1.78 2020-09-15 16:41:07 +00:00
Jakob Bornecrantz 3ffa40c628 u/var: Refactor how variables info is passed 2020-09-15 16:41:07 +00:00
Jakob Bornecrantz d5c62f8ccb u/var: Add tracking for filter fifos 2020-09-15 16:41:07 +00:00
Christoph Haag 17ff908041 d/ns: Set XRT_SPACE_RELATION_ORIENTATION_TRACKED_BIT 2020-09-14 16:57:10 +02:00
Christoph Haag 37519dc54d d/dummy: Set XRT_SPACE_RELATION_ORIENTATION_TRACKED_BIT 2020-09-14 16:56:54 +02:00
Christoph Haag ddf3eb5789 st/oxr: Use space graph in global-to-local space transform
This takes care of transforming the velocities.
2020-09-11 19:06:16 +02:00
Christoph Haag 150b7649f3 d/survive: Don't fix up invalid pose 2020-09-11 18:52:01 +02:00
Christoph Haag a664bb22bf d/survive: Update to recent libsurvive git
Rewrite input event handling and add new events from libsurvive.
2020-09-11 18:52:01 +02:00
Christoph Haag c3fbe6eaf8 d/survive: remove unused structs 2020-09-11 18:52:01 +02:00
Christoph Haag 357b47522c d/survive: set relation flags properly 2020-09-11 18:52:01 +02:00
Christoph Haag f41edee4b4 st/oxr: Use space graph resolve result relation flags instead of pure pose relation 2020-09-11 18:52:01 +02:00
Christoph Haag 19acc7be25 st/oxr: Pass actual ViewStateFlags to application with xrLocateViews
These flags are originally set by the driver, then processed by the space graph resolver.
2020-09-11 18:52:01 +02:00
Christoph Haag 2b90b4ea89 st/oxr: Destroy compositor on instance destroy
Fixes direct mode on subsequent instance creation in the same process
when no session was created.
2020-09-11 18:52:01 +02:00
Christoph Haag eb8a304178 ipc: print send and receive errors with ERROR, not DEBUG
These errors lead to unexpected output and should be investigated.
2020-09-11 18:52:01 +02:00
Christoph Haag a884e24b9a aux: Support waiting more than 0.999... seconds in os_nanosleep 2020-09-11 18:52:01 +02:00
Christoph Haag 6133d4cf99 d/survive: Remove out_relation_timestamp_ns 2020-09-11 18:52:01 +02:00
Christoph Haag 844daee844 st/oxr: Check xrLocateViews quaternion only if orientation valid 2020-09-11 18:52:01 +02:00
Christoph Haag 1429d678a0 aux/space: Propagate orientation valid bit through space graph resolve
Invalid poses may be handled more gracefully in the future. For now poses
are not transformed if orientation is not valid, because transforming with
an invalid quaternion will have bad results in any way.

v2: Upgrade poses with valid position but invalid orientation to valid poses
2020-09-11 18:51:58 +02:00
Christoph Haag 6cce04f8d3 aux/space: fix typo: propagate tracked orientation bit properly 2020-09-09 14:51:06 +02:00
Jakob Bornecrantz 8e24dda794 xrt: Remove out_timestamp argument to xrt_device::get_tracked_pose 2020-09-07 23:37:09 +01:00
Jakob Bornecrantz eaffa05a37 xrt: Remove acceleration components from xrt_space_relation 2020-09-07 23:36:34 +01:00
Jakob Bornecrantz 5a4d45bbaa m/base: Remove old space relation functions 2020-09-07 23:33:28 +01:00
Jakob Bornecrantz 855b2005f3 c/main: Use new xrt_space_graph 2020-09-07 23:33:28 +01:00
Jakob Bornecrantz d60cce8977 st/oxr: Use new xrt_space_graph 2020-09-07 23:33:28 +01:00
Jakob Bornecrantz 74690a2278 d/psmv: Rotate angular velocity to be in base space 2020-09-07 23:33:28 +01:00
Jakob Bornecrantz f9905a4007 d/psmv: Use space graphs for poses 2020-09-07 23:33:28 +01:00
Jakob Bornecrantz fe94dec5ea m/space: Space graph functions 2020-09-07 23:33:25 +01:00
Jakob Bornecrantz ca91695722 m/quat: Add math_quat_rotate_derivative 2020-09-07 16:14:46 +01:00
Jakob Bornecrantz 4d85db6051 xrt: Add xrt_space_graph 2020-09-07 16:14:46 +01:00
Moses Turner 0ff1865c2e d/ns: Add version 2 config support 2020-09-07 11:35:24 +01:00
Jakob Bornecrantz ea6374d296 d/dummy: Minor comments 2020-09-06 22:53:10 +01:00
Jakob Bornecrantz 09bcf6c9d2 t/ctl: Fix typo 2020-09-06 21:58:34 +01:00
Jakob Bornecrantz 4f94ee0c91 u/render_timing: Improve debug printing 2020-09-04 13:48:40 +01:00
Christoph Haag 4a1d8b3a41 xrt: Fix vive input defines 2020-09-04 01:46:47 +02:00
Jakob Bornecrantz 787c104339 d/psmv: Use last package timestamp for input changes 2020-09-02 22:08:01 +01:00
Jakob Bornecrantz 328f5d5315 m/base: Add math_quat_invert 2020-09-02 22:07:35 +01:00
Jakob Bornecrantz 511a51b283 m/3dof: Rename to timestamp 2020-09-02 22:07:35 +01:00
Jakob Bornecrantz 8cdfe0e694 m/fifo: Add f64 filter fifo 2020-09-02 22:07:35 +01:00
Jakob Bornecrantz 991c9029c7 m/3dof: Tweak values 2020-09-02 22:07:35 +01:00
Jakob Bornecrantz 736fa81349 m/3dof: Add vars tracking helper function 2020-09-02 22:07:35 +01:00
Jakob Bornecrantz 33f05c7bea m/vec3: Add C++ operators 2020-09-02 22:07:35 +01:00
Jakob Bornecrantz d396117a39 m/vec2: Add C++ operators 2020-09-02 22:07:35 +01:00
Jakob Bornecrantz 2d8a39b731 d/v4l2: Set correct name on variable tracker 2020-09-02 18:36:47 +01:00
Jakob Bornecrantz ffa888a575 d/v4l2: Use different tweaks depending on capture type 2020-09-02 11:57:47 +01:00
Jakob Bornecrantz 6846ab7637 xrt: Add stream capture type 2020-09-02 11:52:59 +01:00
Christoph Haag 330279d330 d/psvr: Set positional tracking bit when tracker is present 2020-09-01 17:03:55 +02:00
Christoph Haag cde94cc8a2 build: Remove libv4l2 dependency from meson
We use the linux/v4l2-common.h header to access v4l devices, not libv4l from v4l-utils.
2020-08-28 12:10:53 +00:00
Pete Black 3f197eeffd t/psmv: Use the same filtering as in PSVR tracker 2020-08-28 11:38:03 +00:00
Pete Black 76a439bd59 t/psvr: Add a functional PSVR tracker 2020-08-28 11:38:03 +00:00
Pete Black 3fdce20afd d/psvr: Only power on front LEDs 2020-08-28 11:38:03 +00:00
Jakob Bornecrantz b3c5bf1517 math: Add a permutation library 2020-08-28 11:38:03 +00:00
Pete Black 0d07c2c343 external: Add Hungarian graph algorithm 2020-08-28 11:38:03 +00:00
Jakob Bornecrantz af540f5ed3 external: Sort libraries in CMakeLists.txt and meson.build 2020-08-28 11:38:03 +00:00
Jakob Bornecrantz d3b224275c u/logging: Fix return of debug_get_log_option_SUFFIX 2020-08-28 11:38:03 +00:00
Pete Black 751fdb2884 u/render_timing: Paranoia 2020-08-28 11:38:03 +00:00
Pete Black 20ee4114b0 xrt: Fix typo in comment 2020-08-28 11:38:03 +00:00
Jakob Bornecrantz 233ca93569 t/ctl: Print devices as well 2020-08-28 11:33:38 +00:00
Jakob Bornecrantz 5c08dc1617 t/ctl: Refactor connection opening 2020-08-28 11:33:38 +00:00
Jakob Bornecrantz 691881f507 t/ctl: Implement device IO toggling 2020-08-28 11:33:38 +00:00
Jakob Bornecrantz 7b9d7091bd t/ctl: Refactor code to make more tidy 2020-08-28 11:33:38 +00:00
Jakob Bornecrantz 4e6a137c62 ipc: Make it possible to toggle inputs on and off 2020-08-28 11:33:38 +00:00
Jakob Bornecrantz 557dacbb02 st/oxr: Special case the any path for pose actions 2020-08-28 10:34:19 +00:00
Jakob Bornecrantz deb5633bf9 d/psmv: Introduce proper grip and aim poses
Correctly rotate the grip pose to follow the spec more closely.
2020-08-27 10:42:05 +01:00
Ryan Pavlik ff603d3acd st/oxr: Add layer type conditionals around depth-image manipulation 2020-08-26 12:28:43 -05:00
Ryan Pavlik 2ac0013e25 st/oxr: Verify that the compositor created can actually do the layer types claimed. 2020-08-26 12:28:35 -05:00
Ryan Pavlik 9d19ab2755 u/misc: Improve docs of calloc macros. 2020-08-26 11:26:46 -05:00
Ryan Pavlik cb26f7255c comp: Use the correct calloc macro 2020-08-26 11:25:43 -05:00
Ryan Pavlik 99fb9fff0d external: Update GLAD again for more extensions 2020-08-26 16:31:56 +01:00
Ryan Pavlik b944b82f3c ipc: Fix build on Android. 2020-08-26 16:31:41 +01:00
Ryan Pavlik 581f59a2eb vk: Add an Android function to the vk_bundle 2020-08-26 16:31:38 +01:00
Jakob Bornecrantz 516212fef4 c/main: Test if a format is supported before adding to list 2020-08-26 14:28:10 +00:00
Jakob Bornecrantz 62fd80ff8d aux/vk: Print a little bit more when failing on usage 2020-08-26 14:28:10 +00:00
Jakob Bornecrantz cac588bbf2 st/oxr: Get maximum layers from the compositor info 2020-08-26 15:25:00 +01:00
Jakob Bornecrantz 1eaf4baf91 c/main: Support 16 layers 2020-08-26 15:25:00 +01:00
Jakob Bornecrantz 1309164303 xrt: Add max layers supported by a compositor 2020-08-26 15:25:00 +01:00
Jakob Bornecrantz 1496262564 xrt: Constify compositor interface 2020-08-26 15:25:00 +01:00
Jakob Bornecrantz 777add8f9e xrt: Tidy some comments 2020-08-26 15:25:00 +01:00
Christoph Haag 8377655128 comp: Handle skipping rendering of infinite cylinder properly
* Setting visibility to none will make the compositor skip rendering this layer
* But do fill in some information in like layer type to ease debugging
2020-08-26 15:59:54 +02:00
Christoph Haag aecfdfc9f9 comp: Fix typo in switch statement 2020-08-26 15:59:54 +02:00
Jakob Bornecrantz 16b9dc13e2 xrt: Correct assert for ipc data type 2020-08-25 14:55:43 +01:00
Jakob Bornecrantz bf9f0e6e39 st/oxr: Use the right depth projection function 2020-08-25 14:55:43 +01:00
Jakob Bornecrantz cd6a237b4a c/client: Add support for depth projection 2020-08-25 14:55:43 +01:00
Jakob Bornecrantz 8356308bf9 c/main: Add support for depth projection 2020-08-25 14:55:43 +01:00
Jakob Bornecrantz efac59a1d8 ipc: Add support for depth projection 2020-08-25 14:55:43 +01:00
Jakob Bornecrantz 9bd725a800 xrt: Add missing xrt_comp_layer_stereo_projection_depth 2020-08-25 14:55:43 +01:00
Christoph Haag 2cd010b65f st/oxr: Verify that projection layer has 0 or view count depth layers 2020-08-24 12:29:47 +02:00
Christoph Haag a9193b0e89 st/oxr: Pass through depth layer to compositor
The compositor does not make use of this layer yet.
2020-08-24 10:30:23 +02:00
Christoph Haag 4f2d421903 st/oxr: Verify depth layer 2020-08-24 10:30:23 +02:00
Christoph Haag 6dc4a1f237 aux/vk: Report appropriate errors on unsupported image usage flags 2020-08-24 10:18:12 +02:00
Christoph Haag 092dddc2da comp: Support Vk and GL depth and depth stencil formats
For now add only the depth formats mandated by OpenGL to maximize the
chances of the Vulkan driver supporting a reasonable set of usage flags
for the formats.
2020-08-24 10:18:12 +02:00
Christoph Haag 5a854fc806 st/oxr: projection layer swapchain NULL check 2020-08-24 10:18:12 +02:00
Jakob Bornecrantz 1914a2ee93 ipc: Tidy 2020-08-21 18:17:18 +01:00