Jakob Bornecrantz
855cdb4c29
aux/vk: Tidy code (NFC)
2021-05-18 03:48:50 +01:00
Moses Turner
36bc45b686
util: make sure u_config_json.file_loaded is false if we didn't load the file
2021-05-18 01:22:39 +00:00
Christoph Haag
82d9ed75c2
aux/vk: Check that native handles are importable
2021-05-18 03:01:44 +02:00
zhibinw
92565b7f21
ipc/android: support create surface from runtime.
2021-05-17 16:20:29 +00:00
Moses Turner
4ff7fb74ff
aux/util: only do tracing things if XRT_FEATURE_TRACING is enabled
2021-05-10 10:10:18 -05:00
Jakob Bornecrantz
b3455555c2
u/trace_marker: Use Percetto/Perfetto for tracing
2021-05-05 17:00:35 +01:00
Ryan Pavlik
b6f440fa26
aux/tracking: Move general docs to a separate header.
2021-05-04 11:21:46 -05:00
Ryan Pavlik
77baa8b7e6
aux/android: Move code into official namespaces
2021-05-04 11:21:46 -05:00
Ryan Pavlik
265c49d337
a/math: Move functionality into official namespaces.
2021-05-04 11:04:32 -05:00
Ryan Pavlik
2ae3ce883d
a/util: Namespace documentation
2021-05-04 11:04:32 -05:00
Ryan Pavlik
d88aefafbc
a/tracking: Migrate C++ APIs to the official namespaces now that we have some.
2021-05-04 10:34:43 -05:00
Ryan Pavlik
a66f567392
aux/android: Remove unused include
2021-04-30 17:57:50 -05:00
Ryan Pavlik
cf2abe7d88
u/process: Fix a warning by marking a function as maybe unused.
2021-04-30 17:57:50 -05:00
Ryan Pavlik
125b0799a3
aux/android: Update wrappers
2021-04-30 17:57:50 -05:00
Ryan Pavlik
45c0ca2ef9
aux/android: Expose native pointer from MonadoView
2021-04-30 17:34:21 -05:00
Ryan Pavlik
faa753c667
android: Annotation, docs, and formatting improvements for MonadoView
2021-04-30 17:34:21 -05:00
Ryan Pavlik
e4f2ac3286
android: Revise MonadoView so it doesn't require an Activity.
2021-04-30 17:34:21 -05:00
Ryan Pavlik
417de87cb2
a/util: Add a generic callbacks collection.
...
Based on the work for the Android surface callbacks,
just finished being made generic since we'll need to reuse it.
2021-04-30 17:34:21 -05:00
Ryan Pavlik
e82fafb186
cmake: Allow C++17 mode on all platforms, all modules.
...
Remove per-module C++17 settings.
2021-04-30 15:37:04 -05:00
Ryan Pavlik
23c73e145b
a/util: Make JSON reading more robust.
...
We were missing some null checks.
2021-04-28 21:13:34 +00:00
Ryan Pavlik
cfbb81cb71
a/util: Add schema directive to json before writing.
2021-04-28 21:13:34 +00:00
Jakob Bornecrantz
5befa76f42
m/3dof: Add manual way to set the gyro bias
2021-04-28 12:25:53 +00:00
Ryan Pavlik
8af1bfbf8c
a/u_logging: Docs for logging.
2021-04-27 22:05:00 +00:00
Ryan Pavlik
2c382734ca
a/bindings: Clean up formatting of script
2021-04-27 16:43:38 -05:00
Ryan Pavlik
d8cf72f6d9
a/bindings: Simplify as suggested by IDE
2021-04-27 16:43:38 -05:00
Ryan Pavlik
5a7412e86d
a/bindings: Fix typos
2021-04-27 16:43:38 -05:00
Ryan Pavlik
4dd96a666b
u/ht: Const-correctness
2021-04-26 22:38:42 +00:00
Ryan Pavlik
bc279076b8
u/ht: Port to new unit-vector defines
2021-04-26 22:38:42 +00:00
Ryan Pavlik
a80d159b07
t/ht: Port to using unit-vector defines.
2021-04-26 22:38:42 +00:00
Ryan Pavlik
6f46fcc251
aux/vive: Port to using new zero/identity defines
2021-04-26 22:38:42 +00:00
Ryan Pavlik
20053252aa
m/space: Port to using new zero/identity defines
2021-04-26 22:38:42 +00:00
Ryan Pavlik
cb8925ae04
u/ht: Port to using new zero/identity defines
2021-04-26 22:38:42 +00:00
Ryan Pavlik
edc6490d74
a/math: Port to using the new zero/identity defines
2021-04-26 22:38:42 +00:00
Ryan Pavlik
2adbde4673
a/util: Add u_device_get_view_pose helper function.
...
I saw many, many exact copies of this function in the code: good to de-duplicate them.
2021-04-26 22:38:42 +00:00
Jakob Bornecrantz
8c26be37ae
u/ft: Warn when missing frames
2021-04-26 22:55:41 +01:00
Boris-Chengbiao Zhou
d05aa9a458
aux/vk: Extend the correct structure for VK_EXT_global_priority
2021-04-24 17:50:18 +02:00
Jakob Bornecrantz
0058525457
util: Depend on bindings
2021-04-19 14:26:51 +01:00
Christoph Haag
471b876725
u_config_json: Load tracking override pose input name
2021-04-19 12:53:47 +02:00
Christoph Haag
664c103a3e
u_config_json: Store tracking override pose input name
2021-04-19 12:53:47 +02:00
Christoph Haag
fa79451858
build/cmake: link generated bindings to aux_util
2021-04-19 12:53:47 +02:00
Christoph Haag
e9eba9a2b4
aux/bindings: Generate char* <-> enum for all used inputs
2021-04-19 12:53:14 +02:00
Christoph Haag
4ea68b89a4
xrt: Add u_process, backed by libbsd's pidfile
...
Delete stale ipc files in ipc server when not already running.
If built without libbsd, fall back to previous behavior of complaining about existing ipc files and exit.
2021-04-15 21:42:06 +00:00
Christoph Haag
c92bc0a704
xrt: Add u_file_get_runtime_dir() and u_file_get_path_in_runtime_dir()
...
Analog to u_file_get_path_in_config_dir.
2021-04-15 21:42:06 +00:00
Jakob Bornecrantz
26756cc52d
aux/vk: Fix use free of stack variable and use correct return
2021-04-15 17:38:03 +01:00
Jakob Bornecrantz
05f14461a3
t/psvr: Fix warning
2021-04-15 17:38:01 +01:00
Jakob Bornecrantz
898bf15a08
u/tf: Use new trace marker helpers
2021-04-14 01:55:59 +00:00
Jakob Bornecrantz
c750447add
u/trace_marker: Add render timing support
2021-04-14 01:55:59 +00:00
Jakob Bornecrantz
52d1c4d834
u/trace_marker: Add json writing helpers
2021-04-14 01:55:59 +00:00
Jakob Bornecrantz
f82f289907
u/rt: Also print what kind of point we are marking when tracing
2021-04-13 16:56:17 +00:00
Ryan Pavlik
701ea290d0
os: Fix comment typo.
2021-04-13 11:46:53 -05:00
Ryan Pavlik
65a7b490a8
android: Add support for casting Context to Activity
2021-04-13 11:46:53 -05:00
Jakob Bornecrantz
1b51cbd1a7
aux/vk: Add support for VK_EXT_global_priority
2021-04-12 22:16:31 +00:00
iVRy VR
0064989e8b
t/psvr: Various fixes and changes
...
- Fix out of array bounds crash, curr_y can be out of bounds.
- Set tracked bits appropriately.
- Use m_imu_3dof for orientation.
2021-04-12 15:02:16 +00:00
Moses Turner
36a48bd62b
aux/util: switch blend mode to array
2021-04-11 04:08:49 -05:00
Ryan Pavlik
c906151fb1
util: Fix doxygen warnings
2021-04-09 18:22:42 -05:00
Ryan Pavlik
cf08cbba78
aux/vk: Docs for Vulkan native import helpers.
2021-04-09 18:11:52 +01:00
Ryan Pavlik
322f6d473a
util: Don't try to use $HOME or $XDG_CONFIG_HOME on Android.
2021-04-09 18:11:52 +01:00
Jakob Bornecrantz
736b9abdbe
u/rt: Print frame period and tidy
2021-04-07 15:41:47 +01:00
Jakob Bornecrantz
b68041fb93
u/rt: Tweak IIR alpha numbers
2021-04-07 15:41:47 +01:00
Jakob Bornecrantz
8606eb9d11
u/rt: Adjust app period depending on app time
2021-04-07 01:05:38 +01:00
Jakob Bornecrantz
1b0a9acb56
u/rt: Adjust app time during runtime
2021-04-07 01:04:20 +01:00
Jakob Bornecrantz
8215af5e5c
u/rt: Refactor render timing
2021-04-07 01:04:20 +01:00
Jakob Bornecrantz
670906ea0e
u/ft: Spelling
2021-04-07 01:04:20 +01:00
Jakob Bornecrantz
971f88f34f
u/ft: Rename frame timing functions
2021-04-07 00:50:10 +01:00
Jakob Bornecrantz
5dbcca65c5
u/tr: Refactor rendering timing code
2021-04-07 00:50:10 +01:00
Jakob Bornecrantz
d745396396
u/ft: Tweak frame timing numbers
2021-04-07 00:50:10 +01:00
Jakob Bornecrantz
07fb9941b3
aux/vk: Add fence import function
2021-04-07 00:50:10 +01:00
Ryan Pavlik
61c1044089
u/handles: Add graphics sync handle helpers.
2021-04-07 00:50:10 +01:00
Jakob Bornecrantz
c876087ee7
u/time: Add helper comparising functions
2021-04-07 00:50:10 +01:00
Christoph Haag
2b962a5bfb
u_config_json: Create root node on save if no config file loaded
...
If no config file is loaded, json->root can be uninitialized instead of NULL.
Fixes #117
2021-04-04 21:02:41 +02:00
Jakob Bornecrantz
30573fb90f
a/gst: Add GStreamer helper code
...
Co-authored-by: Aaron Boxer <aaron.boxer@collabora.com>
2021-04-03 03:07:21 +01:00
Ryan Pavlik
607eae4fdd
aux/vk: Fix creation of Windows external memory backed image.
2021-04-02 17:29:55 -05:00
Moses Turner
a027852767
aux/math: implement math_pose_identity.
2021-04-01 02:02:26 +02:00
Moses Turner
c776a19e15
aux/math: Implement math_matrix_3x3_multiply.
2021-04-01 02:02:26 +02:00
Christoph Haag
4061bf7707
d/multi: Add "attached" tracking override type
...
Example usage: Leap Motion attached to a Northstar headset.
2021-04-01 02:02:26 +02:00
Ryan Pavlik
f65635f378
aux/vk: Fix doxygen warning
2021-03-31 12:02:41 -05:00
Ryan Pavlik
b3280c5bc1
os/time: Small cleanup.
2021-03-31 12:02:41 -05:00
Ryan Pavlik
aa3d1c1f6a
os: Add os_precise_sleeper.
...
Mostly to be able to use a timer on Windows.
2021-03-31 12:02:41 -05:00
Ryan Pavlik
47bf17a0cc
os: Improve comment and prototype for os_nanosleep
2021-03-31 12:02:41 -05:00
Ryan Pavlik
0717975853
os: Improve timestamp retrieval on Windows.
2021-03-31 12:02:41 -05:00
Ryan Pavlik
00915cab0f
os: Add caveats to some timespec conversion functions.
2021-03-31 12:02:41 -05:00
Ryan Pavlik
ddc9b00d14
os: Adjust how we compute the timeout for a semaphore.
...
Preparation for overhaul of timing on Windows.
2021-03-31 12:02:36 -05:00
Ryan Pavlik
4e11abc06b
aux/vk: Fix warning about narrowing conversion.
2021-03-30 20:46:00 +00:00
Ryan Pavlik
adb5eefb86
aux/vk: Add functions to initialize and clean up mutexes in the vk_bundle
2021-03-30 20:46:00 +00:00
Jakob Bornecrantz
6ba27de305
m/mathinclude: Apperently _USE_MATH_DEFINES was not enough
2021-03-30 21:27:29 +01:00
Jakob Bornecrantz
6f10f474fa
t/psvr: Ensure that m_mathinclude.h is included
2021-03-30 21:27:29 +01:00
Jakob Bornecrantz
083e4f5108
u/logging: Fix first global log message not getting correct level, add comments
2021-03-30 19:23:41 +01:00
Ryan Pavlik
b93b082bd3
aux: Fix doxygen warnings
2021-03-26 17:10:53 -05:00
Ryan Pavlik
4004402c40
aux/vk: Wrap statement defines in do {} while (0)
2021-03-26 17:10:53 -05:00
Ryan Pavlik
3414f62ccf
aux: fix or silence warnings
2021-03-26 17:06:17 -05:00
Ryan Pavlik
b147f2ecd4
a/util: Non-linux implementation of u_file
2021-03-26 17:06:17 -05:00
Ryan Pavlik
c00884e827
cmake: aux/vk depends on aux/os
2021-03-26 17:06:17 -05:00
Ryan Pavlik
4ed3d21b09
a/util: Stub out trace marker on non-Linux for now.
2021-03-26 17:06:17 -05:00
Ryan Pavlik
e5c193bcd0
aux/util: Silence warnings on MSVC
2021-03-26 17:05:56 -05:00
Christoph Haag
a991e66b85
u_vive: Fix debug level of printing acc_bias
2021-03-24 18:45:00 +00:00
Christoph Haag
08db19beca
u_config_json: Change node not found error->info
...
As our config grows it will happen more often that users won't have all possible nodes.
2021-03-24 18:45:00 +00:00
Christoph Haag
8f16118020
u_config_json: Remove bogus "No tracking node" messages
...
* open_tracking_settings() already reports missing tracking nodes.
* open_tracking_settings() can also fail for other reasons
2021-03-24 18:45:00 +00:00
Christoph Haag
45d889e390
u_config_json: Make missing tracking node messages friendlier
2021-03-24 18:45:00 +00:00
Christoph Haag
054850de76
u_config_json: Remove duplicated is_json_ok code
2021-03-24 18:45:00 +00:00
Christoph Haag
2959747221
u_config_json: clarify json not parsed error message
2021-03-24 18:45:00 +00:00
Christoph Haag
f0132eb997
u_config_json: change no config file warning->info
...
Running without a config file is fully supported, no reason to warn users.
2021-03-24 18:45:00 +00:00
Christoph Haag
dad5c6d5d8
u_config_json: Fix saving when no config file exists
...
If json->root was null, it would write a config file containing only (null).
2021-03-24 17:33:46 +01:00
Christoph Haag
2ac4ff84ec
aux/util: Fix comment for u_device_setup_tracking_origins
2021-03-23 19:05:35 +00:00
Jakob Bornecrantz
a71b3d35d1
m/3dof: Add assert for timestamp paranoia
2021-03-17 01:10:02 +00:00
Jakob Bornecrantz
dac5bc0ea5
u/timing: Deal slightly better when timing info appears to time travel
2021-03-10 17:53:36 +00:00
Jakob Bornecrantz
d71ccc39ce
u/timing: Add when_predict_ns on first frame
2021-03-10 17:53:36 +00:00
Christoph Haag
0adcc179c0
xrt: Fix typo in u_file
2021-03-10 01:56:07 +01:00
Jakob Bornecrantz
a40c2e7d50
aux/vk: Load VK_GOOGLE_display_timing functions
2021-03-08 11:20:52 +00:00
Jakob Bornecrantz
049f6be351
u/timing: Add frame timing code
2021-03-08 11:20:52 +00:00
Jakob Bornecrantz
3077660f1d
u/tracing: Add trace marker code
2021-03-08 11:20:52 +00:00
Mateo de Mayo
75e908552f
doc: Fix missing entities from modules documentation
2021-03-06 20:34:35 -03:00
Christoph Haag
44e375dd8a
aux/util: Save tracking override config
2021-03-02 19:43:19 +01:00
Christoph Haag
c077788436
aux/util: Store calibration config non-destructively
...
On save
* delete only nodes pertaining to calibration
* add new calibration nodes
* write config file
2021-03-02 19:43:19 +01:00
Christoph Haag
5e4c62c8aa
aux/util: Move json config parsing to aux/util
2021-03-02 19:43:19 +01:00
Christoph Haag
aa9298f70d
aux/util: Move read_content to u_file
2021-03-02 19:43:19 +01:00
Jakob Bornecrantz
77baa0c6ca
u/ht: Sort build files
2021-02-24 14:33:34 +00:00
Jakob Bornecrantz
7460ae54f4
u/timing: Rename files
2021-02-24 14:33:34 +00:00
Jakob Bornecrantz
b810c2df0a
u/timing: Improve render code, predict when frame should be delivered
2021-02-24 14:33:30 +00:00
Jakob Bornecrantz
55c7690185
u/time: Make defines more readable and add more defines
2021-02-24 13:55:07 +00:00
Jakob Bornecrantz
69eebb49e2
u/time: Use double for time conversion
2021-02-24 04:14:51 +00:00
Ryan Pavlik
b7cc966cb0
aux/vk: Add docs to helpers
2021-02-22 16:50:00 -06:00
Christoph Haag
def0bef533
build/meson: Explicitly depend on generated binding header
...
fixes header not being generated on alpine
2021-02-15 22:04:38 +01:00
Christoph Haag
42996d6b1c
os/hid: Add get_physical_address()
2021-02-12 02:44:00 +01:00
Christoph Haag
2d814dab57
aux/vive: Parse hmd variant and add various model strings
...
Model strings collected from libsurvive, survive_default_devices.c
2021-02-11 20:54:31 +01:00
Christoph Haag
cc81174b70
comp: Fix VkDisplayKHR direct mode build without libx11-xcb
2021-02-10 22:02:30 +01:00
Ryan Pavlik
51704bc2e5
math: Fix doc warnings
2021-02-10 16:09:12 +00:00
Christoph Haag
cfab11355d
u/hand_tracking: Hand Joint flags can only be as valid as hand flags
2021-02-10 02:58:00 +01:00
zhibinw
a5913c7b4f
aux/android:add blank line between functions
2021-02-09 22:44:07 +00:00
zhibinw
14532aceae
aux/android: Make MonadoView focusable optional
2021-02-09 22:44:07 +00:00
zhibinw
6e6a729123
aux/android: Make MonadoView not focusable/touchable
2021-02-09 22:44:07 +00:00
Christoph Haag
00ef724392
aux/vk: Add trace info when memory type is unsupported
2021-02-03 01:44:46 +01:00
Jakob Bornecrantz
5853103820
d/vive: Refactor out vive config code into auxiliary library
...
fix vive_config.h include for survive
2021-02-01 19:56:52 +01:00
Jakob Bornecrantz
eec3446e5b
u/sink: Add Bayer format converter
2021-01-27 16:09:07 +00:00
Jakob Bornecrantz
5b6e6bf6a6
xrt: Add XRT_FORMAT_BAYER_GR8 format
2021-01-27 16:09:07 +00:00
Jakob Bornecrantz
666caaa7ae
u/timing: Fix typo
2021-01-27 14:04:29 +00:00
Jakob Bornecrantz
b1e18af21e
u/distortion: Tidy Vive & Index distortion code
2021-01-25 00:12:03 +00:00
Dan Weatherford
5948e439e9
u/distortion: Fix DPOLY3_SCALED 4th coefficient application
2021-01-25 00:12:03 +00:00
Jakob Bornecrantz
17beaf8aa9
u/distortion: A stab in the dark to try and improve Index chromatic aberration
2021-01-25 00:12:03 +00:00
Jakob Bornecrantz
7d755427e3
u/distortion: Filp order of array access in distortion for Vive & Index
2021-01-25 00:12:03 +00:00
Jakob Bornecrantz
0c2d07808c
u/distortion: Make Vive & Index distortion center per channel
2021-01-25 00:12:03 +00:00
Dan Weatherford
b2569907b5
u/distortion: Fix math error in u_compute_distortion_vive
2021-01-23 14:02:31 -06:00
Jakob Bornecrantz
026fa2cebb
math: Add quat valdiate that only checks within 1% of unit length
2021-01-21 00:33:32 +00:00
Jakob Bornecrantz
797fa5459c
u/rt: Tidy and documment render timing code
2021-01-21 00:32:36 +00:00
Jakob Bornecrantz
3856ae4540
bindings: Fix double slash error
2021-01-21 00:13:42 +00:00
Jakob Bornecrantz
00b71aabd4
bindings: Update copyrights
2021-01-21 00:13:40 +00:00
Christoph Haag
f9c37d51bc
aux/bindings: Add "features" to inputs in bindings.json
...
In our model we have a "subpath" for each hardware input like "/input/trackpad".
Each of these hardware inputs has "features" like "click", "touch", "position", "force".
Ideally each of these "features" is bound to some monado input in the "monado_bindings" dict
but this is not required. bindings.json will know about hardware features even if we don't bind them (yet).
For each of these features bindings.py generates a group of related paths for a single monado binding:
For a monado input XRT_INPUT_???_TRACKPAD these paths would be generated:
/user/hand/left/input/trackpad/x
/user/hand/left/input/trackpad/y
/user/hand/left/input/trackpad
2021-01-20 18:23:09 +01:00
Christoph Haag
46ec938f8a
build: Move bindings build to bindings/subdir
...
The generated files should be in auxiliary/bindings/*.{c,h}. For this to work
meson.build has to be in the bindings/ subdir:
https://github.com/mesonbuild/meson/issues/2320
Move CMakeLists.txt there too for some consistency.
Also fixes the previous include hack.
2021-01-20 18:23:09 +01:00
Christoph Haag
07218c9878
aux: generate b_generated_bindings.{c,h} instead of xrt_generated_bindings.{c,h}
...
Follow up to 543804e53cafa83c52b61f70894696bc4d95fa7c
2021-01-20 18:23:09 +01:00
Christoph Haag
85d3e8bdc3
build/cmake: generate steamvr input profiles
2021-01-20 18:23:09 +01:00
Christoph Haag
334864de7f
build/meson: Generate SteamVR input profiles
2021-01-20 18:23:09 +01:00
Christoph Haag
672c81e809
aux/bindings: Add script to generate steamvr input profiles
2021-01-20 18:23:09 +01:00
Christoph Haag
edd6a4cf70
xrt: Move oxr_binding_data.h to json profile generator
...
Move json profile generator to auxiliary/bindings and make generated_bindings static library.
aux/bindings: Add hardware type
aux/bindings: Add various steamvr specific things to bindings
Paths like "/input/menu/click" are used in SteamVR input profiles.
2021-01-20 18:23:09 +01:00
Jakob Bornecrantz
ae6ac5fc0e
math: Work-around clang-format stuff
2021-01-15 16:38:52 +00:00
Jakob Bornecrantz
2b996f30c4
xrt: Reflow after column change
2021-01-15 13:50:32 +00:00
Lubosz Sarnecki
621a4bbe59
aux/vk: Add formats used in CTS to format string function.
2021-01-14 13:54:19 +01:00
Lubosz Sarnecki
a786401bec
aux/vk: Lock vkCmdPipelineBarrier with pool mutex.
2021-01-14 13:54:19 +01:00
Lubosz Sarnecki
b005f4e2fa
comp/vk: Guard VkCommandBuffer usage with command pool mutex.
...
Lock all queue submits with 2 mutexes using a new vk_locked_submit
function.
2021-01-13 12:42:26 +01:00
Lubosz Sarnecki
fc3b7fef25
comp/vk: Lock command pool calls with a mutex.
...
This patch resolves multithreading issues as detected by the Vulkan
validation when running the OpenXR CTS using OpenGL.
2021-01-13 12:33:15 +01:00
Lubosz Sarnecki
9a9d46b85a
comp/vk: Lock our only VkQueue with a mutex.
...
This resolved mutlithreading issues as seen in the `multithreading` test
of the OpenXR CTS.
This patch fixes the test on Vulkan Android and resolves Vulkan
validation errors when running on Linux with OpenGL.
2021-01-13 12:33:15 +01:00
Christoph Haag
e785053c0a
aux/math: special case delta_s == 0 in m_predic
...
Rather than asserting in the underlying math functions we return the
trivial values for prediction with 0s.
2021-01-11 23:50:01 +00:00
Jakob Bornecrantz
1e4a540bb9
aux/math: Add prediction module
...
For the time being all angular velocities are relative to the space a xrt_space_relation is in.
2021-01-11 23:50:01 +00:00
Christoph Haag
8f3816a5fc
u_time: Make time_s_to_ns take double, not floa
2021-01-11 23:50:01 +00:00
Christoph Haag
726c752db2
comp: Add support for list of optional device extensions
...
If one of the supplied optional extensions is VK_GOOGLE_display_timing and it is
supported by the driver, vk_bundle::has_GOOGLE_display_timing will be set to true.
2021-01-07 19:12:41 +01:00
Christoph Haag
3085e29c97
u/hand_tracking: Curl fingers based on joint, increase total curl angle
...
When making a fist, different joints curl at different angles, reflect
this more directly in the code.
Also increase total curl to make it easier to hold ingame objects.
2021-01-06 13:34:31 +00:00
Christoph Haag
e2c1bc1d16
xrt: Rename hand_origin to hand_pose
...
hand_origin is confusing because it implies it is the origin of the coordinate system the hand is in.
It actually is the hand pose in the "global" coordinate system.
2021-01-06 13:29:36 +00:00
Christoph Haag
c84dbad03e
u/device: Add U_DEVICE_ALLOC_NO_FLAGS
...
Allows using U_DEVICE_ALLOCATE without flags without a cast.
2021-01-06 13:29:36 +00:00
Christoph Haag
7831e38c02
u/device: Assign left/right hand trackers if no controllers are available
...
Previously the left/right role assignment considered only device types
* XRT_DEVICE_TYPE_LEFT_HAND_CONTROLLER
* XRT_DEVICE_TYPE_RIGHT_HAND_CONTROLLER
* XRT_DEVICE_TYPE_ANY_HAND_CONTROLLER
This adds XRT_DEVICE_TYPE_HAND_TRACKER for consideration, but only if none
of the above are present.
2021-01-06 13:29:36 +00:00
Christoph Haag
3848d2be3f
st/oxr: Add env vars for global tracking origin offset
...
This commit is a band aid until a more proper room setup is implemented.
It allows moving the tracking offset for the device roles head, left and right by a fixed value.
A y tracking offset OXR_TRACKING_ORIGIN_OFFSET_Y=1.0 would tell monado that the current tracking
origin is 1 meter above the desired tracking origin, e.g. when the headset was calibrated to a
(0,0,0) position while sitting on table 1 meter above the floor.
This environment variable affects STAGE space, but not LOCAL space.
2021-01-06 13:03:47 +00:00
Lubosz Sarnecki
55d6d57392
aux/math: Port to u_logging.
2020-12-28 13:04:11 +00:00
Lubosz Sarnecki
ba1d966f9f
aux/vk: Port to u_logging.
...
Fix log calls where no valid state struct was provided.
2020-12-28 13:04:11 +00:00
Lubosz Sarnecki
58ecf67515
aux/tracking: Port to u_logging.
2020-12-28 13:04:11 +00:00
Lubosz Sarnecki
e350e42ca9
aux/os/ble_dbus: Use printf padding.
2020-12-28 13:04:11 +00:00
Lubosz Sarnecki
79dde59f7e
aux/os/ble_dbus: Port to u_logging.
2020-12-28 13:04:11 +00:00
Lubosz Sarnecki
853458ed37
xrt: Port commented printfs to u_logging.
2020-12-28 13:04:11 +00:00
Lubosz Sarnecki
adcd0aff1a
u/logging: Implement global log level.
...
Adds a `XRT_LOG` environemnt option.
Example:
```
XRT_LOG=debug
```
2020-12-28 13:04:11 +00:00
Lubosz Sarnecki
8bdff9a61a
u/logging: Implement optional color logging.
...
Check if stderr is a tty.
2020-12-28 13:04:11 +00:00
Lubosz Sarnecki
9ce9fa9238
u/logging: Align log level prefixes.
2020-12-28 13:04:11 +00:00
Jakob Bornecrantz
a5bf14502c
t/hand: Remove per frame printing
2020-12-09 21:03:50 +00:00
Christoph Haag
7b4ac89a8f
t/hand: warn when rectification matrix doesn't match image matrix
2020-12-07 12:30:26 +00:00
Christoph Haag
693cd77ca3
t/hand: Add comment that rectification is expensive
2020-12-07 12:30:26 +00:00
Christoph Haag
e480352cee
t/hand: Add hand tracking module
2020-12-07 12:30:26 +00:00
Ryan Pavlik
90e307bf8a
util: Port logging to OutputDebugString on Windows
2020-12-06 23:07:05 +00:00
Lubosz Sarnecki
37e87d1942
android/MonadoView: Make native pointer optional.
2020-12-01 18:05:32 +01:00
Lubosz Sarnecki
0a6bfe6d96
aux/android_globals: Provide API to store a native window globally.
2020-12-01 18:05:32 +01:00
Lubosz Sarnecki
020df327fa
MonadoView: Don't be a Hilt view. Resolve exception.
...
Resolves:
java.lang.IllegalStateException: class org.freedesktop.monado.auxiliary.MonadoView, Hilt view must be attached to an @AndroidEntryPoint Fragment or Activity.
2020-12-01 18:05:32 +01:00
Ryan Pavlik
94d747cac9
aux/android: Create an interface for handling foreground service notification
2020-12-01 18:05:32 +01:00
Ryan Pavlik
2fe699d7c1
xrt/android: Actually start using dependency injection in Java/Kotlin code.
2020-12-01 18:05:32 +01:00
Ryan Pavlik
885dd1d4d5
gradle: Handle kotlin in multiple parts of the build
2020-12-01 18:05:32 +01:00
Ryan Pavlik
b2f751ae99
aux/android: More null checks
2020-12-01 18:05:31 +01:00
Ryan Pavlik
635542f905
gradle: Break release build on a // STOPSHIP comment
2020-12-01 18:05:31 +01:00
Ryan Pavlik
23e01fc656
gradle: Factor out the dependency versions to a build-wide variable
2020-12-01 18:05:31 +01:00
Lubosz Sarnecki
4d45bfeb1b
cmake: Fix Android linking error
2020-12-01 18:05:31 +01:00
Lubosz Sarnecki
c0ab34a355
aux/android: Implement display metrics acquisition.
2020-12-01 17:36:15 +01:00
Jakob Bornecrantz
6fc0e1cda5
u/sink_converter: Silence warning
2020-11-30 17:52:58 +00:00
Jakob Bornecrantz
242faf9b60
u/sink_converter: Refactor allocation function a bit more
2020-11-30 17:52:58 +00:00
Christoph Haag
3b992a4508
u/sink_converter: Remove u_sink_converter::frame
2020-11-30 15:38:21 +00:00
Christoph Haag
5a4df61885
u/sink_converter: Clarify dst frame of format conversions
2020-11-30 15:38:19 +00:00
Christoph Haag
49587412bd
u/sink_converter: clarify ensure_data()
2020-11-30 15:38:15 +00:00
Christoph Haag
3d3361706c
os/threading: Fix typo in comment
2020-11-30 15:38:07 +00:00
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