@@ -241,6 +241,10 @@ typedef enum ur_structure_type_t {
241
241
UR_STRUCTURE_TYPE_KERNEL_ARG_LOCAL_PROPERTIES = 33, ///< ::ur_kernel_arg_local_properties_t
242
242
UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC = 0x1000, ///< ::ur_exp_command_buffer_desc_t
243
243
UR_STRUCTURE_TYPE_EXP_SAMPLER_MIP_PROPERTIES = 0x2000, ///< ::ur_exp_sampler_mip_properties_t
244
+ UR_STRUCTURE_TYPE_EXP_INTEROP_MEMORY_DESC = 0x2001, ///< ::ur_exp_interop_memory_desc_t
245
+ UR_STRUCTURE_TYPE_EXP_INTEROP_SEMAPHORE_DESC = 0x2002, ///< ::ur_exp_interop_semaphore_desc_t
246
+ UR_STRUCTURE_TYPE_EXP_FILE_DESCRIPTOR = 0x2003, ///< ::ur_exp_file_descriptor_t
247
+ UR_STRUCTURE_TYPE_EXP_WIN32_HANDLE = 0x2004, ///< ::ur_exp_win32_handle_t
244
248
/// @cond
245
249
UR_STRUCTURE_TYPE_FORCE_UINT32 = 0x7fffffff
246
250
/// @endcond
@@ -6616,6 +6620,26 @@ typedef enum ur_exp_image_copy_flag_t {
6616
6620
/// @brief Bit Mask for validating ur_exp_image_copy_flags_t
6617
6621
#define UR_EXP_IMAGE_COPY_FLAGS_MASK 0xfffffff8
6618
6622
6623
+ ///////////////////////////////////////////////////////////////////////////////
6624
+ /// @brief File descriptor
6625
+ typedef struct ur_exp_file_descriptor_t {
6626
+ ur_structure_type_t stype; ///< [in] type of this structure, must be
6627
+ ///< ::UR_STRUCTURE_TYPE_EXP_FILE_DESCRIPTOR
6628
+ const void *pNext; ///< [in][optional] pointer to extension-specific structure
6629
+ int fd; ///< [in] A file descriptor used for Linux and & MacOS operating systems.
6630
+
6631
+ } ur_exp_file_descriptor_t;
6632
+
6633
+ ///////////////////////////////////////////////////////////////////////////////
6634
+ /// @brief Windows specific file handle
6635
+ typedef struct ur_exp_win32_handle_t {
6636
+ ur_structure_type_t stype; ///< [in] type of this structure, must be
6637
+ ///< ::UR_STRUCTURE_TYPE_EXP_WIN32_HANDLE
6638
+ const void *pNext; ///< [in][optional] pointer to extension-specific structure
6639
+ void *handle; ///< [in] A win32 file handle.
6640
+
6641
+ } ur_exp_win32_handle_t;
6642
+
6619
6643
///////////////////////////////////////////////////////////////////////////////
6620
6644
/// @brief Describes mipmap sampler properties
6621
6645
///
@@ -6636,6 +6660,24 @@ typedef struct ur_exp_sampler_mip_properties_t {
6636
6660
6637
6661
} ur_exp_sampler_mip_properties_t;
6638
6662
6663
+ ///////////////////////////////////////////////////////////////////////////////
6664
+ /// @brief Describes an interop memory resource descriptor
6665
+ typedef struct ur_exp_interop_memory_desc_t {
6666
+ ur_structure_type_t stype; ///< [in] type of this structure, must be
6667
+ ///< ::UR_STRUCTURE_TYPE_EXP_INTEROP_MEMORY_DESC
6668
+ const void *pNext; ///< [in][optional] pointer to extension-specific structure
6669
+
6670
+ } ur_exp_interop_memory_desc_t;
6671
+
6672
+ ///////////////////////////////////////////////////////////////////////////////
6673
+ /// @brief Describes an interop semaphore resource descriptor
6674
+ typedef struct ur_exp_interop_semaphore_desc_t {
6675
+ ur_structure_type_t stype; ///< [in] type of this structure, must be
6676
+ ///< ::UR_STRUCTURE_TYPE_EXP_INTEROP_SEMAPHORE_DESC
6677
+ const void *pNext; ///< [in][optional] pointer to extension-specific structure
6678
+
6679
+ } ur_exp_interop_semaphore_desc_t;
6680
+
6639
6681
///////////////////////////////////////////////////////////////////////////////
6640
6682
/// @brief USM allocate pitched memory
6641
6683
///
@@ -7034,17 +7076,18 @@ urBindlessImagesMipmapFreeExp(
7034
7076
/// + `NULL == hContext`
7035
7077
/// + `NULL == hDevice`
7036
7078
/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
7079
+ /// + `NULL == interopMemDesc`
7037
7080
/// + `NULL == phInteropMem`
7038
7081
/// - ::UR_RESULT_ERROR_INVALID_CONTEXT
7039
7082
/// - ::UR_RESULT_ERROR_INVALID_VALUE
7040
7083
/// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT
7041
7084
UR_APIEXPORT ur_result_t UR_APICALL
7042
7085
urBindlessImagesImportOpaqueFDExp(
7043
- ur_context_handle_t hContext, ///< [in] handle of the context object
7044
- ur_device_handle_t hDevice, ///< [in] handle of the device object
7045
- size_t size, ///< [in] size of the external memory
7046
- uint32_t fileDescriptor, ///< [in] the file descriptor
7047
- ur_exp_interop_mem_handle_t *phInteropMem ///< [out] interop memory handle to the external memory
7086
+ ur_context_handle_t hContext, ///< [in] handle of the context object
7087
+ ur_device_handle_t hDevice, ///< [in] handle of the device object
7088
+ size_t size, ///< [in] size of the external memory
7089
+ ur_exp_interop_memory_desc_t *interopMemDesc, ///< [in] the interop memory descriptor
7090
+ ur_exp_interop_mem_handle_t *phInteropMem ///< [out] interop memory handle to the external memory
7048
7091
);
7049
7092
7050
7093
///////////////////////////////////////////////////////////////////////////////
@@ -7121,15 +7164,16 @@ urBindlessImagesReleaseInteropExp(
7121
7164
/// + `NULL == hContext`
7122
7165
/// + `NULL == hDevice`
7123
7166
/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
7124
- /// + `NULL == phInteropSemaphoreHandle`
7167
+ /// + `NULL == interopSemaphoreDesc`
7168
+ /// + `NULL == phInteropSemaphore`
7125
7169
/// - ::UR_RESULT_ERROR_INVALID_CONTEXT
7126
7170
/// - ::UR_RESULT_ERROR_INVALID_VALUE
7127
7171
UR_APIEXPORT ur_result_t UR_APICALL
7128
7172
urBindlessImagesImportExternalSemaphoreOpaqueFDExp(
7129
- ur_context_handle_t hContext, ///< [in] handle of the context object
7130
- ur_device_handle_t hDevice, ///< [in] handle of the device object
7131
- uint32_t fileDescriptor, ///< [in] the file descriptor
7132
- ur_exp_interop_semaphore_handle_t *phInteropSemaphoreHandle ///< [out] interop semaphore handle to the external semaphore
7173
+ ur_context_handle_t hContext, ///< [in] handle of the context object
7174
+ ur_device_handle_t hDevice, ///< [in] handle of the device object
7175
+ ur_exp_interop_semaphore_desc_t *interopSemaphoreDesc, ///< [in] the interop semaphore descriptor
7176
+ ur_exp_interop_semaphore_handle_t *phInteropSemaphore ///< [out] interop semaphore handle to the external semaphore
7133
7177
);
7134
7178
7135
7179
///////////////////////////////////////////////////////////////////////////////
@@ -9199,7 +9243,7 @@ typedef struct ur_bindless_images_import_opaque_fd_exp_params_t {
9199
9243
ur_context_handle_t *phContext;
9200
9244
ur_device_handle_t *phDevice;
9201
9245
size_t *psize;
9202
- uint32_t *pfileDescriptor ;
9246
+ ur_exp_interop_memory_desc_t **pinteropMemDesc ;
9203
9247
ur_exp_interop_mem_handle_t **pphInteropMem;
9204
9248
} ur_bindless_images_import_opaque_fd_exp_params_t;
9205
9249
@@ -9233,8 +9277,8 @@ typedef struct ur_bindless_images_release_interop_exp_params_t {
9233
9277
typedef struct ur_bindless_images_import_external_semaphore_opaque_fd_exp_params_t {
9234
9278
ur_context_handle_t *phContext;
9235
9279
ur_device_handle_t *phDevice;
9236
- uint32_t *pfileDescriptor ;
9237
- ur_exp_interop_semaphore_handle_t **pphInteropSemaphoreHandle ;
9280
+ ur_exp_interop_semaphore_desc_t **pinteropSemaphoreDesc ;
9281
+ ur_exp_interop_semaphore_handle_t **pphInteropSemaphore ;
9238
9282
} ur_bindless_images_import_external_semaphore_opaque_fd_exp_params_t;
9239
9283
9240
9284
///////////////////////////////////////////////////////////////////////////////
0 commit comments