The open source OpenXR runtime
0
fork

Configure Feed

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

xrt: Tidy compute_distortion function

+17 -15
+2 -2
src/xrt/auxiliary/util/u_distortion_mesh.c
··· 24 24 DEBUG_GET_ONCE_NUM_OPTION(mesh_size, "XRT_MESH_SIZE", 64) 25 25 26 26 27 - typedef bool (*func_calc)(struct xrt_device *xdev, int view, float u, float v, struct xrt_uv_triplet *result); 27 + typedef bool (*func_calc)(struct xrt_device *xdev, uint32_t view, float u, float v, struct xrt_uv_triplet *result); 28 28 29 29 static int 30 30 index_for(int row, int col, uint32_t stride, uint32_t offset) ··· 426 426 */ 427 427 428 428 bool 429 - u_distortion_mesh_none(struct xrt_device *xdev, int view, float u, float v, struct xrt_uv_triplet *result) 429 + u_distortion_mesh_none(struct xrt_device *xdev, uint32_t view, float u, float v, struct xrt_uv_triplet *result) 430 430 { 431 431 return u_compute_distortion_none(u, v, result); 432 432 }
+1 -1
src/xrt/auxiliary/util/u_distortion_mesh.h
··· 178 178 * @ingroup aux_distortion 179 179 */ 180 180 bool 181 - u_distortion_mesh_none(struct xrt_device *xdev, int view, float u, float v, struct xrt_uv_triplet *result); 181 + u_distortion_mesh_none(struct xrt_device *xdev, uint32_t view, float u, float v, struct xrt_uv_triplet *result); 182 182 183 183 184 184 /*
+2 -1
src/xrt/drivers/android/android_sensors.c
··· 198 198 */ 199 199 200 200 static bool 201 - android_device_compute_distortion(struct xrt_device *xdev, int view, float u, float v, struct xrt_uv_triplet *result) 201 + android_device_compute_distortion( 202 + struct xrt_device *xdev, uint32_t view, float u, float v, struct xrt_uv_triplet *result) 202 203 { 203 204 struct android_device *d = android_device(xdev); 204 205 return u_compute_distortion_cardboard(&d->cardboard.values[view], u, v, result);
+1 -1
src/xrt/drivers/multi_wrapper/multi.c
··· 199 199 } 200 200 201 201 static bool 202 - compute_distortion(struct xrt_device *xdev, int view, float u, float v, struct xrt_uv_triplet *result) 202 + compute_distortion(struct xrt_device *xdev, uint32_t view, float u, float v, struct xrt_uv_triplet *result) 203 203 { 204 204 struct multi_device *d = (struct multi_device *)xdev; 205 205 struct xrt_device *target = d->tracking_override.target;
+1 -1
src/xrt/drivers/north_star/ns_hmd.c
··· 414 414 } 415 415 416 416 bool 417 - ns_mesh_calc(struct xrt_device *xdev, int view, float u, float v, struct xrt_uv_triplet *result) 417 + ns_mesh_calc(struct xrt_device *xdev, uint32_t view, float u, float v, struct xrt_uv_triplet *result) 418 418 { 419 419 struct ns_hmd *ns = ns_hmd(xdev); 420 420 NS_DEBUG(ns, "Called!");
+1 -1
src/xrt/drivers/psvr/psvr_device.c
··· 1016 1016 } 1017 1017 1018 1018 static bool 1019 - psvr_compute_distortion(struct xrt_device *xdev, int view, float u, float v, struct xrt_uv_triplet *result) 1019 + psvr_compute_distortion(struct xrt_device *xdev, uint32_t view, float u, float v, struct xrt_uv_triplet *result) 1020 1020 { 1021 1021 struct psvr_device *psvr = psvr_device(xdev); 1022 1022
+1 -1
src/xrt/drivers/rift_s/rift_s_hmd.c
··· 168 168 } 169 169 170 170 static bool 171 - rift_s_compute_distortion(struct xrt_device *xdev, int view, float u, float v, struct xrt_uv_triplet *result) 171 + rift_s_compute_distortion(struct xrt_device *xdev, uint32_t view, float u, float v, struct xrt_uv_triplet *result) 172 172 { 173 173 struct rift_s_hmd *hmd = (struct rift_s_hmd *)(xdev); 174 174 return u_compute_distortion_panotools(&hmd->distortion_vals[view], u, v, result);
+1 -1
src/xrt/drivers/survive/survive_driver.c
··· 853 853 } 854 854 855 855 static bool 856 - compute_distortion(struct xrt_device *xdev, int view, float u, float v, struct xrt_uv_triplet *result) 856 + compute_distortion(struct xrt_device *xdev, uint32_t view, float u, float v, struct xrt_uv_triplet *result) 857 857 { 858 858 struct survive_device *d = (struct survive_device *)xdev; 859 859 return u_compute_distortion_vive(&d->hmd.config.distortion[view], u, v, result);
+1 -1
src/xrt/drivers/vive/vive_device.c
··· 833 833 } 834 834 835 835 static bool 836 - compute_distortion(struct xrt_device *xdev, int view, float u, float v, struct xrt_uv_triplet *result) 836 + compute_distortion(struct xrt_device *xdev, uint32_t view, float u, float v, struct xrt_uv_triplet *result) 837 837 { 838 838 XRT_TRACE_MARKER(); 839 839
+1 -1
src/xrt/drivers/wmr/wmr_hmd.c
··· 1148 1148 } 1149 1149 1150 1150 static bool 1151 - compute_distortion_wmr(struct xrt_device *xdev, int view, float u, float v, struct xrt_uv_triplet *result) 1151 + compute_distortion_wmr(struct xrt_device *xdev, uint32_t view, float u, float v, struct xrt_uv_triplet *result) 1152 1152 { 1153 1153 DRV_TRACE_MARKER(); 1154 1154
+5 -4
src/xrt/include/xrt/xrt_device.h
··· 393 393 * @param[out] out_result corresponding u,v pairs for all three color channels. 394 394 */ 395 395 bool (*compute_distortion)( 396 - struct xrt_device *xdev, int view, float u, float v, struct xrt_uv_triplet *out_result); 396 + struct xrt_device *xdev, uint32_t view, float u, float v, struct xrt_uv_triplet *out_result); 397 397 398 398 /*! 399 399 * Destroy device. ··· 498 498 * 499 499 * @public @memberof xrt_device 500 500 */ 501 - static inline void 502 - xrt_device_compute_distortion(struct xrt_device *xdev, int view, float u, float v, struct xrt_uv_triplet *out_result) 501 + static inline bool 502 + xrt_device_compute_distortion( 503 + struct xrt_device *xdev, uint32_t view, float u, float v, struct xrt_uv_triplet *out_result) 503 504 { 504 - xdev->compute_distortion(xdev, view, u, v, out_result); 505 + return xdev->compute_distortion(xdev, view, u, v, out_result); 505 506 } 506 507 507 508 /*!