The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ipc: make all IPC input aggregates const;

authored by

bjorn and committed by
Ryan Pavlik
91993699 b08797a4

+26 -23
+1 -1
src/xrt/drivers/multi_wrapper/multi.c
··· 175 175 } 176 176 177 177 static void 178 - set_output(struct xrt_device *xdev, enum xrt_output_name name, union xrt_output_value *value) 178 + set_output(struct xrt_device *xdev, enum xrt_output_name name, const union xrt_output_value *value) 179 179 { 180 180 struct multi_device *d = (struct multi_device *)xdev; 181 181 struct xrt_device *target = d->tracking_override.target;
+1 -1
src/xrt/drivers/ohmd/oh_device.c
··· 314 314 } 315 315 316 316 static void 317 - oh_device_set_output(struct xrt_device *xdev, enum xrt_output_name name, union xrt_output_value *value) 317 + oh_device_set_output(struct xrt_device *xdev, enum xrt_output_name name, const union xrt_output_value *value) 318 318 { 319 319 struct oh_device *ohd = oh_device(xdev); 320 320 (void)ohd;
+1 -1
src/xrt/drivers/psmv/psmv_driver.c
··· 931 931 } 932 932 933 933 static void 934 - psmv_device_set_output(struct xrt_device *xdev, enum xrt_output_name name, union xrt_output_value *value) 934 + psmv_device_set_output(struct xrt_device *xdev, enum xrt_output_name name, const union xrt_output_value *value) 935 935 { 936 936 struct psmv_device *psmv = psmv_device(xdev); 937 937
+1 -1
src/xrt/drivers/qwerty/qwerty_device.c
··· 125 125 } 126 126 127 127 static void 128 - qwerty_set_output(struct xrt_device *xd, enum xrt_output_name name, union xrt_output_value *value) 128 + qwerty_set_output(struct xrt_device *xd, enum xrt_output_name name, const union xrt_output_value *value) 129 129 { 130 130 struct qwerty_device *qd = qwerty_device(xd); 131 131 float frequency = value->vibration.frequency;
+1 -1
src/xrt/drivers/remote/r_device.c
··· 183 183 } 184 184 185 185 static void 186 - r_device_set_output(struct xrt_device *xdev, enum xrt_output_name name, union xrt_output_value *value) 186 + r_device_set_output(struct xrt_device *xdev, enum xrt_output_name name, const union xrt_output_value *value) 187 187 { 188 188 struct r_device *rd = r_device(xdev); 189 189 (void)rd;
+1 -1
src/xrt/drivers/remote/r_hmd.c
··· 98 98 } 99 99 100 100 static void 101 - r_hmd_set_output(struct xrt_device *xdev, enum xrt_output_name name, union xrt_output_value *value) 101 + r_hmd_set_output(struct xrt_device *xdev, enum xrt_output_name name, const union xrt_output_value *value) 102 102 { 103 103 // Empty 104 104 }
+3 -1
src/xrt/drivers/survive/survive_driver.c
··· 365 365 } 366 366 367 367 static void 368 - survive_controller_device_set_output(struct xrt_device *xdev, enum xrt_output_name name, union xrt_output_value *value) 368 + survive_controller_device_set_output(struct xrt_device *xdev, 369 + enum xrt_output_name name, 370 + const union xrt_output_value *value) 369 371 { 370 372 struct survive_device *survive = (struct survive_device *)xdev; 371 373
+4 -2
src/xrt/drivers/vive/vive_controller.c
··· 418 418 } 419 419 420 420 static int 421 - vive_controller_haptic_pulse(struct vive_controller_device *d, union xrt_output_value *value) 421 + vive_controller_haptic_pulse(struct vive_controller_device *d, const union xrt_output_value *value) 422 422 { 423 423 float duration_seconds; 424 424 if (value->vibration.duration_ns == XRT_MIN_HAPTIC_DURATION) { ··· 474 474 } 475 475 476 476 static void 477 - vive_controller_device_set_output(struct xrt_device *xdev, enum xrt_output_name name, union xrt_output_value *value) 477 + vive_controller_device_set_output(struct xrt_device *xdev, 478 + enum xrt_output_name name, 479 + const union xrt_output_value *value) 478 480 { 479 481 struct vive_controller_device *d = vive_controller_device(xdev); 480 482
+1 -1
src/xrt/drivers/wmr/wmr_bt_controller.c
··· 296 296 } 297 297 298 298 static void 299 - wmr_bt_controller_set_output(struct xrt_device *xdev, enum xrt_output_name name, union xrt_output_value *value) 299 + wmr_bt_controller_set_output(struct xrt_device *xdev, enum xrt_output_name name, const union xrt_output_value *value) 300 300 { 301 301 DRV_TRACE_MARKER(); 302 302
+2 -3
src/xrt/include/xrt/xrt_device.h
··· 328 328 * @param[in] xdev The device. 329 329 * @param[in] name The output component name to set. 330 330 * @param[in] value The value to set the output to. 331 - * @todo make this param a pointer to const. 332 331 * @see xrt_output_name 333 332 */ 334 - void (*set_output)(struct xrt_device *xdev, enum xrt_output_name name, union xrt_output_value *value); 333 + void (*set_output)(struct xrt_device *xdev, enum xrt_output_name name, const union xrt_output_value *value); 335 334 336 335 /*! 337 336 * @brief Get the per-view pose in relation to the view space. ··· 454 453 * @public @memberof xrt_device 455 454 */ 456 455 static inline void 457 - xrt_device_set_output(struct xrt_device *xdev, enum xrt_output_name name, union xrt_output_value *value) 456 + xrt_device_set_output(struct xrt_device *xdev, enum xrt_output_name name, const union xrt_output_value *value) 458 457 { 459 458 xdev->set_output(xdev, name, value); 460 459 }
+1 -1
src/xrt/ipc/client/ipc_client_device.c
··· 133 133 } 134 134 135 135 static void 136 - ipc_client_device_set_output(struct xrt_device *xdev, enum xrt_output_name name, union xrt_output_value *value) 136 + ipc_client_device_set_output(struct xrt_device *xdev, enum xrt_output_name name, const union xrt_output_value *value) 137 137 { 138 138 struct ipc_client_device *icd = ipc_client_device(xdev); 139 139
+3 -3
src/xrt/ipc/server/ipc_server_handler.c
··· 654 654 } 655 655 656 656 xrt_result_t 657 - ipc_handle_system_set_client_info(volatile struct ipc_client_state *ics, struct ipc_app_state *client_desc) 657 + ipc_handle_system_set_client_info(volatile struct ipc_client_state *ics, const struct ipc_app_state *client_desc) 658 658 { 659 659 ics->client_state.info = client_desc->info; 660 660 ics->client_state.pid = client_desc->pid; ··· 815 815 xrt_result_t 816 816 ipc_handle_swapchain_import(volatile struct ipc_client_state *ics, 817 817 const struct xrt_swapchain_create_info *info, 818 - struct ipc_arg_swapchain_from_native *args, 818 + const struct ipc_arg_swapchain_from_native *args, 819 819 uint32_t *out_id, 820 820 const xrt_graphics_buffer_handle_t *handles, 821 821 uint32_t handle_count) ··· 1135 1135 ipc_handle_device_set_output(volatile struct ipc_client_state *ics, 1136 1136 uint32_t id, 1137 1137 enum xrt_output_name name, 1138 - union xrt_output_value *value) 1138 + const union xrt_output_value *value) 1139 1139 { 1140 1140 // To make the code a bit more readable. 1141 1141 uint32_t device_id = id;
+1 -1
src/xrt/ipc/shared/ipcproto/common.py
··· 69 69 def get_func_argument_in(self): 70 70 """Get the type and name of this argument as an input parameter.""" 71 71 if self.is_aggregate: 72 - return self.typename + " *" + self.name 72 + return "const " + self.typename + " *" + self.name 73 73 else: 74 74 return self.typename + " " + self.name 75 75
+5 -5
src/xrt/ipc/shared/proto.json
··· 58 58 59 59 "session_create": { 60 60 "in": [ 61 - {"name": "overlay_info", "type": "const struct xrt_session_info"} 61 + {"name": "overlay_info", "type": "struct xrt_session_info"} 62 62 ] 63 63 }, 64 64 ··· 132 132 133 133 "swapchain_get_properties": { 134 134 "in": [ 135 - {"name": "info", "type": "const struct xrt_swapchain_create_info"} 135 + {"name": "info", "type": "struct xrt_swapchain_create_info"} 136 136 ], 137 137 "out": [ 138 138 {"name": "xsccp", "type": "struct xrt_swapchain_create_properties"} ··· 141 141 142 142 "swapchain_create": { 143 143 "in": [ 144 - {"name": "info", "type": "const struct xrt_swapchain_create_info"} 144 + {"name": "info", "type": "struct xrt_swapchain_create_info"} 145 145 ], 146 146 "out": [ 147 147 {"name": "id", "type": "uint32_t"}, ··· 154 154 155 155 "swapchain_import": { 156 156 "in": [ 157 - {"name": "info", "type": "const struct xrt_swapchain_create_info"}, 157 + {"name": "info", "type": "struct xrt_swapchain_create_info"}, 158 158 {"name": "args", "type": "struct ipc_arg_swapchain_from_native"} 159 159 ], 160 160 "out": [ ··· 238 238 "device_get_view_poses_2": { 239 239 "in": [ 240 240 {"name": "id", "type": "uint32_t"}, 241 - {"name": "fallback_eye_relation", "type": "const struct xrt_vec3"}, 241 + {"name": "fallback_eye_relation", "type": "struct xrt_vec3"}, 242 242 {"name": "at_timestamp_ns", "type": "uint64_t"} 243 243 ], 244 244 "out": [