Lubosz Sarnecki
bd68c0e5f5
aux/math: Implement math_matrix_2x2_multiply.
2020-11-27 16:50:55 +01:00
Christoph Haag
f7cbe37c2d
u/hand_tracking: Tweak hand model parameters
...
* shortened way too long bones
* tweaked offset positions
2020-11-23 20:42:54 +00:00
Christoph Haag
006971ae7a
u/hand_tracking: Calculate joint velocities
...
And return them in the state tracker
2020-11-23 20:42:54 +00:00
Christoph Haag
aa6e5f7fdf
u_hand_tracking: Fix typo in u_hand_tracking_model
2020-11-23 20:42:54 +00:00
Christoph Haag
f5ef3985ba
xrt: Add support for locating hand joints in action spaces
2020-11-23 20:42:54 +00:00
Christoph Haag
95af586654
aux: Add m_space_graph_add_inverted_relation
2020-11-23 20:42:54 +00:00
Christoph Haag
d6b072805a
aux: Add m_space_relation_invert
2020-11-23 20:42:54 +00:00
Ryan Pavlik
66811b436a
xrt: Have the vk_helper vk_create_device take in a list of device extensions, and fix usages.
2020-11-23 14:27:21 -06:00
Jakob Bornecrantz
ef6c8430d2
m/space: Make sure to not drop positions
2020-11-18 18:05:07 +00:00
Christoph Haag
9e788df463
xrt: Remove lens center from xrt_view
...
It's only used internally in drivers now.
2020-11-12 16:04:00 +01:00
Ryan Pavlik
86a19e6697
gradle: Remove unused dependencies.
2020-11-10 18:44:03 +00:00
Ryan Pavlik
5115124bb3
aux/android: Factor out a "native counterpart" class.
2020-11-10 18:44:03 +00:00
Ryan Pavlik
a792b08ed7
aux/vk: Minimal, untested implementations of these for Windows - fixes build
2020-11-10 03:09:07 +00:00
Ryan Pavlik
cc15bfa7ed
a/util: FIx ambiguity of directories for docs.
2020-11-10 03:09:07 +00:00
Ryan Pavlik
8f10d9c2b8
u_hand_tracking: Fix usage of M_PI
2020-11-10 03:09:07 +00:00
Ryan Pavlik
d2955a3967
aux/util: Adjust conditional log macros to handle msvc correctly
2020-11-10 03:09:07 +00:00
Jakob Bornecrantz
aa7f922e35
os/time: Add a Linux specific way to get the realtime clock (for RealSense)
2020-11-09 23:42:13 +00:00
Jakob Bornecrantz
4bbe25148b
os/time: Make timespec argument const
2020-11-09 23:42:11 +00:00
Ryan Pavlik
7cebdb4763
aux/os: More defines to calm clang-tidy.
2020-11-09 16:18:00 -06:00
Ryan Pavlik
b855fd1ae2
a/util: Appease clang-tidy with a define for ns per second
2020-11-09 16:18:00 -06:00
Ryan Pavlik
ab82c5b8e2
u_debug: Remove duplicate declaration
2020-11-09 16:18:00 -06:00
Christoph Haag
9d894ab5ff
xrt: Move tracking origin setup code to u_device
2020-11-09 00:32:33 +01:00
Christoph Haag
c60b7412e5
xrt: Move device assignment code to u_device
2020-11-09 00:32:33 +01:00
Christoph Haag
803e9531ec
aux: Use time since time_state creation for time_state timestamps
...
Easy to read timestamps and somewhat meaningful.
2020-11-05 23:11:03 +00:00
Ryan Pavlik
ce3750bfe1
a/android: Store a native pointer in the MonadoView.
2020-10-30 18:20:35 -05:00
Ryan Pavlik
3bc84cca9e
a/android: Migrate to using the MonadoView generated wrapper.
2020-10-30 18:20:35 -05:00
Ryan Pavlik
b6a12f8522
a/android: Add some partially-generated wrappers for our own Java code.
2020-10-30 18:20:35 -05:00
Ryan Pavlik
fc78b5de86
a/android: Use android_custom_surface constructor/destructor
2020-10-30 18:20:34 -05:00
Ryan Pavlik
66d6281a7f
a/android: Monitor whether MonadoView is still being used by native code.
2020-10-30 18:20:34 -05:00
Ryan Pavlik
26cd22b232
a/android: Move class name to a constant.
2020-10-28 12:12:31 -05:00
Ryan Pavlik
da3959e642
a/android: C++ headers use .hpp as the extension
2020-10-28 12:12:31 -05:00
Ryan Pavlik
8301c9d1b4
a/android: Fix some file comments.
2020-10-28 12:12:31 -05:00
Ryan Pavlik
1acadb8a18
a/android: Make MonadoView fullscreen.
2020-10-28 12:12:31 -05:00
Lubosz Sarnecki
d61faff421
aux/android/ahardwarebuffer_allocator: Use Vulkan enums in format switch.
2020-10-28 12:12:31 -05:00
Lubosz Sarnecki
633b7839c2
aux/vk+comp/sc: Initialize extra structs for hardware buffer extension.
...
Fix sRGB format for Android hardware buffers.
2020-10-28 12:12:31 -05:00
Lubosz Sarnecki
3cc8793d7d
aux+comp: Add Android hardware buffer device extension.
2020-10-28 12:12:31 -05:00
Lubosz Sarnecki
2cc8252c05
aux/vk: Add vkGetAndroidHardwareBufferPropertiesANDROID.
2020-10-28 12:12:31 -05:00
Lubosz Sarnecki
2df2daa00c
aux/android/ahardwarebuffer_allocator: Add function to allocate a single buffer.
2020-10-28 12:12:31 -05:00
Ryan Pavlik
436886852d
a/android: Improve monadoview, including fixing deleted ref problem.
2020-10-28 12:12:31 -05:00
Ryan Pavlik
dfd771f768
aux/android: Enhance custom surface
...
Includes fixes to my mistakes by Lubosz.
Co-authored-by: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
2020-10-28 09:41:03 -05:00
Lubosz Sarnecki
e78ad12634
aux/android/custom_surface: Make JNI happy.
...
Keep android_load_class methods in C++, since
casting the class handle to void results in:
```
JNI DETECTED ERROR IN APPLICATION: use of deleted global reference.
```
Co-authored-by: Ryan Pavlik <ryan.pavlik@collabora.com>
2020-10-28 09:33:47 -05:00
Lubosz Sarnecki
2a8db3d780
aux/android/load_class: Use pkgClassLoader.loadClass to load MonadoView class.
2020-10-28 09:33:46 -05:00
Lubosz Sarnecki
dbe0338956
android/MonadoView: Register surface callback and fix imports.
...
Run UI things on UI thread.
2020-10-28 09:33:46 -05:00
Ryan Pavlik
43d724b6bf
aux/vk: Fix a place where we were missing an android ifdef
2020-10-28 09:33:46 -05:00
Ryan Pavlik
d4b19f3d47
aux/android: Add custom surface code.
2020-10-28 09:33:46 -05:00
Ryan Pavlik
9b67c0a09f
aux/android: Add code to load Java from a package
2020-10-28 09:33:46 -05:00
Ryan Pavlik
d0187cee9a
aux/android: Add Java code
2020-10-28 09:33:26 -05:00
Ryan Pavlik
06f75e03b4
a/android: Fix typo in comment
2020-10-28 09:32:49 -05:00
Ryan Pavlik
59d2285c8e
aux/util: Port logging for Android.
...
Now if u_logging is used, it goes to logcat.
2020-10-28 09:32:49 -05:00
Jakob Bornecrantz
463330d5d5
u/distortion: Set blend mode incase it is zero
2020-10-27 21:34:29 +00:00
Jakob Bornecrantz
ecbde55752
m/space: Normalize orientation when returning result
2020-10-27 16:20:12 +00:00
Jakob Bornecrantz
bd6ea43de5
m/headers: Fix doxygen warnings
2020-10-26 22:55:22 +00:00
Jakob Bornecrantz
8730ff479a
u/hand_tracking: Tidy header
2020-10-26 22:50:54 +00:00
Jakob Bornecrantz
75153a7066
u/distortion: Add simple cardboard distortion code
2020-10-26 21:53:55 +00:00
Jakob Bornecrantz
ed2040a571
u/mesh: Tidy header
2020-10-26 20:36:30 +00:00
Lubosz Sarnecki
7035490ed7
aux/math: Implement math_matrix_4x4_inverse_view_projection.
2020-10-26 01:34:10 +00:00
Jakob Bornecrantz
2528583c55
xrt: Add git tag/description
2020-10-20 17:43:11 +01:00
Jakob Bornecrantz
438a8e71f9
aux/vk: Add vkFreeDescriptorSets
2020-10-13 18:59:28 +01:00
Christoph Haag
ca5cbaaa6f
aux: Add hand_tracking util
2020-10-12 22:55:33 +02:00
Christoph Haag
256e2c68d8
xrt: Implement & hook up hand joint tracking infrastructure
...
Include <inttypes.h> to satisfy older compilers
2020-10-12 22:13:47 +02:00
Ryan Pavlik
835beedcca
u_handles: Add Win32 handle utilities
2020-10-08 17:26:22 -05:00
Ryan Pavlik
39ede92287
build: Link aux_util against threads explicitly
2020-10-08 17:26:22 -05:00
Ryan Pavlik
3f83b1da92
u_json: Properly silence secure CRT warnings.
2020-10-08 17:26:22 -05:00
Ryan Pavlik
48eb00f1c8
u_bitwise: Switch from static const int to defines.
...
Sadly MSVC didn't believe those were constant,
and this is a C file so no constexpr.
2020-10-08 17:26:22 -05:00
Jakob Bornecrantz
51c8575323
u/mesh: Add back none distortion generation
2020-10-07 23:45:39 +01:00
Christoph Haag
5bea856f20
build/meson: Add XRT_HAVE_DBUS when dbus is found
2020-10-05 16:05:02 +00:00
Jakob Bornecrantz
0804dc20d1
os/ble: Use logging
2020-10-05 16:22:02 +01:00
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
9a675cc7f3
xrt: Rename xrt_uv_triplet
2020-09-30 15:35:57 +01: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
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
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
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
Jakob Bornecrantz
6a94b1cf80
m/ff: Improve interface
2020-09-16 17:27:16 +01:00
Jakob Bornecrantz
b624d290d0
m/3dof: Add filter fifos to variable tracking code
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
a884e24b9a
aux: Support waiting more than 0.999... seconds in os_nanosleep
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
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
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
4f94ee0c91
u/render_timing: Improve debug printing
2020-09-04 13:48:40 +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
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
Jakob Bornecrantz
b3c5bf1517
math: Add a permutation library
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
Ryan Pavlik
9d19ab2755
u/misc: Improve docs of calloc macros.
2020-08-26 11:26:46 -05:00
Ryan Pavlik
581f59a2eb
vk: Add an Android function to the vk_bundle
2020-08-26 16:31:38 +01:00
Jakob Bornecrantz
62fd80ff8d
aux/vk: Print a little bit more when failing on usage
2020-08-26 14:28:10 +00:00
Christoph Haag
6dc4a1f237
aux/vk: Report appropriate errors on unsupported image usage flags
2020-08-24 10:18:12 +02:00
Christoph Haag
370f6820aa
m: Generalize math_matrix_4x4_quad_model, making scaling a vec3
2020-08-21 02:11:03 +02:00
Christoph Haag
fbe390813c
vk: Add update_buffer helper function
2020-08-21 02:11:03 +02:00
Christoph Haag
cf5596adba
comp: Use CLAMP_TO_EDGE for swapchains
...
Avoids sampling black at the edges of layers.
2020-08-21 02:09:20 +02:00
Ryan Pavlik
3b8c8ddc1a
xrt: Move the android globals functionality to the new android aux lib.
2020-08-19 16:07:00 -05:00
Ryan Pavlik
a57507518d
aux/android: New aux library, add image allocator for Android
2020-08-19 16:06:30 -05:00
Ryan Pavlik
fa34c65ed3
xrt: Make xrt_image_native::size optional.
...
Not all allocators can supply it.
2020-08-19 16:06:30 -05:00
Ryan Pavlik
e48f68deb6
aux/ogl: Add helper header for OpenGL.
2020-08-19 16:06:30 -05:00
Ryan Pavlik
430f79a7ca
aux/util: Add u_android for global state.
2020-08-19 11:01:10 -05:00
Ryan Pavlik
e092345292
aux/vk: Port to using u_handles
2020-08-13 17:34:05 -05:00
Ryan Pavlik
129c1a9ac4
a/util: Add u_handles module.
2020-08-13 17:34:05 -05:00
Ryan Pavlik
e52539d1a3
aux/vk: Fix compile time conditionals
2020-08-13 17:34:05 -05:00
Ryan Pavlik
9087d1c7a9
xrt: Use our generic graphics buffer typedefs all over.
...
This adds some Android support in composition clients,
and fixes the breakage from 2 commits ago.
Thanks to Jakob for finding my error in an earlier version.
2020-08-13 17:34:05 -05:00
Ryan Pavlik
475192ec73
xrt: Rename "fd" references to "handle"
...
This breaks some Android pieces, which will be fixed shortly.
2020-08-12 17:11:42 -05:00
Ryan Pavlik
146218b346
xrt: Some clang tidy fixes.
...
A few suppressions as well where clang-tidy did the wrong thing.
2020-08-12 17:11:42 -05:00
Jakob Bornecrantz
cd9da1c1e1
aux/vk: Make xrt_swapchain_create_info const
2020-08-07 17:00:10 +01:00
Christoph Haag
e48c748a57
xrt: suggest correct GPU in xrGetVulkanGraphicsDevice()
...
As before, on the service side the GPU index the compositor runs on can be selected with
* XRT_COMPOSITOR_FORCE_GPU_INDEX=INDEX1
By default xrGetVulkanGraphicsDevice() will suggest the same GPU the compositor runs on.
It is also possible to override the GPU index suggested to applications with
* XRT_COMPOSITOR_FORCE_CLIENT_GPU_INDEX=INDEX2
The reason this is both done on the service side is that if compositor and client run
on different GPUs, the swapchains use linear tiling instead of optimal tiling.
To make chosen GPUs comparable across the compositor's and the client's vulkan instance,
VkPhysicalDeviceIDProperties.deviceUUID is used.
2020-08-07 17:01:13 +02:00
Jakob Bornecrantz
3a7a86aafc
vk: Refactor VkImageUsageFlags code into helper function
2020-08-06 14:28:23 +00:00
Jakob Bornecrantz
ce7da3941c
vk: Add support for XRT_SWAPCHAIN_USAGE_INPUT_ATTACHMENT
2020-08-06 14:28:23 +00:00
Ryan Pavlik
07f2e62e76
aux/vk: vk_create_semaphore_from_fd -> vk_create_semaphore_from_native
2020-08-05 20:50:00 +00:00
Ryan Pavlik
d8ad620bd2
xrt: Update GLAD again, to a "merged" distribution.
...
This merges the OpenGL and OpenGL-ES code.
2020-08-05 20:50:00 +00:00
Lubosz Sarnecki
87a5c425cf
a/math: Add math_vec3_normalize.
2020-07-31 12:45:47 +02:00
Lubosz Sarnecki
7c8febd03d
u/logging: Add U_LOG_IFL.
2020-07-31 12:45:47 +02:00
Jakob Bornecrantz
727e3bc2a6
vk: Add image allocator helper
2020-07-20 13:50:01 +00:00
Jakob Bornecrantz
a8a4e80746
vk: Use xrt_swapchain_create_info in vk_create_image_from_native
2020-07-20 13:50:01 +00:00
Jakob Bornecrantz
5a9fa0a7e6
vk: Remove unused vk_image
2020-07-20 13:50:01 +00:00
Ryan Pavlik
47a66e1bdf
build: Use OpenGLES CMake module to gate OpenGL|ES support
2020-07-17 15:17:42 -05:00
Ryan Pavlik
6f56d91c05
xrt: Add separate build config for OpenGL ES
2020-07-17 15:17:42 -05:00
Ryan Pavlik
910a3aae75
external: Update GLAD and add missing header
2020-07-17 13:53:39 -05:00
Ryan Pavlik
4220638afd
xrt: use _USE_MATH_DEFINES to make sure M_PI gets defined.
2020-07-17 13:53:39 -05:00
Ryan Pavlik
8b954e12c1
build: Add missing jpeg include dir
2020-07-17 13:53:39 -05:00
Ryan Pavlik
cb69223532
aux: Move responsibility for clearing image FD to the helper.
2020-07-17 11:46:22 -05:00
Ryan Pavlik
1aa2cdb89a
build: Move determination of Vulkan usage to build system.
...
Vulkan is still required for most actual uses of Monado, but this
makes the coupling weaker.
2020-07-16 10:17:30 +00:00
Ryan Pavlik
54f56716fd
xrt: Rename references to compositor/swapchain/image_fd to ..._native.
...
Reflecting that the native buffer isn't an FD on all platforms.
2020-07-15 09:11:58 -05:00
Lubosz Sarnecki
261facd9f1
u/json: Fix a -Wmaybe-uninitialized on GCC 10.1.0.
2020-07-10 17:18:41 +02:00
Lubosz Sarnecki
8e682fdd1b
u_logging: Format logging output.
...
To be in line with other log prints, put the log level first.
For better readability, put the function in [braces].
Remove ":" as separator between level and function.
2020-07-09 13:38:07 +02:00
Ryan Pavlik
b2b2b0f4af
u_logging: Fix comments/doxygen
2020-07-08 09:15:51 -05:00
Jakob Bornecrantz
9848f8b4b8
u/var: Add log level tracker
2020-07-03 19:01:55 +01:00
Jakob Bornecrantz
be0430a38c
u/debug: Add function to get logging level
2020-07-03 18:58:34 +01:00
Jakob Bornecrantz
b26c8135ae
u/*: Use new logging functions
2020-07-03 14:55:44 +01:00
Jakob Bornecrantz
38685eba38
u/log: Add logging helpers
2020-07-03 14:33:54 +01:00
Lubosz Sarnecki
166346ad6e
u/json: Add u_json_get_matrix_3x3.
...
As seen in Vive driver.
2020-07-02 18:42:37 +02:00
Lubosz Sarnecki
a9db6fbd40
u/json: Add fprintf error messages.
2020-07-02 18:42:37 +02:00
Lubosz Sarnecki
0bdd1133e4
u/json: Add u_json_get_vec3_array.
...
As seen in Vive driver.
2020-07-02 18:42:30 +02:00
Jakob Bornecrantz
5bad87690f
ipc: Avoid deadlocks due to render timing helper not getting data in time
2020-07-01 13:22:03 +01:00
Jakob Bornecrantz
83081f9cc1
u/render_timing: Add helper code for frame timing
2020-06-24 00:56:45 +01:00
Jakob Bornecrantz
f5359b655e
os/threading: Add semaphore
2020-06-23 21:31:03 +01:00
Jakob Bornecrantz
ef282c7df2
os/time: Add function to convert to a timespec struct
2020-06-23 21:31:03 +01:00
Jakob Bornecrantz
e8d62d948f
aux/vk: Add helper to create image view with component swizzles
2020-06-18 13:48:10 +01:00
Christoph Haag
7a1dbbe8a1
st/oxr: Ensure quaternion is normalized in xrLocateViews()
...
In rare cases the state tracker's pose transformations resulted in a quaternion
that accumulated float precision errors such that the norm of the quaternion was
not within float precision of 1.0 anymore.
Introduce a function math_quat_ensure_normalized() that can be used after multiple
operations have been performed on a quaternion.
2020-06-17 13:03:34 +02:00
Benjamin Saunders
f81f568931
aux/vk: Add helper to translate usage bits to Vulkan bits
2020-06-16 00:01:48 +00:00
Benjamin Saunders
fe734bb6e2
aux/vk: Add functions to create semaphores from FDs
2020-06-16 00:01:48 +00:00
Benjamin Saunders
3f744331e1
aux/vk: Declare consistent usage for xr swapchain images
2020-06-16 00:01:48 +00:00
Benjamin Saunders
27d2163f37
aux/vk: Delete nonsensical image usage case
2020-06-16 00:01:48 +00:00
Benjamin Saunders
f45f482d5e
aux/vk: Store Vulkan queue handle directly
2020-06-16 00:01:48 +00:00
Ryan Pavlik
821706e0e4
u/hashmap: Add "empty" function.
...
Used for cleanup assertions to start with: i.e. at some known point,
the hash map should be empty.
2020-06-15 17:04:00 -05:00
Ryan Pavlik
bc6cc85e7d
xrt: Improve doxygen documentation.
2020-06-03 16:28:18 -05:00
Lubosz Sarnecki
435d5a9b9e
c/comp: Remove internal Vulkan validation init.
...
Instead of maintaining this chunk of code and build options, the Vulkan
loader can be used to load up validation. This has the advantage that no
layer name needs to be hard coded inside Monado, which was subject of
change recently.
Instead of using our own environment variable we can easily set the one
from the loader, e.g. `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`.
2020-06-03 11:17:51 +00:00
Jakob Bornecrantz
ebd5773fb8
util: Add function for u_hashset to allocate a item
2020-06-02 13:02:04 +01:00
Jakob Bornecrantz
0d2a24b9a0
util: Add a index fifo
2020-06-02 13:02:04 +01:00
Jakob Bornecrantz
ace4d0e825
os/threading: Incude xrt_compiler.h
2020-05-29 23:36:23 +01:00
Lubosz Sarnecki
fc271ad5da
aux/math: Add function to calculate quad model matrix.
2020-05-28 22:16:57 +00:00
Lubosz Sarnecki
68c5eecb96
aux/vk: Add image helper struct and functions.
2020-05-28 22:16:56 +00:00
Lubosz Sarnecki
589c7e4fef
aux/vk: Add buffer helper structs and functions.
2020-05-28 22:16:56 +00:00
Lubosz Sarnecki
905040319a
aux/vk: Use optimal tiling in vk_create_image_simple.
...
Fixes an validation issue on NVIDIA and should bring more performance.
2020-05-28 22:16:56 +00:00
Jakob Bornecrantz
9d791cdfd3
math: Use non-squared 'length' of quat in validation
...
Correctly validate quaternion using non-squard "length" instead of squard
"length", certain combinations of elements would produce valid regular "length"
but not valid squard ones.
2020-05-28 15:50:47 +01:00
Jakob Bornecrantz
ef41cf2088
u/time: Use a very large hammer to "fix" time_state
2020-05-27 17:50:06 +01:00
Jakob Bornecrantz
ac38679641
r/debug: Fix ODR rule violation
...
Closes #79
2020-05-12 22:06:10 +01:00
Ryan Pavlik
4638b0af7b
build: Switch all CMake options to XRT_... to match what's used in source.
...
Also revise other small related parts of the build to make them more clear and consistent.
2020-05-12 11:52:51 -05:00
Lubosz Sarnecki
e8d273bc41
aux/vk: Add vkFlushMappedMemoryRanges.
2020-05-11 20:22:51 +01:00
Lubosz Sarnecki
54985b110a
aux/vk: Add descriptor set functions.
2020-05-11 20:22:50 +01:00
Lubosz Sarnecki
f131739c00
aux/vk: Take VkExtent2D and VkImageUsageFlags in vk_create_image_simple.
2020-05-11 20:21:58 +01:00
Lubosz Sarnecki
c09beb9efb
aux/vk: Add vk_get_access_flags.
2020-05-11 20:21:58 +01:00
Lubosz Sarnecki
06ce79272d
aux/vk: Add vk_check_error macro.
2020-05-11 20:21:58 +01:00
Lubosz Sarnecki
6aa1b4e571
aux/math: Add function to calculate view matrix from pose.
2020-05-11 20:21:58 +01:00
Lubosz Sarnecki
0b6d97ec8f
aux/math: Add matrix_4x4 identity and matrix_4x4_muliply.
2020-05-11 20:21:58 +01:00
Jakob Bornecrantz
1744715a5d
u/file: Do not print errors
2020-05-07 22:25:44 +00:00
Christoph Haag
344846b3e2
aux/vk: Print available GPUs with XRT_COMPOSITOR_PRINT_DEBUG
...
Useful for finding out a gpu index to use for XRT_COMPOSITOR_FORCE_GPU_INDEX.
2020-05-05 15:12:08 +02:00
Ryan Pavlik
974c68dead
xrt: Re-arrange build to avoid unnecessary includes.
...
Avoid unintentionally including cJSON from the source tree when using system,
etc. This adds granularity to the usage of "external" sources.
2020-04-28 21:36:46 +00:00
Jakob Bornecrantz
c7903e2d5e
u/sink: Add support for XRT_FORMAT_UYVY422
2020-04-28 11:46:31 +00:00
Jakob Bornecrantz
1de7eb7cc9
t/calibration: Add support for XRT_FORMAT_UYVY422
2020-04-28 11:46:31 +00:00
Jakob Bornecrantz
7602e555b0
xrt: Add the format XRT_FORMAT_UYVY422
2020-04-28 11:46:31 +00:00
Jakob Bornecrantz
59b7794172
xrt: Rename XRT_FORMAT_YUV422 to XRT_FORMAT_YUYV422
2020-04-28 11:46:31 +00:00
Christoph Haag
74a328e909
u/json: Add json getter
...
u_json_get() is much, much shorter than cJSON_GetObjectItemCaseSensitive().
2020-04-28 10:22:42 +00:00
Ryan Pavlik
75d5e5b9f2
t/psmv: Fix FTBFS on PPC.
...
Apparently EIGEN_PI isn't a double by default.
2020-04-27 20:18:31 +00:00
Ryan Pavlik
7fab448cf0
build: Support building with system cJSON.
...
Fixes #62 .
2020-04-24 20:34:53 +00:00
Jakob Bornecrantz
0ad9a7406c
os/threading: Add #pragma once
2020-04-22 21:59:20 +01:00
Jakob Bornecrantz
e37d8f4cf5
xrt: Remove timestate from xrt_device interface
2020-04-16 17:29:34 +01:00
Jakob Bornecrantz
48957b97c2
os/time: Fix warnings on C++
2020-04-16 14:51:08 +01:00
Jakob Bornecrantz
76f83364e3
os/ble_dbus: Check if bluetooth is available
...
Closes #65
2020-04-16 13:48:34 +00:00
Jakob Bornecrantz
530cbf0d6c
os/ble: Detect errors better
2020-04-16 13:48:34 +00:00
Jakob Bornecrantz
ded6a8a4b9
os/ble_dbus: Fix return check
2020-04-16 13:48:34 +00:00
Jakob Bornecrantz
061dbefbd0
u/threading: Add a new higher level threading helpers
2020-04-15 17:33:35 +00:00
Lubosz Sarnecki
8d3a0938fa
aux/vk: Add vkResetFences.
2020-04-15 16:43:57 +02:00
Jakob Bornecrantz
231d39185e
t/file: Remove hacky file handling functions
2020-04-10 12:29:21 +00:00
Jakob Bornecrantz
7b049a9d65
t/file: Expose non-hack version of the calibration data save function
2020-04-10 12:29:21 +00:00
Jakob Bornecrantz
f47c384b79
u/json: Add bool getter function
2020-04-10 12:29:21 +00:00
Jakob Bornecrantz
b5dd07f2fa
u/file: Add file helpers
2020-04-10 12:29:21 +00:00
Jakob Bornecrantz
817ec2f2bc
u/hashset: Fix ISO C++ warning
2020-04-07 16:19:55 +01:00
Jakob Bornecrantz
46f51e8139
os/ble: Fix memory leak if we fail to find a device
2020-04-03 17:21:55 +01:00
Lubosz Sarnecki
1b7b8c163f
comp: Further remove unused struct field initializers.
2020-04-01 12:50:10 +00:00
Lubosz Sarnecki
b6d8d4b458
comp: Don't initialize unused fields in Vulkan structs.
...
In order to save redundancy with initializing empty fields with NULL / 0
values and improve readability of the Vulkan code.
This patch also uses struct initializers where possible.
This essentially reverts 1eae45212e
.
2020-04-01 12:50:10 +00:00
Ryan Pavlik
bc53be8562
t/imu_fusion: Clean up and improve comments
2020-03-26 12:00:26 +00:00
Ryan Pavlik
86b3d9f587
t/calibration: Provide read-only access to size as cv::Size in calibration wrapper
2020-03-26 12:00:26 +00:00
Ryan Pavlik
4f5e2aea4e
aux/tracking: Fix the API that led to the error I hit.
2020-03-26 12:00:26 +00:00
Ryan Pavlik
c6a574191d
aux/tracking: Add image undistort/normalize cache mechanism
2020-03-26 12:00:26 +00:00
Ryan Pavlik
cf883817c2
t/psmv: Retrieve more data from camera calib.
2020-03-26 12:00:26 +00:00
Ryan Pavlik
d198e93fcb
external: Update flexkalman
2020-03-26 12:00:26 +00:00
Jakob Bornecrantz
622c848fa2
t/calib: Silence missing reference warning
2020-03-25 16:32:16 +00:00
Jakob Bornecrantz
3e5da414f7
aux/math: Add 3DOF imu fusion
2020-03-25 13:58:51 +00:00
Jakob Bornecrantz
f2ebe74748
aux/math: Add a simple imu pre-filter
2020-03-25 13:58:51 +00:00
Jakob Bornecrantz
23a66eb031
aux/math: Add math_matrix_3x3_rotate_vec3 function
2020-03-25 13:58:51 +00:00
Jakob Bornecrantz
18373730a8
aux/math: Expand the vec3 functions
2020-03-25 13:58:51 +00:00
Jakob Bornecrantz
21e77b85d7
aux/math: Add quat from angle vector function
2020-03-25 13:58:51 +00:00
Jakob Bornecrantz
e3516061bb
u/var: Add expand RO values
2020-03-25 13:58:51 +00:00
Jakob Bornecrantz
f8847912a7
os/ble: Fix error on not finding any device
2020-03-13 11:07:32 +00:00
Jakob Bornecrantz
6ecc1e30f3
xrt: Make stereo_camera_calibration refcounted
...
This allows the data to be safely shared and passed around, even allowing us
to tag frames with the data and passed around that way instead.
Since it now can be passed around more safely make the prober call the save
function instead of the calibration code. This then forms a basis for further
work where we can hook this up into a more proper configuration file.
2020-03-11 22:00:54 +00:00
Pete Black
6b4ec70d14
aux/os: Add D-Bus based BLE code
2020-03-11 21:36:49 +00:00
Pete Black
8597ad5ee8
u/bitwise: Add bitwise manipulator functions
2020-03-11 21:36:49 +00:00
Jakob Bornecrantz
0b63cb2da3
aux/math: Add vec2 squared length function
2020-03-11 20:37:20 +00:00
Jakob Bornecrantz
119dc283af
u/mesh: Fix file brief
2020-03-11 20:37:20 +00:00
Jakob Bornecrantz
622320904a
xrt: Misc tidy of u_var_timing
2020-03-09 20:01:38 +00:00
Christoph Haag
e8ccb07db7
st/gui: Add compositor frame timing graph to debug ui
2020-03-09 12:59:12 +01:00
Jakob Bornecrantz
59f0d0ff0a
u/time: Use smaller xrt_config_os.h instead of xrt_config.h
2020-03-05 11:25:50 +00:00
Ryan Pavlik
46c9fa7c2b
build: aux_util depends on aux_math.
2020-03-04 17:25:27 -06:00
Ryan Pavlik
92205ab5be
build: Refactor CMake build to use static libraries instead of object bundles.
...
This allows transitive dependencies to work easier and improves compatibility.
It takes a little bit more storage at build time, and possibly a little extra time.
2020-03-04 11:15:35 +00:00
Ryan Pavlik
f3eac87504
xrt: Correct usage of XRT_MAYBE_UNUSED on functions.
...
It shouldn't be used on a function marked "static inline" - that's
sufficient to avoid the warning. So, it should almost never be in
a header.
2020-03-04 11:15:35 +00:00
Ryan Pavlik
5a633905de
t/psvr: Add missing include
2020-03-04 11:15:35 +00:00
Ryan Pavlik
2aa3b27695
aux/vk: Fix 32-bit warning
2020-03-03 10:50:41 +00:00
Ryan Pavlik
4d7a8d819c
util/hashset: Add missing include.
2020-03-03 10:33:14 +00:00
Jakob Bornecrantz
0619190d2b
build: Refactor how config defines are handled
...
With loads of changes from Ryan.
2020-03-03 10:33:14 +00:00
Ryan Pavlik
807438bb69
os/time: Remove XRT_MAYBE_UNUSED usages.
...
static inline is sufficient to avoid warnings about unused functions.
2020-03-02 14:01:18 -06:00
Ryan Pavlik
31ee6a1966
os/time: Documentation.
2020-03-02 13:59:06 -06:00
Ryan Pavlik
fca21e83b0
aux/util: Provide a conversion function from CLOCK_MONOTONIC nanoseconds to adjusted time.
2020-03-02 12:34:19 -06:00
Ryan Pavlik
227e53d030
os/time: Clean up comments and ifdefs.
2020-03-02 12:24:49 -06:00
Jakob Bornecrantz
09aa8794b2
aux/vk: Refactor out helper code into own library
2020-03-02 11:58:40 +00:00
Jakob Bornecrantz
63ca028b83
t/hsv: Improve latency when debugging by pushing debug frame after all other frames
2020-02-29 16:20:41 +00:00
Jakob Bornecrantz
d375843b65
os/time: Add time getting and conversion functions
...
For Linux it is based on CLOCK_MONOTONIC.
2020-02-27 13:55:57 +00:00
Jakob Bornecrantz
039e29e7ad
u/time: Tidy
2020-02-27 13:55:48 +00:00