Skip to content

Commit a95298b

Browse files
nrspruitlisanna-dettwyler
authored andcommitted
Fix Backwards compatibility in ddi structs for EXP features
- Fix incorrect reordering from 1.9.x of the EXP function pointers in ddi tables. Signed-off-by: Neil R. Spruit <[email protected]>
1 parent 6fa9416 commit a95298b

File tree

9 files changed

+2561
-2561
lines changed

9 files changed

+2561
-2561
lines changed

include/ze.py

Lines changed: 175 additions & 175 deletions
Large diffs are not rendered by default.

include/ze_api.h

Lines changed: 2311 additions & 2311 deletions
Large diffs are not rendered by default.

include/ze_ddi.h

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* SPDX-License-Identifier: MIT
66
*
77
* @file ze_ddi.h
8-
* @version v1.11-r1.11.3
8+
* @version v1.11-r1.11.4
99
*
1010
*/
1111
#ifndef _ZE_DDI_H
@@ -1134,23 +1134,6 @@ typedef ze_result_t (ZE_APICALL *ze_pfnCommandListCreateCloneExp_t)(
11341134
ze_command_list_handle_t*
11351135
);
11361136

1137-
///////////////////////////////////////////////////////////////////////////////
1138-
/// @brief Function-pointer for zeCommandListGetNextCommandIdExp
1139-
typedef ze_result_t (ZE_APICALL *ze_pfnCommandListGetNextCommandIdExp_t)(
1140-
ze_command_list_handle_t,
1141-
const ze_mutable_command_id_exp_desc_t*,
1142-
uint64_t*
1143-
);
1144-
1145-
///////////////////////////////////////////////////////////////////////////////
1146-
/// @brief Function-pointer for zeCommandListUpdateMutableCommandWaitEventsExp
1147-
typedef ze_result_t (ZE_APICALL *ze_pfnCommandListUpdateMutableCommandWaitEventsExp_t)(
1148-
ze_command_list_handle_t,
1149-
uint64_t,
1150-
uint32_t,
1151-
ze_event_handle_t*
1152-
);
1153-
11541137
///////////////////////////////////////////////////////////////////////////////
11551138
/// @brief Function-pointer for zeCommandListImmediateAppendCommandListsExp
11561139
typedef ze_result_t (ZE_APICALL *ze_pfnCommandListImmediateAppendCommandListsExp_t)(
@@ -1163,12 +1146,10 @@ typedef ze_result_t (ZE_APICALL *ze_pfnCommandListImmediateAppendCommandListsExp
11631146
);
11641147

11651148
///////////////////////////////////////////////////////////////////////////////
1166-
/// @brief Function-pointer for zeCommandListGetNextCommandIdWithKernelsExp
1167-
typedef ze_result_t (ZE_APICALL *ze_pfnCommandListGetNextCommandIdWithKernelsExp_t)(
1149+
/// @brief Function-pointer for zeCommandListGetNextCommandIdExp
1150+
typedef ze_result_t (ZE_APICALL *ze_pfnCommandListGetNextCommandIdExp_t)(
11681151
ze_command_list_handle_t,
11691152
const ze_mutable_command_id_exp_desc_t*,
1170-
uint32_t,
1171-
ze_kernel_handle_t*,
11721153
uint64_t*
11731154
);
11741155

@@ -1187,6 +1168,25 @@ typedef ze_result_t (ZE_APICALL *ze_pfnCommandListUpdateMutableCommandSignalEven
11871168
ze_event_handle_t
11881169
);
11891170

1171+
///////////////////////////////////////////////////////////////////////////////
1172+
/// @brief Function-pointer for zeCommandListUpdateMutableCommandWaitEventsExp
1173+
typedef ze_result_t (ZE_APICALL *ze_pfnCommandListUpdateMutableCommandWaitEventsExp_t)(
1174+
ze_command_list_handle_t,
1175+
uint64_t,
1176+
uint32_t,
1177+
ze_event_handle_t*
1178+
);
1179+
1180+
///////////////////////////////////////////////////////////////////////////////
1181+
/// @brief Function-pointer for zeCommandListGetNextCommandIdWithKernelsExp
1182+
typedef ze_result_t (ZE_APICALL *ze_pfnCommandListGetNextCommandIdWithKernelsExp_t)(
1183+
ze_command_list_handle_t,
1184+
const ze_mutable_command_id_exp_desc_t*,
1185+
uint32_t,
1186+
ze_kernel_handle_t*,
1187+
uint64_t*
1188+
);
1189+
11901190
///////////////////////////////////////////////////////////////////////////////
11911191
/// @brief Function-pointer for zeCommandListUpdateMutableCommandKernelsExp
11921192
typedef ze_result_t (ZE_APICALL *ze_pfnCommandListUpdateMutableCommandKernelsExp_t)(
@@ -1201,12 +1201,12 @@ typedef ze_result_t (ZE_APICALL *ze_pfnCommandListUpdateMutableCommandKernelsExp
12011201
typedef struct _ze_command_list_exp_dditable_t
12021202
{
12031203
ze_pfnCommandListCreateCloneExp_t pfnCreateCloneExp;
1204-
ze_pfnCommandListGetNextCommandIdExp_t pfnGetNextCommandIdExp;
1205-
ze_pfnCommandListUpdateMutableCommandWaitEventsExp_t pfnUpdateMutableCommandWaitEventsExp;
12061204
ze_pfnCommandListImmediateAppendCommandListsExp_t pfnImmediateAppendCommandListsExp;
1207-
ze_pfnCommandListGetNextCommandIdWithKernelsExp_t pfnGetNextCommandIdWithKernelsExp;
1205+
ze_pfnCommandListGetNextCommandIdExp_t pfnGetNextCommandIdExp;
12081206
ze_pfnCommandListUpdateMutableCommandsExp_t pfnUpdateMutableCommandsExp;
12091207
ze_pfnCommandListUpdateMutableCommandSignalEventExp_t pfnUpdateMutableCommandSignalEventExp;
1208+
ze_pfnCommandListUpdateMutableCommandWaitEventsExp_t pfnUpdateMutableCommandWaitEventsExp;
1209+
ze_pfnCommandListGetNextCommandIdWithKernelsExp_t pfnGetNextCommandIdWithKernelsExp;
12101210
ze_pfnCommandListUpdateMutableCommandKernelsExp_t pfnUpdateMutableCommandKernelsExp;
12111211
} ze_command_list_exp_dditable_t;
12121212

include/zes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
SPDX-License-Identifier: MIT
55
66
@file zes.py
7-
@version v1.11-r1.11.3
7+
@version v1.11-r1.11.4
88
99
"""
1010
import platform

include/zes_api.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* SPDX-License-Identifier: MIT
66
*
77
* @file zes_api.h
8-
* @version v1.11-r1.11.3
8+
* @version v1.11-r1.11.4
99
*
1010
*/
1111
#ifndef _ZES_API_H

include/zes_ddi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* SPDX-License-Identifier: MIT
66
*
77
* @file zes_ddi.h
8-
* @version v1.11-r1.11.3
8+
* @version v1.11-r1.11.4
99
*
1010
*/
1111
#ifndef _ZES_DDI_H

include/zet.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
SPDX-License-Identifier: MIT
55
66
@file zet.py
7-
@version v1.11-r1.11.3
7+
@version v1.11-r1.11.4
88
99
"""
1010
import platform
@@ -1229,6 +1229,13 @@ class _zet_metric_dditable_t(Structure):
12291229
("pfnGetProperties", c_void_p) ## _zetMetricGetProperties_t
12301230
]
12311231

1232+
###############################################################################
1233+
## @brief Function-pointer for zetMetricCreateFromProgrammableExp
1234+
if __use_win_types:
1235+
_zetMetricCreateFromProgrammableExp_t = WINFUNCTYPE( ze_result_t, zet_metric_programmable_exp_handle_t, POINTER(zet_metric_programmable_param_value_exp_t), c_ulong, c_char_p, c_char_p, POINTER(c_ulong), POINTER(zet_metric_handle_t) )
1236+
else:
1237+
_zetMetricCreateFromProgrammableExp_t = CFUNCTYPE( ze_result_t, zet_metric_programmable_exp_handle_t, POINTER(zet_metric_programmable_param_value_exp_t), c_ulong, c_char_p, c_char_p, POINTER(c_ulong), POINTER(zet_metric_handle_t) )
1238+
12321239
###############################################################################
12331240
## @brief Function-pointer for zetMetricDestroyExp
12341241
if __use_win_types:
@@ -1243,21 +1250,14 @@ class _zet_metric_dditable_t(Structure):
12431250
else:
12441251
_zetMetricCreateFromProgrammableExp2_t = CFUNCTYPE( ze_result_t, zet_metric_programmable_exp_handle_t, c_ulong, POINTER(zet_metric_programmable_param_value_exp_t), c_char_p, c_char_p, POINTER(c_ulong), POINTER(zet_metric_handle_t) )
12451252

1246-
###############################################################################
1247-
## @brief Function-pointer for zetMetricCreateFromProgrammableExp
1248-
if __use_win_types:
1249-
_zetMetricCreateFromProgrammableExp_t = WINFUNCTYPE( ze_result_t, zet_metric_programmable_exp_handle_t, POINTER(zet_metric_programmable_param_value_exp_t), c_ulong, c_char_p, c_char_p, POINTER(c_ulong), POINTER(zet_metric_handle_t) )
1250-
else:
1251-
_zetMetricCreateFromProgrammableExp_t = CFUNCTYPE( ze_result_t, zet_metric_programmable_exp_handle_t, POINTER(zet_metric_programmable_param_value_exp_t), c_ulong, c_char_p, c_char_p, POINTER(c_ulong), POINTER(zet_metric_handle_t) )
1252-
12531253

12541254
###############################################################################
12551255
## @brief Table of MetricExp functions pointers
12561256
class _zet_metric_exp_dditable_t(Structure):
12571257
_fields_ = [
1258+
("pfnCreateFromProgrammableExp", c_void_p), ## _zetMetricCreateFromProgrammableExp_t
12581259
("pfnDestroyExp", c_void_p), ## _zetMetricDestroyExp_t
1259-
("pfnCreateFromProgrammableExp2", c_void_p), ## _zetMetricCreateFromProgrammableExp2_t
1260-
("pfnCreateFromProgrammableExp", c_void_p) ## _zetMetricCreateFromProgrammableExp_t
1260+
("pfnCreateFromProgrammableExp2", c_void_p) ## _zetMetricCreateFromProgrammableExp2_t
12611261
]
12621262

12631263
###############################################################################
@@ -1319,6 +1319,13 @@ class _zet_metric_group_dditable_t(Structure):
13191319
else:
13201320
_zetMetricGroupCalculateMetricExportDataExp_t = CFUNCTYPE( ze_result_t, ze_driver_handle_t, zet_metric_group_calculation_type_t, c_size_t, POINTER(c_ubyte), POINTER(zet_metric_calculate_exp_desc_t), POINTER(c_ulong), POINTER(c_ulong), POINTER(c_ulong), POINTER(zet_typed_value_t) )
13211321

1322+
###############################################################################
1323+
## @brief Function-pointer for zetMetricGroupCreateExp
1324+
if __use_win_types:
1325+
_zetMetricGroupCreateExp_t = WINFUNCTYPE( ze_result_t, zet_device_handle_t, c_char_p, c_char_p, zet_metric_group_sampling_type_flags_t, POINTER(zet_metric_group_handle_t) )
1326+
else:
1327+
_zetMetricGroupCreateExp_t = CFUNCTYPE( ze_result_t, zet_device_handle_t, c_char_p, c_char_p, zet_metric_group_sampling_type_flags_t, POINTER(zet_metric_group_handle_t) )
1328+
13221329
###############################################################################
13231330
## @brief Function-pointer for zetMetricGroupAddMetricExp
13241331
if __use_win_types:
@@ -1347,13 +1354,6 @@ class _zet_metric_group_dditable_t(Structure):
13471354
else:
13481355
_zetMetricGroupDestroyExp_t = CFUNCTYPE( ze_result_t, zet_metric_group_handle_t )
13491356

1350-
###############################################################################
1351-
## @brief Function-pointer for zetMetricGroupCreateExp
1352-
if __use_win_types:
1353-
_zetMetricGroupCreateExp_t = WINFUNCTYPE( ze_result_t, zet_device_handle_t, c_char_p, c_char_p, zet_metric_group_sampling_type_flags_t, POINTER(zet_metric_group_handle_t) )
1354-
else:
1355-
_zetMetricGroupCreateExp_t = CFUNCTYPE( ze_result_t, zet_device_handle_t, c_char_p, c_char_p, zet_metric_group_sampling_type_flags_t, POINTER(zet_metric_group_handle_t) )
1356-
13571357

13581358
###############################################################################
13591359
## @brief Table of MetricGroupExp functions pointers
@@ -1363,11 +1363,11 @@ class _zet_metric_group_exp_dditable_t(Structure):
13631363
("pfnGetGlobalTimestampsExp", c_void_p), ## _zetMetricGroupGetGlobalTimestampsExp_t
13641364
("pfnGetExportDataExp", c_void_p), ## _zetMetricGroupGetExportDataExp_t
13651365
("pfnCalculateMetricExportDataExp", c_void_p), ## _zetMetricGroupCalculateMetricExportDataExp_t
1366+
("pfnCreateExp", c_void_p), ## _zetMetricGroupCreateExp_t
13661367
("pfnAddMetricExp", c_void_p), ## _zetMetricGroupAddMetricExp_t
13671368
("pfnRemoveMetricExp", c_void_p), ## _zetMetricGroupRemoveMetricExp_t
13681369
("pfnCloseExp", c_void_p), ## _zetMetricGroupCloseExp_t
1369-
("pfnDestroyExp", c_void_p), ## _zetMetricGroupDestroyExp_t
1370-
("pfnCreateExp", c_void_p) ## _zetMetricGroupCreateExp_t
1370+
("pfnDestroyExp", c_void_p) ## _zetMetricGroupDestroyExp_t
13711371
]
13721372

13731373
###############################################################################
@@ -1772,9 +1772,9 @@ def __init__(self, version : ze_api_version_t):
17721772
self.__dditable.MetricExp = _MetricExp
17731773

17741774
# attach function interface to function address
1775+
self.zetMetricCreateFromProgrammableExp = _zetMetricCreateFromProgrammableExp_t(self.__dditable.MetricExp.pfnCreateFromProgrammableExp)
17751776
self.zetMetricDestroyExp = _zetMetricDestroyExp_t(self.__dditable.MetricExp.pfnDestroyExp)
17761777
self.zetMetricCreateFromProgrammableExp2 = _zetMetricCreateFromProgrammableExp2_t(self.__dditable.MetricExp.pfnCreateFromProgrammableExp2)
1777-
self.zetMetricCreateFromProgrammableExp = _zetMetricCreateFromProgrammableExp_t(self.__dditable.MetricExp.pfnCreateFromProgrammableExp)
17781778

17791779
# call driver to get function pointers
17801780
_MetricGroup = _zet_metric_group_dditable_t()
@@ -1800,11 +1800,11 @@ def __init__(self, version : ze_api_version_t):
18001800
self.zetMetricGroupGetGlobalTimestampsExp = _zetMetricGroupGetGlobalTimestampsExp_t(self.__dditable.MetricGroupExp.pfnGetGlobalTimestampsExp)
18011801
self.zetMetricGroupGetExportDataExp = _zetMetricGroupGetExportDataExp_t(self.__dditable.MetricGroupExp.pfnGetExportDataExp)
18021802
self.zetMetricGroupCalculateMetricExportDataExp = _zetMetricGroupCalculateMetricExportDataExp_t(self.__dditable.MetricGroupExp.pfnCalculateMetricExportDataExp)
1803+
self.zetMetricGroupCreateExp = _zetMetricGroupCreateExp_t(self.__dditable.MetricGroupExp.pfnCreateExp)
18031804
self.zetMetricGroupAddMetricExp = _zetMetricGroupAddMetricExp_t(self.__dditable.MetricGroupExp.pfnAddMetricExp)
18041805
self.zetMetricGroupRemoveMetricExp = _zetMetricGroupRemoveMetricExp_t(self.__dditable.MetricGroupExp.pfnRemoveMetricExp)
18051806
self.zetMetricGroupCloseExp = _zetMetricGroupCloseExp_t(self.__dditable.MetricGroupExp.pfnCloseExp)
18061807
self.zetMetricGroupDestroyExp = _zetMetricGroupDestroyExp_t(self.__dditable.MetricGroupExp.pfnDestroyExp)
1807-
self.zetMetricGroupCreateExp = _zetMetricGroupCreateExp_t(self.__dditable.MetricGroupExp.pfnCreateExp)
18081808

18091809
# call driver to get function pointers
18101810
_MetricStreamer = _zet_metric_streamer_dditable_t()

include/zet_api.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* SPDX-License-Identifier: MIT
66
*
77
* @file zet_api.h
8-
* @version v1.11-r1.11.3
8+
* @version v1.11-r1.11.4
99
*
1010
*/
1111
#ifndef _ZET_API_H

include/zet_ddi.h

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* SPDX-License-Identifier: MIT
66
*
77
* @file zet_ddi.h
8-
* @version v1.11-r1.11.3
8+
* @version v1.11-r1.11.4
99
*
1010
*/
1111
#ifndef _ZET_DDI_H
@@ -532,29 +532,29 @@ typedef ze_result_t (ZE_APICALL *zet_pfnGetMetricProcAddrTable_t)(
532532
);
533533

534534
///////////////////////////////////////////////////////////////////////////////
535-
/// @brief Function-pointer for zetMetricDestroyExp
536-
typedef ze_result_t (ZE_APICALL *zet_pfnMetricDestroyExp_t)(
537-
zet_metric_handle_t
538-
);
539-
540-
///////////////////////////////////////////////////////////////////////////////
541-
/// @brief Function-pointer for zetMetricCreateFromProgrammableExp2
542-
typedef ze_result_t (ZE_APICALL *zet_pfnMetricCreateFromProgrammableExp2_t)(
535+
/// @brief Function-pointer for zetMetricCreateFromProgrammableExp
536+
typedef ze_result_t (ZE_APICALL *zet_pfnMetricCreateFromProgrammableExp_t)(
543537
zet_metric_programmable_exp_handle_t,
544-
uint32_t,
545538
zet_metric_programmable_param_value_exp_t*,
539+
uint32_t,
546540
const char*,
547541
const char*,
548542
uint32_t*,
549543
zet_metric_handle_t*
550544
);
551545

552546
///////////////////////////////////////////////////////////////////////////////
553-
/// @brief Function-pointer for zetMetricCreateFromProgrammableExp
554-
typedef ze_result_t (ZE_APICALL *zet_pfnMetricCreateFromProgrammableExp_t)(
547+
/// @brief Function-pointer for zetMetricDestroyExp
548+
typedef ze_result_t (ZE_APICALL *zet_pfnMetricDestroyExp_t)(
549+
zet_metric_handle_t
550+
);
551+
552+
///////////////////////////////////////////////////////////////////////////////
553+
/// @brief Function-pointer for zetMetricCreateFromProgrammableExp2
554+
typedef ze_result_t (ZE_APICALL *zet_pfnMetricCreateFromProgrammableExp2_t)(
555555
zet_metric_programmable_exp_handle_t,
556-
zet_metric_programmable_param_value_exp_t*,
557556
uint32_t,
557+
zet_metric_programmable_param_value_exp_t*,
558558
const char*,
559559
const char*,
560560
uint32_t*,
@@ -565,9 +565,9 @@ typedef ze_result_t (ZE_APICALL *zet_pfnMetricCreateFromProgrammableExp_t)(
565565
/// @brief Table of MetricExp functions pointers
566566
typedef struct _zet_metric_exp_dditable_t
567567
{
568+
zet_pfnMetricCreateFromProgrammableExp_t pfnCreateFromProgrammableExp;
568569
zet_pfnMetricDestroyExp_t pfnDestroyExp;
569570
zet_pfnMetricCreateFromProgrammableExp2_t pfnCreateFromProgrammableExp2;
570-
zet_pfnMetricCreateFromProgrammableExp_t pfnCreateFromProgrammableExp;
571571
} zet_metric_exp_dditable_t;
572572

573573
///////////////////////////////////////////////////////////////////////////////
@@ -695,6 +695,16 @@ typedef ze_result_t (ZE_APICALL *zet_pfnMetricGroupCalculateMetricExportDataExp_
695695
zet_typed_value_t*
696696
);
697697

698+
///////////////////////////////////////////////////////////////////////////////
699+
/// @brief Function-pointer for zetMetricGroupCreateExp
700+
typedef ze_result_t (ZE_APICALL *zet_pfnMetricGroupCreateExp_t)(
701+
zet_device_handle_t,
702+
const char*,
703+
const char*,
704+
zet_metric_group_sampling_type_flags_t,
705+
zet_metric_group_handle_t*
706+
);
707+
698708
///////////////////////////////////////////////////////////////////////////////
699709
/// @brief Function-pointer for zetMetricGroupAddMetricExp
700710
typedef ze_result_t (ZE_APICALL *zet_pfnMetricGroupAddMetricExp_t)(
@@ -723,16 +733,6 @@ typedef ze_result_t (ZE_APICALL *zet_pfnMetricGroupDestroyExp_t)(
723733
zet_metric_group_handle_t
724734
);
725735

726-
///////////////////////////////////////////////////////////////////////////////
727-
/// @brief Function-pointer for zetMetricGroupCreateExp
728-
typedef ze_result_t (ZE_APICALL *zet_pfnMetricGroupCreateExp_t)(
729-
zet_device_handle_t,
730-
const char*,
731-
const char*,
732-
zet_metric_group_sampling_type_flags_t,
733-
zet_metric_group_handle_t*
734-
);
735-
736736
///////////////////////////////////////////////////////////////////////////////
737737
/// @brief Table of MetricGroupExp functions pointers
738738
typedef struct _zet_metric_group_exp_dditable_t
@@ -741,11 +741,11 @@ typedef struct _zet_metric_group_exp_dditable_t
741741
zet_pfnMetricGroupGetGlobalTimestampsExp_t pfnGetGlobalTimestampsExp;
742742
zet_pfnMetricGroupGetExportDataExp_t pfnGetExportDataExp;
743743
zet_pfnMetricGroupCalculateMetricExportDataExp_t pfnCalculateMetricExportDataExp;
744+
zet_pfnMetricGroupCreateExp_t pfnCreateExp;
744745
zet_pfnMetricGroupAddMetricExp_t pfnAddMetricExp;
745746
zet_pfnMetricGroupRemoveMetricExp_t pfnRemoveMetricExp;
746747
zet_pfnMetricGroupCloseExp_t pfnCloseExp;
747748
zet_pfnMetricGroupDestroyExp_t pfnDestroyExp;
748-
zet_pfnMetricGroupCreateExp_t pfnCreateExp;
749749
} zet_metric_group_exp_dditable_t;
750750

751751
///////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)