The open source OpenXR runtime
0
fork

Configure Feed

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

xrt: Remove old unused instance functions

-144
-67
src/xrt/include/xrt/xrt_instance.h
··· 86 86 struct xrt_system_compositor **out_xsysc); 87 87 88 88 /*! 89 - * Returns the devices of the system represented as @ref xrt_device. 90 - * 91 - * Should only be called once. 92 - * 93 - * @note Code consuming this interface should use xrt_instance_select() 94 - * 95 - * @param xinst Pointer to self 96 - * @param[in,out] xdevs Pointer to xrt_device array. Array elements will 97 - * be populated. 98 - * @param[in] xdev_count The capacity of the @p xdevs array. 99 - * 100 - * @return 0 on success, <0 on error. 101 - * 102 - * @see xrt_prober::probe, xrt_prober::select 103 - */ 104 - int (*select)(struct xrt_instance *xinst, struct xrt_device **xdevs, size_t xdev_count); 105 - 106 - /*! 107 - * Creates a @ref xrt_system_compositor. 108 - * 109 - * Should only be called once. 110 - * 111 - * @note Code consuming this interface should use 112 - * xrt_instance_create_system_compositor() 113 - * 114 - * @param xinst Pointer to self 115 - * @param[in] xdev Device to use for creating the compositor 116 - * @param[out] out_xsc Pointer to create_system_compositor pointer, will 117 - * be populated. 118 - * 119 - * @return 0 on success, <0 on error. 120 - * 121 - * @see xrt_gfx_provider_create_native 122 - */ 123 - int (*create_system_compositor)(struct xrt_instance *xinst, 124 - struct xrt_device *xdev, 125 - struct xrt_system_compositor **out_xsc); 126 - 127 - /*! 128 89 * Get the instance @ref xrt_prober, if any. 129 90 * 130 91 * If the instance is not using an @ref xrt_prober, it may return null. ··· 161 122 */ 162 123 struct xrt_instance_info instance_info; 163 124 }; 164 - 165 - /*! 166 - * @copydoc xrt_instance::select 167 - * 168 - * Helper for calling through the function pointer. 169 - * 170 - * @public @memberof xrt_instance 171 - */ 172 - static inline int 173 - xrt_instance_select(struct xrt_instance *xinst, struct xrt_device **xdevs, size_t xdev_count) 174 - { 175 - return xinst->select(xinst, xdevs, xdev_count); 176 - } 177 - 178 - /*! 179 - * @copydoc xrt_instance::create_system_compositor 180 - * 181 - * Helper for calling through the function pointer. 182 - * 183 - * @public @memberof xrt_instance 184 - */ 185 - static inline int 186 - xrt_instance_create_system_compositor(struct xrt_instance *xinst, 187 - struct xrt_device *xdev, 188 - struct xrt_system_compositor **out_xsc) 189 - { 190 - return xinst->create_system_compositor(xinst, xdev, out_xsc); 191 - } 192 125 193 126 /*! 194 127 * @copydoc xrt_instance::create_system
-34
src/xrt/ipc/client/ipc_client_instance.c
··· 187 187 * 188 188 */ 189 189 190 - static int 191 - ipc_client_instance_select(struct xrt_instance *xinst, struct xrt_device **xdevs, size_t xdev_count) 192 - { 193 - struct ipc_client_instance *ii = ipc_client_instance(xinst); 194 - 195 - if (xdev_count < 1) { 196 - return -1; 197 - } 198 - 199 - // @todo What about ownership? 200 - for (size_t i = 0; i < xdev_count && i < ii->xdev_count; i++) { 201 - xdevs[i] = ii->xdevs[i]; 202 - } 203 - 204 - return 0; 205 - } 206 - 207 - static int 208 - ipc_client_instance_create_system_compositor(struct xrt_instance *xinst, 209 - struct xrt_device *xdev, 210 - struct xrt_system_compositor **out_xsysc) 211 - { 212 - struct ipc_client_instance *ii = ipc_client_instance(xinst); 213 - 214 - xrt_result_t xret = create_system_compositor(ii, xdev, out_xsysc); 215 - if (xret != XRT_SUCCESS) { 216 - return -1; 217 - } 218 - 219 - return 0; 220 - } 221 - 222 190 static xrt_result_t 223 191 ipc_client_instance_create_system(struct xrt_instance *xinst, 224 192 struct xrt_system_devices **out_xsysd, ··· 327 295 { 328 296 struct ipc_client_instance *ii = U_TYPED_CALLOC(struct ipc_client_instance); 329 297 ii->base.create_system = ipc_client_instance_create_system; 330 - ii->base.select = ipc_client_instance_select; 331 - ii->base.create_system_compositor = ipc_client_instance_create_system_compositor; 332 298 ii->base.get_prober = ipc_client_instance_get_prober; 333 299 ii->base.destroy = ipc_client_instance_destroy; 334 300
-18
src/xrt/targets/common/target_instance.c
··· 23 23 * 24 24 */ 25 25 26 - static int 27 - t_instance_create_system_compositor(struct xrt_instance *xinst, 28 - struct xrt_device *xdev, 29 - struct xrt_system_compositor **out_xsysc) 30 - { 31 - struct xrt_system_compositor *xsysc = NULL; 32 - xrt_result_t ret = xrt_gfx_provider_create_system(xdev, &xsysc); 33 - if (ret < 0 || xsysc == NULL) { 34 - return -1; 35 - } 36 - 37 - *out_xsysc = xsysc; 38 - 39 - return 0; 40 - } 41 - 42 26 static xrt_result_t 43 27 t_instance_create_system(struct xrt_instance *xinst, 44 28 struct xrt_system_devices **out_xsysd, ··· 98 82 99 83 struct t_instance *tinst = U_TYPED_CALLOC(struct t_instance); 100 84 tinst->base.create_system = t_instance_create_system; 101 - tinst->base.select = t_instance_select; 102 - tinst->base.create_system_compositor = t_instance_create_system_compositor; 103 85 tinst->base.get_prober = t_instance_get_prober; 104 86 tinst->base.destroy = t_instance_destroy; 105 87 tinst->xp = xp;
-12
src/xrt/targets/common/target_instance_no_comp.c
··· 14 14 #include <assert.h> 15 15 16 16 17 - static int 18 - t_instance_create_system_compositor_stub(struct xrt_instance *xinst, 19 - struct xrt_device *xdev, 20 - struct xrt_system_compositor **out_xsysc) 21 - { 22 - *out_xsysc = NULL; 23 - 24 - return -1; 25 - } 26 - 27 17 static xrt_result_t 28 18 t_instance_create_system(struct xrt_instance *xinst, 29 19 struct xrt_system_devices **out_xsysd, ··· 70 60 71 61 struct t_instance *tinst = U_TYPED_CALLOC(struct t_instance); 72 62 tinst->base.create_system = t_instance_create_system; 73 - tinst->base.select = t_instance_select; 74 - tinst->base.create_system_compositor = t_instance_create_system_compositor_stub; 75 63 tinst->base.get_prober = t_instance_get_prober; 76 64 tinst->base.destroy = t_instance_destroy; 77 65 tinst->xp = xp;
-13
src/xrt/targets/common/target_instance_parts.h
··· 49 49 */ 50 50 51 51 static int 52 - t_instance_select(struct xrt_instance *xinst, struct xrt_device **xdevs, size_t xdev_count) 53 - { 54 - struct t_instance *tinst = t_instance(xinst); 55 - 56 - int ret = xrt_prober_probe(tinst->xp); 57 - if (ret < 0) { 58 - return ret; 59 - } 60 - 61 - return xrt_prober_select(tinst->xp, xdevs, xdev_count); 62 - } 63 - 64 - static int 65 52 t_instance_get_prober(struct xrt_instance *xinst, struct xrt_prober **out_xp) 66 53 { 67 54 struct t_instance *tinst = t_instance(xinst);