@@ -273,6 +273,18 @@ def __str__(self):
273273 return hex (self .value )
274274
275275
276+ ###############################################################################
277+ ## @brief Extension name maximum length.
278+ UR_MAX_EXTENSION_NAME_LENGTH = 256
279+
280+ ###############################################################################
281+ ## @brief Extension type.
282+ class ur_platform_extension_t (Structure ):
283+ _fields_ = [
284+ ("name" , c_char * UR_MAX_EXTENSION_NAME_LENGTH ), ## [in] null-terminated extension name.
285+ ("version" , c_ulong ) ## [in] version of the extension using ::UR_MAKE_VERSION.
286+ ]
287+
276288###############################################################################
277289## @brief Supported platform info
278290class ur_platform_info_v (IntEnum ):
@@ -282,8 +294,9 @@ class ur_platform_info_v(IntEnum):
282294 ## size of the info needs to be dynamically queried.
283295 VERSION = 3 ## [char[]] The string denoting the version of the platform. The size of
284296 ## the info needs to be dynamically queried.
285- EXTENSIONS = 4 ## [char[]] The string denoting extensions supported by the platform. The
286- ## size of the info needs to be dynamically queried.
297+ EXTENSIONS = 4 ## [::ur_platform_extension_t[]] an array of ::ur_platform_extension_t
298+ ## which express which extensions supported by the platform.
299+ ## The size of the info needs to be dynamically queried.
287300 PROFILE = 5 ## [char[]] The string denoting profile of the platform. The size of the
288301 ## info needs to be dynamically queried.
289302 BACKEND = 6 ## [::ur_platform_backend_t] The backend of the platform. Identifies the
@@ -323,21 +336,6 @@ def __str__(self):
323336 return str (ur_platform_backend_v (self .value ))
324337
325338
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-
341339###############################################################################
342340## @brief Target identification strings for
343341## ::ur_device_binary_t.pDeviceTargetSpec
@@ -1767,13 +1765,6 @@ def __str__(self):
17671765else :
17681766 _urPlatformGetBackendOption_t = CFUNCTYPE ( ur_result_t , ur_platform_handle_t , c_char_p , POINTER (c_char_p ) )
17691767
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-
17771768
17781769###############################################################################
17791770## @brief Table of Platform functions pointers
@@ -1784,8 +1775,7 @@ class ur_platform_dditable_t(Structure):
17841775 ("pfnGetNativeHandle" , c_void_p ), ## _urPlatformGetNativeHandle_t
17851776 ("pfnCreateWithNativeHandle" , c_void_p ), ## _urPlatformCreateWithNativeHandle_t
17861777 ("pfnGetApiVersion" , c_void_p ), ## _urPlatformGetApiVersion_t
1787- ("pfnGetBackendOption" , c_void_p ), ## _urPlatformGetBackendOption_t
1788- ("pfnGetExtensionProperties" , c_void_p ) ## _urPlatformGetExtensionProperties_t
1778+ ("pfnGetBackendOption" , c_void_p ) ## _urPlatformGetBackendOption_t
17891779 ]
17901780
17911781###############################################################################
@@ -2784,7 +2774,6 @@ def __init__(self, version : ur_api_version_t):
27842774 self .urPlatformCreateWithNativeHandle = _urPlatformCreateWithNativeHandle_t (self .__dditable .Platform .pfnCreateWithNativeHandle )
27852775 self .urPlatformGetApiVersion = _urPlatformGetApiVersion_t (self .__dditable .Platform .pfnGetApiVersion )
27862776 self .urPlatformGetBackendOption = _urPlatformGetBackendOption_t (self .__dditable .Platform .pfnGetBackendOption )
2787- self .urPlatformGetExtensionProperties = _urPlatformGetExtensionProperties_t (self .__dditable .Platform .pfnGetExtensionProperties )
27882777
27892778 # call driver to get function pointers
27902779 Context = ur_context_dditable_t ()
0 commit comments