@@ -323,6 +323,21 @@ def __str__(self):
323323 return str (ur_platform_backend_v (self .value ))
324324
325325
326+ ###############################################################################
327+ ## @brief Extension name maximum length.
328+ UR_MAX_EXTENSION_NAME_LENGTH = 256
329+
330+ ###############################################################################
331+ ## @brief Extension properties.
332+ class ur_extension_properties_t (Structure ):
333+ _fields_ = [
334+ ("stype" , ur_structure_type_t ), ## [in] type of this structure, must be
335+ ## ::UR_STRUCTURE_TYPE_EXTENSION_PROPERTIES
336+ ("pNext" , c_void_p ), ## [in,out][optional] pointer to extension-specific structure
337+ ("name" , c_char * UR_MAX_EXTENSION_NAME_LENGTH ), ## [in] null-terminated extension name.
338+ ("version" , c_ulong ) ## [in] version of the extension using ::UR_MAKE_VERSION.
339+ ]
340+
326341###############################################################################
327342## @brief Target identification strings for
328343## ::ur_device_binary_t.pDeviceTargetSpec
@@ -1752,6 +1767,13 @@ def __str__(self):
17521767else :
17531768 _urPlatformGetBackendOption_t = CFUNCTYPE ( ur_result_t , ur_platform_handle_t , c_char_p , POINTER (c_char_p ) )
17541769
1770+ ###############################################################################
1771+ ## @brief Function-pointer for urPlatformGetExtensionProperties
1772+ if __use_win_types :
1773+ _urPlatformGetExtensionProperties_t = WINFUNCTYPE ( ur_result_t , ur_platform_handle_t , c_ulong , POINTER (ur_extension_properties_t ), POINTER (c_ulong ) )
1774+ else :
1775+ _urPlatformGetExtensionProperties_t = CFUNCTYPE ( ur_result_t , ur_platform_handle_t , c_ulong , POINTER (ur_extension_properties_t ), POINTER (c_ulong ) )
1776+
17551777
17561778###############################################################################
17571779## @brief Table of Platform functions pointers
@@ -1762,7 +1784,8 @@ class ur_platform_dditable_t(Structure):
17621784 ("pfnGetNativeHandle" , c_void_p ), ## _urPlatformGetNativeHandle_t
17631785 ("pfnCreateWithNativeHandle" , c_void_p ), ## _urPlatformCreateWithNativeHandle_t
17641786 ("pfnGetApiVersion" , c_void_p ), ## _urPlatformGetApiVersion_t
1765- ("pfnGetBackendOption" , c_void_p ) ## _urPlatformGetBackendOption_t
1787+ ("pfnGetBackendOption" , c_void_p ), ## _urPlatformGetBackendOption_t
1788+ ("pfnGetExtensionProperties" , c_void_p ) ## _urPlatformGetExtensionProperties_t
17661789 ]
17671790
17681791###############################################################################
@@ -2761,6 +2784,7 @@ def __init__(self, version : ur_api_version_t):
27612784 self .urPlatformCreateWithNativeHandle = _urPlatformCreateWithNativeHandle_t (self .__dditable .Platform .pfnCreateWithNativeHandle )
27622785 self .urPlatformGetApiVersion = _urPlatformGetApiVersion_t (self .__dditable .Platform .pfnGetApiVersion )
27632786 self .urPlatformGetBackendOption = _urPlatformGetBackendOption_t (self .__dditable .Platform .pfnGetBackendOption )
2787+ self .urPlatformGetExtensionProperties = _urPlatformGetExtensionProperties_t (self .__dditable .Platform .pfnGetExtensionProperties )
27642788
27652789 # call driver to get function pointers
27662790 Context = ur_context_dditable_t ()
0 commit comments