feature: add global driver dispatch as prework for DDI handles extension support

As per DDI handles extension, global ddi table pointers will be included
in every L0 handle.

This change is focused on initialization of the global objects and reuse
of them within zeGet...ProcAddrTable functions to avoid duplication
of per component ddi table definitions

Related-To: NEO-13121, NEO-13917
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2025-02-20 17:44:38 +00:00
committed by Compute-Runtime-Automation
parent 6dd948a4b3
commit b10c6b4703
13 changed files with 1137 additions and 505 deletions

View File

@@ -7,7 +7,7 @@
#include "shared/source/utilities/io_functions.h"
#include "level_zero/api/extensions/public/ze_exp_ext.h"
#include "level_zero/ddi/ze_ddi_tables.h"
#include "level_zero/experimental/source/tracing/tracing_barrier_imp.h"
#include "level_zero/experimental/source/tracing/tracing_cmdlist_imp.h"
#include "level_zero/experimental/source/tracing/tracing_cmdqueue_imp.h"
@@ -25,9 +25,6 @@
#include <level_zero/ze_api.h>
#include <level_zero/ze_ddi.h>
#include "ze_core_all_api_entrypoints.h"
#include "ze_ddi_tables.h"
#include <stdlib.h>
ze_gpu_driver_dditable_t driverDdiTable;
@@ -38,17 +35,17 @@ zeGetDriverProcAddrTable(
ze_driver_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP");
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGet, L0::zeDriverGet, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetApiVersion, L0::zeDriverGetApiVersion, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetProperties, L0::zeDriverGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetIpcProperties, L0::zeDriverGetIpcProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetExtensionProperties, L0::zeDriverGetExtensionProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetExtensionFunctionAddress, L0::zeDriverGetExtensionFunctionAddress, version, ZE_API_VERSION_1_1);
fillDdiEntry(pDdiTable->pfnGetLastErrorDescription, L0::zeDriverGetLastErrorDescription, version, ZE_API_VERSION_1_6);
fillDdiEntry(pDdiTable->pfnGet, L0::globalDriverDispatch.coreDriver.pfnGet, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetApiVersion, L0::globalDriverDispatch.coreDriver.pfnGetApiVersion, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.coreDriver.pfnGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetIpcProperties, L0::globalDriverDispatch.coreDriver.pfnGetIpcProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetExtensionProperties, L0::globalDriverDispatch.coreDriver.pfnGetExtensionProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetExtensionFunctionAddress, L0::globalDriverDispatch.coreDriver.pfnGetExtensionFunctionAddress, version, ZE_API_VERSION_1_1);
fillDdiEntry(pDdiTable->pfnGetLastErrorDescription, L0::globalDriverDispatch.coreDriver.pfnGetLastErrorDescription, version, ZE_API_VERSION_1_6);
driverDdiTable.coreDdiTable.Driver = *pDdiTable;
if (driverDdiTable.enableTracing) {
fillDdiEntry(pDdiTable->pfnGet, zeDriverGetTracing, version, ZE_API_VERSION_1_0);
@@ -66,23 +63,23 @@ zeGetMemProcAddrTable(
ze_mem_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP");
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnAllocShared, L0::zeMemAllocShared, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAllocDevice, L0::zeMemAllocDevice, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAllocHost, L0::zeMemAllocHost, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnFree, L0::zeMemFree, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetAllocProperties, L0::zeMemGetAllocProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetAddressRange, L0::zeMemGetAddressRange, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetIpcHandle, L0::zeMemGetIpcHandle, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnOpenIpcHandle, L0::zeMemOpenIpcHandle, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnCloseIpcHandle, L0::zeMemCloseIpcHandle, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnFreeExt, L0::zeMemFreeExt, version, ZE_API_VERSION_1_3);
fillDdiEntry(pDdiTable->pfnPutIpcHandle, L0::zeMemPutIpcHandle, version, ZE_API_VERSION_1_6);
fillDdiEntry(pDdiTable->pfnGetPitchFor2dImage, L0::zeMemGetPitchFor2dImage, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnAllocShared, L0::globalDriverDispatch.coreMem.pfnAllocShared, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAllocDevice, L0::globalDriverDispatch.coreMem.pfnAllocDevice, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAllocHost, L0::globalDriverDispatch.coreMem.pfnAllocHost, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnFree, L0::globalDriverDispatch.coreMem.pfnFree, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetAllocProperties, L0::globalDriverDispatch.coreMem.pfnGetAllocProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetAddressRange, L0::globalDriverDispatch.coreMem.pfnGetAddressRange, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetIpcHandle, L0::globalDriverDispatch.coreMem.pfnGetIpcHandle, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnOpenIpcHandle, L0::globalDriverDispatch.coreMem.pfnOpenIpcHandle, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnCloseIpcHandle, L0::globalDriverDispatch.coreMem.pfnCloseIpcHandle, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnFreeExt, L0::globalDriverDispatch.coreMem.pfnFreeExt, version, ZE_API_VERSION_1_3);
fillDdiEntry(pDdiTable->pfnPutIpcHandle, L0::globalDriverDispatch.coreMem.pfnPutIpcHandle, version, ZE_API_VERSION_1_6);
fillDdiEntry(pDdiTable->pfnGetPitchFor2dImage, L0::globalDriverDispatch.coreMem.pfnGetPitchFor2dImage, version, ZE_API_VERSION_1_9);
driverDdiTable.coreDdiTable.Mem = *pDdiTable;
if (driverDdiTable.enableTracing) {
fillDdiEntry(pDdiTable->pfnAllocShared, zeMemAllocSharedTracing, version, ZE_API_VERSION_1_0);
@@ -104,21 +101,21 @@ zeGetContextProcAddrTable(
ze_context_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP");
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnCreate, L0::zeContextCreate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDestroy, L0::zeContextDestroy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetStatus, L0::zeContextGetStatus, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSystemBarrier, L0::zeContextSystemBarrier, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnMakeMemoryResident, L0::zeContextMakeMemoryResident, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEvictMemory, L0::zeContextEvictMemory, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnMakeImageResident, L0::zeContextMakeImageResident, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEvictImage, L0::zeContextEvictImage, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnCreateEx, L0::zeContextCreateEx, version, ZE_API_VERSION_1_1);
fillDdiEntry(pDdiTable->pfnCreate, L0::globalDriverDispatch.coreContext.pfnCreate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.coreContext.pfnDestroy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetStatus, L0::globalDriverDispatch.coreContext.pfnGetStatus, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSystemBarrier, L0::globalDriverDispatch.coreContext.pfnSystemBarrier, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnMakeMemoryResident, L0::globalDriverDispatch.coreContext.pfnMakeMemoryResident, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEvictMemory, L0::globalDriverDispatch.coreContext.pfnEvictMemory, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnMakeImageResident, L0::globalDriverDispatch.coreContext.pfnMakeImageResident, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEvictImage, L0::globalDriverDispatch.coreContext.pfnEvictImage, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnCreateEx, L0::globalDriverDispatch.coreContext.pfnCreateEx, version, ZE_API_VERSION_1_1);
driverDdiTable.coreDdiTable.Context = *pDdiTable;
if (driverDdiTable.enableTracing) {
@@ -140,14 +137,14 @@ zeGetPhysicalMemProcAddrTable(
ze_physical_mem_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP");
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnCreate, L0::zePhysicalMemCreate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDestroy, L0::zePhysicalMemDestroy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnCreate, L0::globalDriverDispatch.corePhysicalMem.pfnCreate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.corePhysicalMem.pfnDestroy, version, ZE_API_VERSION_1_0);
driverDdiTable.coreDdiTable.PhysicalMem = *pDdiTable;
if (driverDdiTable.enableTracing) {
@@ -163,18 +160,18 @@ zeGetVirtualMemProcAddrTable(
ze_virtual_mem_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP");
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnReserve, L0::zeVirtualMemReserve, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnFree, L0::zeVirtualMemFree, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnQueryPageSize, L0::zeVirtualMemQueryPageSize, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnMap, L0::zeVirtualMemMap, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnUnmap, L0::zeVirtualMemUnmap, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetAccessAttribute, L0::zeVirtualMemSetAccessAttribute, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetAccessAttribute, L0::zeVirtualMemGetAccessAttribute, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnReserve, L0::globalDriverDispatch.coreVirtualMem.pfnReserve, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnFree, L0::globalDriverDispatch.coreVirtualMem.pfnFree, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnQueryPageSize, L0::globalDriverDispatch.coreVirtualMem.pfnQueryPageSize, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnMap, L0::globalDriverDispatch.coreVirtualMem.pfnMap, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnUnmap, L0::globalDriverDispatch.coreVirtualMem.pfnUnmap, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetAccessAttribute, L0::globalDriverDispatch.coreVirtualMem.pfnSetAccessAttribute, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetAccessAttribute, L0::globalDriverDispatch.coreVirtualMem.pfnGetAccessAttribute, version, ZE_API_VERSION_1_0);
driverDdiTable.coreDdiTable.VirtualMem = *pDdiTable;
if (driverDdiTable.enableTracing) {
@@ -195,18 +192,17 @@ zeGetGlobalProcAddrTable(
ze_global_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version) ||
ZE_MINOR_VERSION(driverDdiTable.version) > ZE_MINOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP");
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnInit, L0::zeInit, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnInit, L0::globalDriverDispatch.coreGlobal.pfnInit, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnInitDrivers, L0::globalDriverDispatch.coreGlobal.pfnInitDrivers, version, ZE_API_VERSION_1_10);
driverDdiTable.coreDdiTable.Global = *pDdiTable;
if (driverDdiTable.enableTracing) {
fillDdiEntry(pDdiTable->pfnInit, zeInitTracing, version, ZE_API_VERSION_1_0);
}
fillDdiEntry(pDdiTable->pfnInitDrivers, L0::zeInitDrivers, version, ZE_API_VERSION_1_10);
return result;
}
@@ -216,30 +212,30 @@ zeGetDeviceProcAddrTable(
ze_device_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP");
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGet, L0::zeDeviceGet, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetCommandQueueGroupProperties, L0::zeDeviceGetCommandQueueGroupProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetSubDevices, L0::zeDeviceGetSubDevices, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetProperties, L0::zeDeviceGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetComputeProperties, L0::zeDeviceGetComputeProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetModuleProperties, L0::zeDeviceGetModuleProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetMemoryProperties, L0::zeDeviceGetMemoryProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetMemoryAccessProperties, L0::zeDeviceGetMemoryAccessProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetCacheProperties, L0::zeDeviceGetCacheProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetImageProperties, L0::zeDeviceGetImageProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetP2PProperties, L0::zeDeviceGetP2PProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnCanAccessPeer, L0::zeDeviceCanAccessPeer, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetStatus, L0::zeDeviceGetStatus, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetExternalMemoryProperties, L0::zeDeviceGetExternalMemoryProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetGlobalTimestamps, L0::zeDeviceGetGlobalTimestamps, version, ZE_API_VERSION_1_1);
fillDdiEntry(pDdiTable->pfnReserveCacheExt, L0::zeDeviceReserveCacheExt, version, ZE_API_VERSION_1_2);
fillDdiEntry(pDdiTable->pfnSetCacheAdviceExt, L0::zeDeviceSetCacheAdviceExt, version, ZE_API_VERSION_1_2);
fillDdiEntry(pDdiTable->pfnPciGetPropertiesExt, L0::zeDevicePciGetPropertiesExt, version, ZE_API_VERSION_1_3);
fillDdiEntry(pDdiTable->pfnGetRootDevice, L0::zeDeviceGetRootDevice, version, ZE_API_VERSION_1_7);
fillDdiEntry(pDdiTable->pfnGet, L0::globalDriverDispatch.coreDevice.pfnGet, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetCommandQueueGroupProperties, L0::globalDriverDispatch.coreDevice.pfnGetCommandQueueGroupProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetSubDevices, L0::globalDriverDispatch.coreDevice.pfnGetSubDevices, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.coreDevice.pfnGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetComputeProperties, L0::globalDriverDispatch.coreDevice.pfnGetComputeProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetModuleProperties, L0::globalDriverDispatch.coreDevice.pfnGetModuleProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetMemoryProperties, L0::globalDriverDispatch.coreDevice.pfnGetMemoryProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetMemoryAccessProperties, L0::globalDriverDispatch.coreDevice.pfnGetMemoryAccessProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetCacheProperties, L0::globalDriverDispatch.coreDevice.pfnGetCacheProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetImageProperties, L0::globalDriverDispatch.coreDevice.pfnGetImageProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetP2PProperties, L0::globalDriverDispatch.coreDevice.pfnGetP2PProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnCanAccessPeer, L0::globalDriverDispatch.coreDevice.pfnCanAccessPeer, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetStatus, L0::globalDriverDispatch.coreDevice.pfnGetStatus, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetExternalMemoryProperties, L0::globalDriverDispatch.coreDevice.pfnGetExternalMemoryProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetGlobalTimestamps, L0::globalDriverDispatch.coreDevice.pfnGetGlobalTimestamps, version, ZE_API_VERSION_1_1);
fillDdiEntry(pDdiTable->pfnReserveCacheExt, L0::globalDriverDispatch.coreDevice.pfnReserveCacheExt, version, ZE_API_VERSION_1_2);
fillDdiEntry(pDdiTable->pfnSetCacheAdviceExt, L0::globalDriverDispatch.coreDevice.pfnSetCacheAdviceExt, version, ZE_API_VERSION_1_2);
fillDdiEntry(pDdiTable->pfnPciGetPropertiesExt, L0::globalDriverDispatch.coreDevice.pfnPciGetPropertiesExt, version, ZE_API_VERSION_1_3);
fillDdiEntry(pDdiTable->pfnGetRootDevice, L0::globalDriverDispatch.coreDevice.pfnGetRootDevice, version, ZE_API_VERSION_1_7);
driverDdiTable.coreDdiTable.Device = *pDdiTable;
if (driverDdiTable.enableTracing) {
fillDdiEntry(pDdiTable->pfnGet, zeDeviceGetTracing, version, ZE_API_VERSION_1_0);
@@ -266,11 +262,11 @@ zeGetDeviceExpProcAddrTable(
ze_device_exp_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetFabricVertexExp, L0::zeDeviceGetFabricVertexExp, version, ZE_API_VERSION_1_4);
fillDdiEntry(pDdiTable->pfnGetFabricVertexExp, L0::globalDriverDispatch.coreDeviceExp.pfnGetFabricVertexExp, version, ZE_API_VERSION_1_4);
driverDdiTable.coreDdiTable.DeviceExp = *pDdiTable;
return result;
}
@@ -281,17 +277,17 @@ zeGetCommandQueueProcAddrTable(
ze_command_queue_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP");
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnCreate, L0::zeCommandQueueCreate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDestroy, L0::zeCommandQueueDestroy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnExecuteCommandLists, L0::zeCommandQueueExecuteCommandLists, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSynchronize, L0::zeCommandQueueSynchronize, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetOrdinal, L0::zeCommandQueueGetOrdinal, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetIndex, L0::zeCommandQueueGetIndex, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnCreate, L0::globalDriverDispatch.coreCommandQueue.pfnCreate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.coreCommandQueue.pfnDestroy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnExecuteCommandLists, L0::globalDriverDispatch.coreCommandQueue.pfnExecuteCommandLists, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSynchronize, L0::globalDriverDispatch.coreCommandQueue.pfnSynchronize, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetOrdinal, L0::globalDriverDispatch.coreCommandQueue.pfnGetOrdinal, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetIndex, L0::globalDriverDispatch.coreCommandQueue.pfnGetIndex, version, ZE_API_VERSION_1_9);
driverDdiTable.coreDdiTable.CommandQueue = *pDdiTable;
if (driverDdiTable.enableTracing) {
@@ -309,46 +305,45 @@ zeGetCommandListProcAddrTable(
ze_command_list_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version) ||
ZE_MINOR_VERSION(driverDdiTable.version) > ZE_MINOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP");
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnAppendBarrier, L0::zeCommandListAppendBarrier, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendMemoryRangesBarrier, L0::zeCommandListAppendMemoryRangesBarrier, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnCreate, L0::zeCommandListCreate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnCreateImmediate, L0::zeCommandListCreateImmediate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDestroy, L0::zeCommandListDestroy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnClose, L0::zeCommandListClose, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnReset, L0::zeCommandListReset, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendMemoryCopy, L0::zeCommandListAppendMemoryCopy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendMemoryCopyRegion, L0::zeCommandListAppendMemoryCopyRegion, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendMemoryFill, L0::zeCommandListAppendMemoryFill, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendImageCopy, L0::zeCommandListAppendImageCopy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendImageCopyRegion, L0::zeCommandListAppendImageCopyRegion, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendImageCopyToMemory, L0::zeCommandListAppendImageCopyToMemory, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendImageCopyFromMemory, L0::zeCommandListAppendImageCopyFromMemory, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendMemoryPrefetch, L0::zeCommandListAppendMemoryPrefetch, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendMemAdvise, L0::zeCommandListAppendMemAdvise, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendSignalEvent, L0::zeCommandListAppendSignalEvent, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendWaitOnEvents, L0::zeCommandListAppendWaitOnEvents, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendEventReset, L0::zeCommandListAppendEventReset, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendLaunchKernel, L0::zeCommandListAppendLaunchKernel, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendLaunchCooperativeKernel, L0::zeCommandListAppendLaunchCooperativeKernel, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendLaunchKernelIndirect, L0::zeCommandListAppendLaunchKernelIndirect, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendLaunchMultipleKernelsIndirect, L0::zeCommandListAppendLaunchMultipleKernelsIndirect, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendWriteGlobalTimestamp, L0::zeCommandListAppendWriteGlobalTimestamp, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendMemoryCopyFromContext, L0::zeCommandListAppendMemoryCopyFromContext, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendQueryKernelTimestamps, L0::zeCommandListAppendQueryKernelTimestamps, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnHostSynchronize, L0::zeCommandListHostSynchronize, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendImageCopyToMemoryExt, L0::zeCommandListAppendImageCopyToMemoryExt, version, ZE_API_VERSION_1_3);
fillDdiEntry(pDdiTable->pfnAppendImageCopyFromMemoryExt, L0::zeCommandListAppendImageCopyFromMemoryExt, version, ZE_API_VERSION_1_3);
fillDdiEntry(pDdiTable->pfnGetDeviceHandle, L0::zeCommandListGetDeviceHandle, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetContextHandle, L0::zeCommandListGetContextHandle, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetOrdinal, L0::zeCommandListGetOrdinal, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnImmediateGetIndex, L0::zeCommandListImmediateGetIndex, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnIsImmediate, L0::zeCommandListIsImmediate, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnAppendBarrier, L0::globalDriverDispatch.coreCommandList.pfnAppendBarrier, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendMemoryRangesBarrier, L0::globalDriverDispatch.coreCommandList.pfnAppendMemoryRangesBarrier, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnCreate, L0::globalDriverDispatch.coreCommandList.pfnCreate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnCreateImmediate, L0::globalDriverDispatch.coreCommandList.pfnCreateImmediate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.coreCommandList.pfnDestroy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnClose, L0::globalDriverDispatch.coreCommandList.pfnClose, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnReset, L0::globalDriverDispatch.coreCommandList.pfnReset, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendMemoryCopy, L0::globalDriverDispatch.coreCommandList.pfnAppendMemoryCopy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendMemoryCopyRegion, L0::globalDriverDispatch.coreCommandList.pfnAppendMemoryCopyRegion, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendMemoryFill, L0::globalDriverDispatch.coreCommandList.pfnAppendMemoryFill, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendImageCopy, L0::globalDriverDispatch.coreCommandList.pfnAppendImageCopy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendImageCopyRegion, L0::globalDriverDispatch.coreCommandList.pfnAppendImageCopyRegion, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendImageCopyToMemory, L0::globalDriverDispatch.coreCommandList.pfnAppendImageCopyToMemory, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendImageCopyFromMemory, L0::globalDriverDispatch.coreCommandList.pfnAppendImageCopyFromMemory, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendMemoryPrefetch, L0::globalDriverDispatch.coreCommandList.pfnAppendMemoryPrefetch, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendMemAdvise, L0::globalDriverDispatch.coreCommandList.pfnAppendMemAdvise, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendSignalEvent, L0::globalDriverDispatch.coreCommandList.pfnAppendSignalEvent, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendWaitOnEvents, L0::globalDriverDispatch.coreCommandList.pfnAppendWaitOnEvents, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendEventReset, L0::globalDriverDispatch.coreCommandList.pfnAppendEventReset, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendLaunchKernel, L0::globalDriverDispatch.coreCommandList.pfnAppendLaunchKernel, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendLaunchCooperativeKernel, L0::globalDriverDispatch.coreCommandList.pfnAppendLaunchCooperativeKernel, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendLaunchKernelIndirect, L0::globalDriverDispatch.coreCommandList.pfnAppendLaunchKernelIndirect, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendLaunchMultipleKernelsIndirect, L0::globalDriverDispatch.coreCommandList.pfnAppendLaunchMultipleKernelsIndirect, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendWriteGlobalTimestamp, L0::globalDriverDispatch.coreCommandList.pfnAppendWriteGlobalTimestamp, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendMemoryCopyFromContext, L0::globalDriverDispatch.coreCommandList.pfnAppendMemoryCopyFromContext, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendQueryKernelTimestamps, L0::globalDriverDispatch.coreCommandList.pfnAppendQueryKernelTimestamps, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnHostSynchronize, L0::globalDriverDispatch.coreCommandList.pfnHostSynchronize, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendImageCopyToMemoryExt, L0::globalDriverDispatch.coreCommandList.pfnAppendImageCopyToMemoryExt, version, ZE_API_VERSION_1_3);
fillDdiEntry(pDdiTable->pfnAppendImageCopyFromMemoryExt, L0::globalDriverDispatch.coreCommandList.pfnAppendImageCopyFromMemoryExt, version, ZE_API_VERSION_1_3);
fillDdiEntry(pDdiTable->pfnGetDeviceHandle, L0::globalDriverDispatch.coreCommandList.pfnGetDeviceHandle, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetContextHandle, L0::globalDriverDispatch.coreCommandList.pfnGetContextHandle, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetOrdinal, L0::globalDriverDispatch.coreCommandList.pfnGetOrdinal, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnImmediateGetIndex, L0::globalDriverDispatch.coreCommandList.pfnImmediateGetIndex, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnIsImmediate, L0::globalDriverDispatch.coreCommandList.pfnIsImmediate, version, ZE_API_VERSION_1_9);
driverDdiTable.coreDdiTable.CommandList = *pDdiTable;
if (driverDdiTable.enableTracing) {
fillDdiEntry(pDdiTable->pfnAppendBarrier, zeCommandListAppendBarrierTracing, version, ZE_API_VERSION_1_0);
@@ -387,18 +382,17 @@ zeGetCommandListExpProcAddrTable(
ze_command_list_exp_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version) ||
ZE_MINOR_VERSION(driverDdiTable.version) > ZE_MINOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnImmediateAppendCommandListsExp, L0::zeCommandListImmediateAppendCommandListsExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetNextCommandIdExp, L0::zeCommandListGetNextCommandIdExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnUpdateMutableCommandsExp, L0::zeCommandListUpdateMutableCommandsExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnUpdateMutableCommandSignalEventExp, L0::zeCommandListUpdateMutableCommandSignalEventExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnUpdateMutableCommandWaitEventsExp, L0::zeCommandListUpdateMutableCommandWaitEventsExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetNextCommandIdWithKernelsExp, L0::zeCommandListGetNextCommandIdWithKernelsExp, version, ZE_API_VERSION_1_10);
fillDdiEntry(pDdiTable->pfnUpdateMutableCommandKernelsExp, L0::zeCommandListUpdateMutableCommandKernelsExp, version, ZE_API_VERSION_1_10);
fillDdiEntry(pDdiTable->pfnImmediateAppendCommandListsExp, L0::globalDriverDispatch.coreCommandListExp.pfnImmediateAppendCommandListsExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetNextCommandIdExp, L0::globalDriverDispatch.coreCommandListExp.pfnGetNextCommandIdExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnUpdateMutableCommandsExp, L0::globalDriverDispatch.coreCommandListExp.pfnUpdateMutableCommandsExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnUpdateMutableCommandSignalEventExp, L0::globalDriverDispatch.coreCommandListExp.pfnUpdateMutableCommandSignalEventExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnUpdateMutableCommandWaitEventsExp, L0::globalDriverDispatch.coreCommandListExp.pfnUpdateMutableCommandWaitEventsExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetNextCommandIdWithKernelsExp, L0::globalDriverDispatch.coreCommandListExp.pfnGetNextCommandIdWithKernelsExp, version, ZE_API_VERSION_1_10);
fillDdiEntry(pDdiTable->pfnUpdateMutableCommandKernelsExp, L0::globalDriverDispatch.coreCommandListExp.pfnUpdateMutableCommandKernelsExp, version, ZE_API_VERSION_1_10);
return result;
}
@@ -408,16 +402,16 @@ zeGetFenceProcAddrTable(
ze_fence_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP");
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnCreate, L0::zeFenceCreate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDestroy, L0::zeFenceDestroy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnHostSynchronize, L0::zeFenceHostSynchronize, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnQueryStatus, L0::zeFenceQueryStatus, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnReset, L0::zeFenceReset, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnCreate, L0::globalDriverDispatch.coreFence.pfnCreate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.coreFence.pfnDestroy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnHostSynchronize, L0::globalDriverDispatch.coreFence.pfnHostSynchronize, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnQueryStatus, L0::globalDriverDispatch.coreFence.pfnQueryStatus, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnReset, L0::globalDriverDispatch.coreFence.pfnReset, version, ZE_API_VERSION_1_0);
driverDdiTable.coreDdiTable.Fence = *pDdiTable;
if (driverDdiTable.enableTracing) {
fillDdiEntry(pDdiTable->pfnCreate, zeFenceCreateTracing, version, ZE_API_VERSION_1_0);
@@ -435,18 +429,18 @@ zeGetEventPoolProcAddrTable(
ze_event_pool_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP");
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnCreate, L0::zeEventPoolCreate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDestroy, L0::zeEventPoolDestroy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetIpcHandle, L0::zeEventPoolGetIpcHandle, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnOpenIpcHandle, L0::zeEventPoolOpenIpcHandle, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnCloseIpcHandle, L0::zeEventPoolCloseIpcHandle, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetContextHandle, L0::zeEventPoolGetContextHandle, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetFlags, L0::zeEventPoolGetFlags, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnCreate, L0::globalDriverDispatch.coreEventPool.pfnCreate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.coreEventPool.pfnDestroy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetIpcHandle, L0::globalDriverDispatch.coreEventPool.pfnGetIpcHandle, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnOpenIpcHandle, L0::globalDriverDispatch.coreEventPool.pfnOpenIpcHandle, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnCloseIpcHandle, L0::globalDriverDispatch.coreEventPool.pfnCloseIpcHandle, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetContextHandle, L0::globalDriverDispatch.coreEventPool.pfnGetContextHandle, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetFlags, L0::globalDriverDispatch.coreEventPool.pfnGetFlags, version, ZE_API_VERSION_1_9);
driverDdiTable.coreDdiTable.EventPool = *pDdiTable;
if (driverDdiTable.enableTracing) {
fillDdiEntry(pDdiTable->pfnCreate, zeEventPoolCreateTracing, version, ZE_API_VERSION_1_0);
@@ -464,22 +458,22 @@ zeGetEventProcAddrTable(
ze_event_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP");
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnCreate, L0::zeEventCreate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDestroy, L0::zeEventDestroy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnHostSignal, L0::zeEventHostSignal, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnHostSynchronize, L0::zeEventHostSynchronize, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnQueryStatus, L0::zeEventQueryStatus, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnHostReset, L0::zeEventHostReset, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnQueryKernelTimestamp, L0::zeEventQueryKernelTimestamp, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnQueryKernelTimestampsExt, L0::zeEventQueryKernelTimestampsExt, version, ZE_API_VERSION_1_6);
fillDdiEntry(pDdiTable->pfnGetEventPool, L0::zeEventGetEventPool, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetSignalScope, L0::zeEventGetSignalScope, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetWaitScope, L0::zeEventGetWaitScope, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnCreate, L0::globalDriverDispatch.coreEvent.pfnCreate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.coreEvent.pfnDestroy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnHostSignal, L0::globalDriverDispatch.coreEvent.pfnHostSignal, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnHostSynchronize, L0::globalDriverDispatch.coreEvent.pfnHostSynchronize, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnQueryStatus, L0::globalDriverDispatch.coreEvent.pfnQueryStatus, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnHostReset, L0::globalDriverDispatch.coreEvent.pfnHostReset, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnQueryKernelTimestamp, L0::globalDriverDispatch.coreEvent.pfnQueryKernelTimestamp, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnQueryKernelTimestampsExt, L0::globalDriverDispatch.coreEvent.pfnQueryKernelTimestampsExt, version, ZE_API_VERSION_1_6);
fillDdiEntry(pDdiTable->pfnGetEventPool, L0::globalDriverDispatch.coreEvent.pfnGetEventPool, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetSignalScope, L0::globalDriverDispatch.coreEvent.pfnGetSignalScope, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetWaitScope, L0::globalDriverDispatch.coreEvent.pfnGetWaitScope, version, ZE_API_VERSION_1_9);
driverDdiTable.coreDdiTable.Event = *pDdiTable;
if (driverDdiTable.enableTracing) {
fillDdiEntry(pDdiTable->pfnCreate, zeEventCreateTracing, version, ZE_API_VERSION_1_0);
@@ -499,11 +493,11 @@ zeGetEventExpProcAddrTable(
ze_event_exp_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnQueryTimestampsExp, L0::zeEventQueryTimestampsExp, version, ZE_API_VERSION_1_2);
fillDdiEntry(pDdiTable->pfnQueryTimestampsExp, L0::globalDriverDispatch.coreEventExp.pfnQueryTimestampsExp, version, ZE_API_VERSION_1_2);
return result;
}
@@ -514,16 +508,16 @@ zeGetImageProcAddrTable(
ze_image_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP");
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetProperties, L0::zeImageGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnCreate, L0::zeImageCreate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDestroy, L0::zeImageDestroy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetAllocPropertiesExt, L0::zeImageGetAllocPropertiesExt, version, ZE_API_VERSION_1_3);
fillDdiEntry(pDdiTable->pfnViewCreateExt, L0::zeImageViewCreateExt, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.coreImage.pfnGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnCreate, L0::globalDriverDispatch.coreImage.pfnCreate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.coreImage.pfnDestroy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetAllocPropertiesExt, L0::globalDriverDispatch.coreImage.pfnGetAllocPropertiesExt, version, ZE_API_VERSION_1_3);
fillDdiEntry(pDdiTable->pfnViewCreateExt, L0::globalDriverDispatch.coreImage.pfnViewCreateExt, version, ZE_API_VERSION_1_5);
driverDdiTable.coreDdiTable.Image = *pDdiTable;
if (driverDdiTable.enableTracing) {
fillDdiEntry(pDdiTable->pfnGetProperties, zeImageGetPropertiesTracing, version, ZE_API_VERSION_1_0);
@@ -539,20 +533,20 @@ zeGetModuleProcAddrTable(
ze_module_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP");
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnCreate, L0::zeModuleCreate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDestroy, L0::zeModuleDestroy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDynamicLink, L0::zeModuleDynamicLink, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetNativeBinary, L0::zeModuleGetNativeBinary, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetGlobalPointer, L0::zeModuleGetGlobalPointer, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetKernelNames, L0::zeModuleGetKernelNames, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetFunctionPointer, L0::zeModuleGetFunctionPointer, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetProperties, L0::zeModuleGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnInspectLinkageExt, L0::zeModuleInspectLinkageExt, version, ZE_API_VERSION_1_3);
fillDdiEntry(pDdiTable->pfnCreate, L0::globalDriverDispatch.coreModule.pfnCreate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.coreModule.pfnDestroy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDynamicLink, L0::globalDriverDispatch.coreModule.pfnDynamicLink, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetNativeBinary, L0::globalDriverDispatch.coreModule.pfnGetNativeBinary, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetGlobalPointer, L0::globalDriverDispatch.coreModule.pfnGetGlobalPointer, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetKernelNames, L0::globalDriverDispatch.coreModule.pfnGetKernelNames, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetFunctionPointer, L0::globalDriverDispatch.coreModule.pfnGetFunctionPointer, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.coreModule.pfnGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnInspectLinkageExt, L0::globalDriverDispatch.coreModule.pfnInspectLinkageExt, version, ZE_API_VERSION_1_3);
driverDdiTable.coreDdiTable.Module = *pDdiTable;
if (driverDdiTable.enableTracing) {
fillDdiEntry(pDdiTable->pfnCreate, zeModuleCreateTracing, version, ZE_API_VERSION_1_0);
@@ -573,13 +567,13 @@ zeGetModuleBuildLogProcAddrTable(
ze_module_build_log_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP");
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnDestroy, L0::zeModuleBuildLogDestroy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetString, L0::zeModuleBuildLogGetString, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.coreModuleBuildLog.pfnDestroy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetString, L0::globalDriverDispatch.coreModuleBuildLog.pfnGetString, version, ZE_API_VERSION_1_0);
driverDdiTable.coreDdiTable.ModuleBuildLog = *pDdiTable;
if (driverDdiTable.enableTracing) {
fillDdiEntry(pDdiTable->pfnDestroy, zeModuleBuildLogDestroyTracing, version, ZE_API_VERSION_1_0);
@@ -594,23 +588,23 @@ zeGetKernelProcAddrTable(
ze_kernel_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP");
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnCreate, L0::zeKernelCreate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDestroy, L0::zeKernelDestroy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetGroupSize, L0::zeKernelSetGroupSize, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSuggestGroupSize, L0::zeKernelSuggestGroupSize, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSuggestMaxCooperativeGroupCount, L0::zeKernelSuggestMaxCooperativeGroupCount, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetArgumentValue, L0::zeKernelSetArgumentValue, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetIndirectAccess, L0::zeKernelSetIndirectAccess, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetIndirectAccess, L0::zeKernelGetIndirectAccess, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetSourceAttributes, L0::zeKernelGetSourceAttributes, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetProperties, L0::zeKernelGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetCacheConfig, L0::zeKernelSetCacheConfig, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetName, L0::zeKernelGetName, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnCreate, L0::globalDriverDispatch.coreKernel.pfnCreate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.coreKernel.pfnDestroy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetGroupSize, L0::globalDriverDispatch.coreKernel.pfnSetGroupSize, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSuggestGroupSize, L0::globalDriverDispatch.coreKernel.pfnSuggestGroupSize, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSuggestMaxCooperativeGroupCount, L0::globalDriverDispatch.coreKernel.pfnSuggestMaxCooperativeGroupCount, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetArgumentValue, L0::globalDriverDispatch.coreKernel.pfnSetArgumentValue, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetIndirectAccess, L0::globalDriverDispatch.coreKernel.pfnSetIndirectAccess, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetIndirectAccess, L0::globalDriverDispatch.coreKernel.pfnGetIndirectAccess, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetSourceAttributes, L0::globalDriverDispatch.coreKernel.pfnGetSourceAttributes, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.coreKernel.pfnGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetCacheConfig, L0::globalDriverDispatch.coreKernel.pfnSetCacheConfig, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetName, L0::globalDriverDispatch.coreKernel.pfnGetName, version, ZE_API_VERSION_1_0);
driverDdiTable.coreDdiTable.Kernel = *pDdiTable;
if (driverDdiTable.enableTracing) {
fillDdiEntry(pDdiTable->pfnCreate, zeKernelCreateTracing, version, ZE_API_VERSION_1_0);
@@ -635,13 +629,13 @@ zeGetSamplerProcAddrTable(
ze_sampler_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
driverDdiTable.enableTracing = NEO::IoFunctions::getEnvToBool("ZET_ENABLE_API_TRACING_EXP");
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnCreate, L0::zeSamplerCreate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDestroy, L0::zeSamplerDestroy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnCreate, L0::globalDriverDispatch.coreSampler.pfnCreate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.coreSampler.pfnDestroy, version, ZE_API_VERSION_1_0);
driverDdiTable.coreDdiTable.Sampler = *pDdiTable;
if (driverDdiTable.enableTracing) {
fillDdiEntry(pDdiTable->pfnCreate, zeSamplerCreateTracing, version, ZE_API_VERSION_1_0);
@@ -656,13 +650,13 @@ zeGetKernelExpProcAddrTable(
ze_kernel_exp_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnSetGlobalOffsetExp, L0::zeKernelSetGlobalOffsetExp, version, ZE_API_VERSION_1_1);
fillDdiEntry(pDdiTable->pfnSchedulingHintExp, L0::zeKernelSchedulingHintExp, version, ZE_API_VERSION_1_2);
fillDdiEntry(pDdiTable->pfnGetBinaryExp, L0::zeKernelGetBinaryExp, version, ZE_API_VERSION_1_11);
fillDdiEntry(pDdiTable->pfnSetGlobalOffsetExp, L0::globalDriverDispatch.coreKernelExp.pfnSetGlobalOffsetExp, version, ZE_API_VERSION_1_1);
fillDdiEntry(pDdiTable->pfnSchedulingHintExp, L0::globalDriverDispatch.coreKernelExp.pfnSchedulingHintExp, version, ZE_API_VERSION_1_2);
fillDdiEntry(pDdiTable->pfnGetBinaryExp, L0::globalDriverDispatch.coreKernelExp.pfnGetBinaryExp, version, ZE_API_VERSION_1_11);
driverDdiTable.coreDdiTable.KernelExp = *pDdiTable;
return result;
}
@@ -673,14 +667,14 @@ zeGetMemExpProcAddrTable(
ze_mem_exp_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetIpcHandleFromFileDescriptorExp, L0::zeMemGetIpcHandleFromFileDescriptorExp, version, ZE_API_VERSION_1_6);
fillDdiEntry(pDdiTable->pfnGetFileDescriptorFromIpcHandleExp, L0::zeMemGetFileDescriptorFromIpcHandleExp, version, ZE_API_VERSION_1_6);
fillDdiEntry(pDdiTable->pfnSetAtomicAccessAttributeExp, L0::zeMemSetAtomicAccessAttributeExp, version, ZE_API_VERSION_1_7);
fillDdiEntry(pDdiTable->pfnGetAtomicAccessAttributeExp, L0::zeMemGetAtomicAccessAttributeExp, version, ZE_API_VERSION_1_7);
fillDdiEntry(pDdiTable->pfnGetIpcHandleFromFileDescriptorExp, L0::globalDriverDispatch.coreMemExp.pfnGetIpcHandleFromFileDescriptorExp, version, ZE_API_VERSION_1_6);
fillDdiEntry(pDdiTable->pfnGetFileDescriptorFromIpcHandleExp, L0::globalDriverDispatch.coreMemExp.pfnGetFileDescriptorFromIpcHandleExp, version, ZE_API_VERSION_1_6);
fillDdiEntry(pDdiTable->pfnSetAtomicAccessAttributeExp, L0::globalDriverDispatch.coreMemExp.pfnSetAtomicAccessAttributeExp, version, ZE_API_VERSION_1_7);
fillDdiEntry(pDdiTable->pfnGetAtomicAccessAttributeExp, L0::globalDriverDispatch.coreMemExp.pfnGetAtomicAccessAttributeExp, version, ZE_API_VERSION_1_7);
driverDdiTable.coreDdiTable.MemExp = *pDdiTable;
return result;
}
@@ -691,13 +685,13 @@ zeGetImageExpProcAddrTable(
ze_image_exp_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetMemoryPropertiesExp, L0::zeImageGetMemoryPropertiesExp, version, ZE_API_VERSION_1_2);
fillDdiEntry(pDdiTable->pfnViewCreateExp, L0::zeImageViewCreateExp, version, ZE_API_VERSION_1_2);
fillDdiEntry(pDdiTable->pfnGetDeviceOffsetExp, L0::zeImageGetDeviceOffsetExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetMemoryPropertiesExp, L0::globalDriverDispatch.coreImageExp.pfnGetMemoryPropertiesExp, version, ZE_API_VERSION_1_2);
fillDdiEntry(pDdiTable->pfnViewCreateExp, L0::globalDriverDispatch.coreImageExp.pfnViewCreateExp, version, ZE_API_VERSION_1_2);
fillDdiEntry(pDdiTable->pfnGetDeviceOffsetExp, L0::globalDriverDispatch.coreImageExp.pfnGetDeviceOffsetExp, version, ZE_API_VERSION_1_9);
driverDdiTable.coreDdiTable.ImageExp = *pDdiTable;
return result;
}
@@ -709,14 +703,14 @@ zeGetFabricVertexExpProcAddrTable(
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetExp, L0::zeFabricVertexGetExp, version, ZE_API_VERSION_1_4);
fillDdiEntry(pDdiTable->pfnGetSubVerticesExp, L0::zeFabricVertexGetSubVerticesExp, version, ZE_API_VERSION_1_4);
fillDdiEntry(pDdiTable->pfnGetPropertiesExp, L0::zeFabricVertexGetPropertiesExp, version, ZE_API_VERSION_1_4);
fillDdiEntry(pDdiTable->pfnGetDeviceExp, L0::zeFabricVertexGetDeviceExp, version, ZE_API_VERSION_1_4);
fillDdiEntry(pDdiTable->pfnGetExp, L0::globalDriverDispatch.coreFabricVertexExp.pfnGetExp, version, ZE_API_VERSION_1_4);
fillDdiEntry(pDdiTable->pfnGetSubVerticesExp, L0::globalDriverDispatch.coreFabricVertexExp.pfnGetSubVerticesExp, version, ZE_API_VERSION_1_4);
fillDdiEntry(pDdiTable->pfnGetPropertiesExp, L0::globalDriverDispatch.coreFabricVertexExp.pfnGetPropertiesExp, version, ZE_API_VERSION_1_4);
fillDdiEntry(pDdiTable->pfnGetDeviceExp, L0::globalDriverDispatch.coreFabricVertexExp.pfnGetDeviceExp, version, ZE_API_VERSION_1_4);
driverDdiTable.coreDdiTable.FabricVertexExp = *pDdiTable;
return result;
}
@@ -728,13 +722,13 @@ zeGetFabricEdgeExpProcAddrTable(
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetExp, L0::zeFabricEdgeGetExp, version, ZE_API_VERSION_1_4);
fillDdiEntry(pDdiTable->pfnGetVerticesExp, L0::zeFabricEdgeGetVerticesExp, version, ZE_API_VERSION_1_4);
fillDdiEntry(pDdiTable->pfnGetPropertiesExp, L0::zeFabricEdgeGetPropertiesExp, version, ZE_API_VERSION_1_4);
fillDdiEntry(pDdiTable->pfnGetExp, L0::globalDriverDispatch.coreFabricEdgeExp.pfnGetExp, version, ZE_API_VERSION_1_4);
fillDdiEntry(pDdiTable->pfnGetVerticesExp, L0::globalDriverDispatch.coreFabricEdgeExp.pfnGetVerticesExp, version, ZE_API_VERSION_1_4);
fillDdiEntry(pDdiTable->pfnGetPropertiesExp, L0::globalDriverDispatch.coreFabricEdgeExp.pfnGetPropertiesExp, version, ZE_API_VERSION_1_4);
driverDdiTable.coreDdiTable.FabricEdgeExp = *pDdiTable;
return result;
}
@@ -746,11 +740,11 @@ zeGetDriverExpProcAddrTable(
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnRTASFormatCompatibilityCheckExp, L0::zeDriverRTASFormatCompatibilityCheckExp, version, ZE_API_VERSION_1_7);
fillDdiEntry(pDdiTable->pfnRTASFormatCompatibilityCheckExp, L0::globalDriverDispatch.coreDriverExp.pfnRTASFormatCompatibilityCheckExp, version, ZE_API_VERSION_1_7);
driverDdiTable.coreDdiTable.DriverExp = *pDdiTable;
return result;
}
@@ -762,14 +756,14 @@ zeGetRTASParallelOperationExpProcAddrTable(
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnCreateExp, L0::zeRTASParallelOperationCreateExp, version, ZE_API_VERSION_1_7);
fillDdiEntry(pDdiTable->pfnGetPropertiesExp, L0::zeRTASParallelOperationGetPropertiesExp, version, ZE_API_VERSION_1_7);
fillDdiEntry(pDdiTable->pfnJoinExp, L0::zeRTASParallelOperationJoinExp, version, ZE_API_VERSION_1_7);
fillDdiEntry(pDdiTable->pfnDestroyExp, L0::zeRTASParallelOperationDestroyExp, version, ZE_API_VERSION_1_7);
fillDdiEntry(pDdiTable->pfnCreateExp, L0::globalDriverDispatch.coreRTASParallelOperationExp.pfnCreateExp, version, ZE_API_VERSION_1_7);
fillDdiEntry(pDdiTable->pfnGetPropertiesExp, L0::globalDriverDispatch.coreRTASParallelOperationExp.pfnGetPropertiesExp, version, ZE_API_VERSION_1_7);
fillDdiEntry(pDdiTable->pfnJoinExp, L0::globalDriverDispatch.coreRTASParallelOperationExp.pfnJoinExp, version, ZE_API_VERSION_1_7);
fillDdiEntry(pDdiTable->pfnDestroyExp, L0::globalDriverDispatch.coreRTASParallelOperationExp.pfnDestroyExp, version, ZE_API_VERSION_1_7);
driverDdiTable.coreDdiTable.RTASParallelOperationExp = *pDdiTable;
return result;
}
@@ -781,14 +775,14 @@ zeGetRTASBuilderExpProcAddrTable(
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.core.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnCreateExp, L0::zeRTASBuilderCreateExp, version, ZE_API_VERSION_1_7);
fillDdiEntry(pDdiTable->pfnGetBuildPropertiesExp, L0::zeRTASBuilderGetBuildPropertiesExp, version, ZE_API_VERSION_1_7);
fillDdiEntry(pDdiTable->pfnBuildExp, L0::zeRTASBuilderBuildExp, version, ZE_API_VERSION_1_7);
fillDdiEntry(pDdiTable->pfnDestroyExp, L0::zeRTASBuilderDestroyExp, version, ZE_API_VERSION_1_7);
fillDdiEntry(pDdiTable->pfnCreateExp, L0::globalDriverDispatch.coreRTASBuilderExp.pfnCreateExp, version, ZE_API_VERSION_1_7);
fillDdiEntry(pDdiTable->pfnGetBuildPropertiesExp, L0::globalDriverDispatch.coreRTASBuilderExp.pfnGetBuildPropertiesExp, version, ZE_API_VERSION_1_7);
fillDdiEntry(pDdiTable->pfnBuildExp, L0::globalDriverDispatch.coreRTASBuilderExp.pfnBuildExp, version, ZE_API_VERSION_1_7);
fillDdiEntry(pDdiTable->pfnDestroyExp, L0::globalDriverDispatch.coreRTASBuilderExp.pfnDestroyExp, version, ZE_API_VERSION_1_7);
driverDdiTable.coreDdiTable.RTASBuilderExp = *pDdiTable;
return result;
}

View File

@@ -5,6 +5,7 @@
*
*/
#include "level_zero/ddi/ze_ddi_tables.h"
#include <level_zero/ze_api.h>
#include <level_zero/ze_ddi.h>
#include <level_zero/zes_api.h>
@@ -12,58 +13,53 @@
#include <level_zero/zet_api.h>
#include <level_zero/zet_ddi.h>
#include "ze_ddi_tables.h"
#include "zes_sysman_all_api_entrypoints.h"
extern ze_gpu_driver_dditable_t driverDdiTable;
ZE_DLLEXPORT ze_result_t ZE_APICALL
zesGetDeviceProcAddrTable(
ze_api_version_t version,
zes_device_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesDeviceGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetState, L0::zesDeviceGetState, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnReset, L0::zesDeviceReset, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnProcessesGetState, L0::zesDeviceProcessesGetState, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnPciGetProperties, L0::zesDevicePciGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnPciGetState, L0::zesDevicePciGetState, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnPciGetBars, L0::zesDevicePciGetBars, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnPciGetStats, L0::zesDevicePciGetStats, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumDiagnosticTestSuites, L0::zesDeviceEnumDiagnosticTestSuites, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumEngineGroups, L0::zesDeviceEnumEngineGroups, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEventRegister, L0::zesDeviceEventRegister, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumFabricPorts, L0::zesDeviceEnumFabricPorts, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumFans, L0::zesDeviceEnumFans, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumFirmwares, L0::zesDeviceEnumFirmwares, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumFrequencyDomains, L0::zesDeviceEnumFrequencyDomains, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumLeds, L0::zesDeviceEnumLeds, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumMemoryModules, L0::zesDeviceEnumMemoryModules, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumPerformanceFactorDomains, L0::zesDeviceEnumPerformanceFactorDomains, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumPowerDomains, L0::zesDeviceEnumPowerDomains, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumPsus, L0::zesDeviceEnumPsus, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumRasErrorSets, L0::zesDeviceEnumRasErrorSets, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumSchedulers, L0::zesDeviceEnumSchedulers, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumStandbyDomains, L0::zesDeviceEnumStandbyDomains, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumTemperatureSensors, L0::zesDeviceEnumTemperatureSensors, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetCardPowerDomain, L0::zesDeviceGetCardPowerDomain, version, ZE_API_VERSION_1_3);
fillDdiEntry(pDdiTable->pfnEccAvailable, L0::zesDeviceEccAvailable, version, ZE_API_VERSION_1_4);
fillDdiEntry(pDdiTable->pfnEccConfigurable, L0::zesDeviceEccConfigurable, version, ZE_API_VERSION_1_4);
fillDdiEntry(pDdiTable->pfnGetEccState, L0::zesDeviceGetEccState, version, ZE_API_VERSION_1_4);
fillDdiEntry(pDdiTable->pfnSetEccState, L0::zesDeviceSetEccState, version, ZE_API_VERSION_1_4);
fillDdiEntry(pDdiTable->pfnGet, L0::zesDeviceGet, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnSetOverclockWaiver, L0::zesDeviceSetOverclockWaiver, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnGetOverclockDomains, L0::zesDeviceGetOverclockDomains, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnGetOverclockControls, L0::zesDeviceGetOverclockControls, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnResetOverclockSettings, L0::zesDeviceResetOverclockSettings, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnReadOverclockState, L0::zesDeviceReadOverclockState, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnEnumOverclockDomains, L0::zesDeviceEnumOverclockDomains, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnResetExt, L0::zesDeviceResetExt, version, ZE_API_VERSION_1_7);
fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanDevice.pfnGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetState, L0::globalDriverDispatch.sysmanDevice.pfnGetState, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnReset, L0::globalDriverDispatch.sysmanDevice.pfnReset, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnProcessesGetState, L0::globalDriverDispatch.sysmanDevice.pfnProcessesGetState, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnPciGetProperties, L0::globalDriverDispatch.sysmanDevice.pfnPciGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnPciGetState, L0::globalDriverDispatch.sysmanDevice.pfnPciGetState, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnPciGetBars, L0::globalDriverDispatch.sysmanDevice.pfnPciGetBars, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnPciGetStats, L0::globalDriverDispatch.sysmanDevice.pfnPciGetStats, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumDiagnosticTestSuites, L0::globalDriverDispatch.sysmanDevice.pfnEnumDiagnosticTestSuites, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumEngineGroups, L0::globalDriverDispatch.sysmanDevice.pfnEnumEngineGroups, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEventRegister, L0::globalDriverDispatch.sysmanDevice.pfnEventRegister, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumFabricPorts, L0::globalDriverDispatch.sysmanDevice.pfnEnumFabricPorts, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumFans, L0::globalDriverDispatch.sysmanDevice.pfnEnumFans, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumFirmwares, L0::globalDriverDispatch.sysmanDevice.pfnEnumFirmwares, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumFrequencyDomains, L0::globalDriverDispatch.sysmanDevice.pfnEnumFrequencyDomains, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumLeds, L0::globalDriverDispatch.sysmanDevice.pfnEnumLeds, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumMemoryModules, L0::globalDriverDispatch.sysmanDevice.pfnEnumMemoryModules, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumPerformanceFactorDomains, L0::globalDriverDispatch.sysmanDevice.pfnEnumPerformanceFactorDomains, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumPowerDomains, L0::globalDriverDispatch.sysmanDevice.pfnEnumPowerDomains, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumPsus, L0::globalDriverDispatch.sysmanDevice.pfnEnumPsus, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumRasErrorSets, L0::globalDriverDispatch.sysmanDevice.pfnEnumRasErrorSets, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumSchedulers, L0::globalDriverDispatch.sysmanDevice.pfnEnumSchedulers, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumStandbyDomains, L0::globalDriverDispatch.sysmanDevice.pfnEnumStandbyDomains, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEnumTemperatureSensors, L0::globalDriverDispatch.sysmanDevice.pfnEnumTemperatureSensors, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetCardPowerDomain, L0::globalDriverDispatch.sysmanDevice.pfnGetCardPowerDomain, version, ZE_API_VERSION_1_3);
fillDdiEntry(pDdiTable->pfnEccAvailable, L0::globalDriverDispatch.sysmanDevice.pfnEccAvailable, version, ZE_API_VERSION_1_4);
fillDdiEntry(pDdiTable->pfnEccConfigurable, L0::globalDriverDispatch.sysmanDevice.pfnEccConfigurable, version, ZE_API_VERSION_1_4);
fillDdiEntry(pDdiTable->pfnGetEccState, L0::globalDriverDispatch.sysmanDevice.pfnGetEccState, version, ZE_API_VERSION_1_4);
fillDdiEntry(pDdiTable->pfnSetEccState, L0::globalDriverDispatch.sysmanDevice.pfnSetEccState, version, ZE_API_VERSION_1_4);
fillDdiEntry(pDdiTable->pfnGet, L0::globalDriverDispatch.sysmanDevice.pfnGet, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnSetOverclockWaiver, L0::globalDriverDispatch.sysmanDevice.pfnSetOverclockWaiver, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnGetOverclockDomains, L0::globalDriverDispatch.sysmanDevice.pfnGetOverclockDomains, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnGetOverclockControls, L0::globalDriverDispatch.sysmanDevice.pfnGetOverclockControls, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnResetOverclockSettings, L0::globalDriverDispatch.sysmanDevice.pfnResetOverclockSettings, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnReadOverclockState, L0::globalDriverDispatch.sysmanDevice.pfnReadOverclockState, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnEnumOverclockDomains, L0::globalDriverDispatch.sysmanDevice.pfnEnumOverclockDomains, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnResetExt, L0::globalDriverDispatch.sysmanDevice.pfnResetExt, version, ZE_API_VERSION_1_7);
return result;
}
@@ -74,11 +70,11 @@ zesGetGlobalProcAddrTable(
zes_global_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnInit, L0::zesInit, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnInit, L0::globalDriverDispatch.sysmanGlobal.pfnInit, version, ZE_API_VERSION_1_5);
return result;
}
@@ -89,15 +85,15 @@ zesGetDriverProcAddrTable(
zes_driver_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnEventListen, L0::zesDriverEventListen, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEventListenEx, L0::zesDriverEventListenEx, version, ZE_API_VERSION_1_1);
fillDdiEntry(pDdiTable->pfnGet, L0::zesDriverGet, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnGetExtensionProperties, L0::zesDriverGetExtensionProperties, version, ZE_API_VERSION_1_8);
fillDdiEntry(pDdiTable->pfnGetExtensionFunctionAddress, L0::zesDriverGetExtensionFunctionAddress, version, ZE_API_VERSION_1_8);
fillDdiEntry(pDdiTable->pfnEventListen, L0::globalDriverDispatch.sysmanDriver.pfnEventListen, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnEventListenEx, L0::globalDriverDispatch.sysmanDriver.pfnEventListenEx, version, ZE_API_VERSION_1_1);
fillDdiEntry(pDdiTable->pfnGet, L0::globalDriverDispatch.sysmanDriver.pfnGet, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnGetExtensionProperties, L0::globalDriverDispatch.sysmanDriver.pfnGetExtensionProperties, version, ZE_API_VERSION_1_8);
fillDdiEntry(pDdiTable->pfnGetExtensionFunctionAddress, L0::globalDriverDispatch.sysmanDriver.pfnGetExtensionFunctionAddress, version, ZE_API_VERSION_1_8);
return result;
}
@@ -107,13 +103,13 @@ zesGetDiagnosticsProcAddrTable(
zes_diagnostics_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesDiagnosticsGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetTests, L0::zesDiagnosticsGetTests, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnRunTests, L0::zesDiagnosticsRunTests, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanDiagnostics.pfnGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetTests, L0::globalDriverDispatch.sysmanDiagnostics.pfnGetTests, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnRunTests, L0::globalDriverDispatch.sysmanDiagnostics.pfnRunTests, version, ZE_API_VERSION_1_0);
return result;
}
@@ -124,14 +120,14 @@ zesGetEngineProcAddrTable(
zes_engine_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesEngineGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetActivity, L0::zesEngineGetActivity, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetActivityExt, L0::zesEngineGetActivityExt, version, ZE_API_VERSION_1_7);
fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanEngine.pfnGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetActivity, L0::globalDriverDispatch.sysmanEngine.pfnGetActivity, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetActivityExt, L0::globalDriverDispatch.sysmanEngine.pfnGetActivityExt, version, ZE_API_VERSION_1_7);
return result;
}
@@ -142,18 +138,18 @@ zesGetFabricPortProcAddrTable(
zes_fabric_port_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesFabricPortGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetLinkType, L0::zesFabricPortGetLinkType, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetConfig, L0::zesFabricPortGetConfig, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetConfig, L0::zesFabricPortSetConfig, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetState, L0::zesFabricPortGetState, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetThroughput, L0::zesFabricPortGetThroughput, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetFabricErrorCounters, L0::zesFabricPortGetFabricErrorCounters, version, ZE_API_VERSION_1_7);
fillDdiEntry(pDdiTable->pfnGetMultiPortThroughput, L0::zesFabricPortGetMultiPortThroughput, version, ZE_API_VERSION_1_7);
fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanFabricPort.pfnGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetLinkType, L0::globalDriverDispatch.sysmanFabricPort.pfnGetLinkType, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetConfig, L0::globalDriverDispatch.sysmanFabricPort.pfnGetConfig, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetConfig, L0::globalDriverDispatch.sysmanFabricPort.pfnSetConfig, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetState, L0::globalDriverDispatch.sysmanFabricPort.pfnGetState, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetThroughput, L0::globalDriverDispatch.sysmanFabricPort.pfnGetThroughput, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetFabricErrorCounters, L0::globalDriverDispatch.sysmanFabricPort.pfnGetFabricErrorCounters, version, ZE_API_VERSION_1_7);
fillDdiEntry(pDdiTable->pfnGetMultiPortThroughput, L0::globalDriverDispatch.sysmanFabricPort.pfnGetMultiPortThroughput, version, ZE_API_VERSION_1_7);
return result;
}
@@ -164,16 +160,16 @@ zesGetFanProcAddrTable(
zes_fan_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesFanGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetConfig, L0::zesFanGetConfig, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetDefaultMode, L0::zesFanSetDefaultMode, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetFixedSpeedMode, L0::zesFanSetFixedSpeedMode, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetSpeedTableMode, L0::zesFanSetSpeedTableMode, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetState, L0::zesFanGetState, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanFan.pfnGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetConfig, L0::globalDriverDispatch.sysmanFan.pfnGetConfig, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetDefaultMode, L0::globalDriverDispatch.sysmanFan.pfnSetDefaultMode, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetFixedSpeedMode, L0::globalDriverDispatch.sysmanFan.pfnSetFixedSpeedMode, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetSpeedTableMode, L0::globalDriverDispatch.sysmanFan.pfnSetSpeedTableMode, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetState, L0::globalDriverDispatch.sysmanFan.pfnGetState, version, ZE_API_VERSION_1_0);
return result;
}
@@ -184,14 +180,14 @@ zesGetFirmwareProcAddrTable(
zes_firmware_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesFirmwareGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnFlash, L0::zesFirmwareFlash, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetFlashProgress, L0::zesFirmwareGetFlashProgress, version, ZE_API_VERSION_1_8);
fillDdiEntry(pDdiTable->pfnGetConsoleLogs, L0::zesFirmwareGetConsoleLogs, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanFirmware.pfnGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnFlash, L0::globalDriverDispatch.sysmanFirmware.pfnFlash, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetFlashProgress, L0::globalDriverDispatch.sysmanFirmware.pfnGetFlashProgress, version, ZE_API_VERSION_1_8);
fillDdiEntry(pDdiTable->pfnGetConsoleLogs, L0::globalDriverDispatch.sysmanFirmware.pfnGetConsoleLogs, version, ZE_API_VERSION_1_9);
return result;
}
@@ -202,28 +198,28 @@ zesGetFrequencyProcAddrTable(
zes_frequency_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesFrequencyGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetAvailableClocks, L0::zesFrequencyGetAvailableClocks, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetRange, L0::zesFrequencyGetRange, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetRange, L0::zesFrequencySetRange, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetState, L0::zesFrequencyGetState, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetThrottleTime, L0::zesFrequencyGetThrottleTime, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnOcGetCapabilities, L0::zesFrequencyOcGetCapabilities, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnOcGetFrequencyTarget, L0::zesFrequencyOcGetFrequencyTarget, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnOcSetFrequencyTarget, L0::zesFrequencyOcSetFrequencyTarget, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnOcGetVoltageTarget, L0::zesFrequencyOcGetVoltageTarget, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnOcSetVoltageTarget, L0::zesFrequencyOcSetVoltageTarget, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnOcSetMode, L0::zesFrequencyOcSetMode, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnOcGetMode, L0::zesFrequencyOcGetMode, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnOcGetIccMax, L0::zesFrequencyOcGetIccMax, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnOcSetIccMax, L0::zesFrequencyOcSetIccMax, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnOcGetTjMax, L0::zesFrequencyOcGetTjMax, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnOcSetTjMax, L0::zesFrequencyOcSetTjMax, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanFrequency.pfnGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetAvailableClocks, L0::globalDriverDispatch.sysmanFrequency.pfnGetAvailableClocks, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetRange, L0::globalDriverDispatch.sysmanFrequency.pfnGetRange, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetRange, L0::globalDriverDispatch.sysmanFrequency.pfnSetRange, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetState, L0::globalDriverDispatch.sysmanFrequency.pfnGetState, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetThrottleTime, L0::globalDriverDispatch.sysmanFrequency.pfnGetThrottleTime, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnOcGetCapabilities, L0::globalDriverDispatch.sysmanFrequency.pfnOcGetCapabilities, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnOcGetFrequencyTarget, L0::globalDriverDispatch.sysmanFrequency.pfnOcGetFrequencyTarget, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnOcSetFrequencyTarget, L0::globalDriverDispatch.sysmanFrequency.pfnOcSetFrequencyTarget, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnOcGetVoltageTarget, L0::globalDriverDispatch.sysmanFrequency.pfnOcGetVoltageTarget, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnOcSetVoltageTarget, L0::globalDriverDispatch.sysmanFrequency.pfnOcSetVoltageTarget, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnOcSetMode, L0::globalDriverDispatch.sysmanFrequency.pfnOcSetMode, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnOcGetMode, L0::globalDriverDispatch.sysmanFrequency.pfnOcGetMode, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnOcGetIccMax, L0::globalDriverDispatch.sysmanFrequency.pfnOcGetIccMax, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnOcSetIccMax, L0::globalDriverDispatch.sysmanFrequency.pfnOcSetIccMax, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnOcGetTjMax, L0::globalDriverDispatch.sysmanFrequency.pfnOcGetTjMax, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnOcSetTjMax, L0::globalDriverDispatch.sysmanFrequency.pfnOcSetTjMax, version, ZE_API_VERSION_1_0);
return result;
}
@@ -234,14 +230,14 @@ zesGetLedProcAddrTable(
zes_led_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesLedGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetState, L0::zesLedGetState, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetState, L0::zesLedSetState, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetColor, L0::zesLedSetColor, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanLed.pfnGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetState, L0::globalDriverDispatch.sysmanLed.pfnGetState, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetState, L0::globalDriverDispatch.sysmanLed.pfnSetState, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetColor, L0::globalDriverDispatch.sysmanLed.pfnSetColor, version, ZE_API_VERSION_1_0);
return result;
}
@@ -252,13 +248,13 @@ zesGetMemoryProcAddrTable(
zes_memory_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesMemoryGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetState, L0::zesMemoryGetState, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetBandwidth, L0::zesMemoryGetBandwidth, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanMemory.pfnGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetState, L0::globalDriverDispatch.sysmanMemory.pfnGetState, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetBandwidth, L0::globalDriverDispatch.sysmanMemory.pfnGetBandwidth, version, ZE_API_VERSION_1_0);
return result;
}
@@ -269,13 +265,13 @@ zesGetPerformanceFactorProcAddrTable(
zes_performance_factor_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesPerformanceFactorGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetConfig, L0::zesPerformanceFactorGetConfig, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetConfig, L0::zesPerformanceFactorSetConfig, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanPerformanceFactor.pfnGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetConfig, L0::globalDriverDispatch.sysmanPerformanceFactor.pfnGetConfig, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetConfig, L0::globalDriverDispatch.sysmanPerformanceFactor.pfnSetConfig, version, ZE_API_VERSION_1_0);
return result;
}
@@ -286,18 +282,18 @@ zesGetPowerProcAddrTable(
zes_power_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesPowerGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetEnergyCounter, L0::zesPowerGetEnergyCounter, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetLimits, L0::zesPowerGetLimits, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetLimits, L0::zesPowerSetLimits, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetEnergyThreshold, L0::zesPowerGetEnergyThreshold, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetEnergyThreshold, L0::zesPowerSetEnergyThreshold, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetLimitsExt, L0::zesPowerGetLimitsExt, version, ZE_API_VERSION_1_4);
fillDdiEntry(pDdiTable->pfnSetLimitsExt, L0::zesPowerSetLimitsExt, version, ZE_API_VERSION_1_4);
fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanPower.pfnGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetEnergyCounter, L0::globalDriverDispatch.sysmanPower.pfnGetEnergyCounter, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetLimits, L0::globalDriverDispatch.sysmanPower.pfnGetLimits, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetLimits, L0::globalDriverDispatch.sysmanPower.pfnSetLimits, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetEnergyThreshold, L0::globalDriverDispatch.sysmanPower.pfnGetEnergyThreshold, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetEnergyThreshold, L0::globalDriverDispatch.sysmanPower.pfnSetEnergyThreshold, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetLimitsExt, L0::globalDriverDispatch.sysmanPower.pfnGetLimitsExt, version, ZE_API_VERSION_1_4);
fillDdiEntry(pDdiTable->pfnSetLimitsExt, L0::globalDriverDispatch.sysmanPower.pfnSetLimitsExt, version, ZE_API_VERSION_1_4);
return result;
}
@@ -308,12 +304,12 @@ zesGetPsuProcAddrTable(
zes_psu_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesPsuGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetState, L0::zesPsuGetState, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanPsu.pfnGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetState, L0::globalDriverDispatch.sysmanPsu.pfnGetState, version, ZE_API_VERSION_1_0);
return result;
}
@@ -324,14 +320,14 @@ zesGetRasProcAddrTable(
zes_ras_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesRasGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetConfig, L0::zesRasGetConfig, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetConfig, L0::zesRasSetConfig, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetState, L0::zesRasGetState, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanRas.pfnGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetConfig, L0::globalDriverDispatch.sysmanRas.pfnGetConfig, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetConfig, L0::globalDriverDispatch.sysmanRas.pfnSetConfig, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetState, L0::globalDriverDispatch.sysmanRas.pfnGetState, version, ZE_API_VERSION_1_0);
return result;
}
@@ -342,12 +338,12 @@ zesGetRasExpProcAddrTable(
zes_ras_exp_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetStateExp, L0::zesRasGetStateExp, version, ZE_API_VERSION_1_7);
fillDdiEntry(pDdiTable->pfnClearStateExp, L0::zesRasClearStateExp, version, ZE_API_VERSION_1_7);
fillDdiEntry(pDdiTable->pfnGetStateExp, L0::globalDriverDispatch.sysmanRasExp.pfnGetStateExp, version, ZE_API_VERSION_1_7);
fillDdiEntry(pDdiTable->pfnClearStateExp, L0::globalDriverDispatch.sysmanRasExp.pfnClearStateExp, version, ZE_API_VERSION_1_7);
return result;
}
@@ -356,12 +352,11 @@ ZE_DLLEXPORT ze_result_t ZE_APICALL zesGetDriverExpProcAddrTable(
ze_api_version_t version, zes_driver_exp_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version) ||
ZE_MINOR_VERSION(driverDdiTable.version) > ZE_MINOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetDeviceByUuidExp, L0::zesDriverGetDeviceByUuidExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetDeviceByUuidExp, L0::globalDriverDispatch.sysmanDriverExp.pfnGetDeviceByUuidExp, version, ZE_API_VERSION_1_9);
return result;
}
@@ -371,14 +366,13 @@ ZE_DLLEXPORT ze_result_t ZE_APICALL zesGetDeviceExpProcAddrTable(
zes_device_exp_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version) ||
ZE_MINOR_VERSION(driverDdiTable.version) > ZE_MINOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetSubDevicePropertiesExp, L0::zesDeviceGetSubDevicePropertiesExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnEnumActiveVFExp, L0::zesDeviceEnumActiveVFExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnEnumEnabledVFExp, L0::zesDeviceEnumEnabledVFExp, version, ZE_API_VERSION_1_11);
fillDdiEntry(pDdiTable->pfnGetSubDevicePropertiesExp, L0::globalDriverDispatch.sysmanDeviceExp.pfnGetSubDevicePropertiesExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnEnumActiveVFExp, L0::globalDriverDispatch.sysmanDeviceExp.pfnEnumActiveVFExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnEnumEnabledVFExp, L0::globalDriverDispatch.sysmanDeviceExp.pfnEnumEnabledVFExp, version, ZE_API_VERSION_1_11);
return result;
}
@@ -389,20 +383,19 @@ zesGetVFManagementExpProcAddrTable(
zes_vf_management_exp_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version) ||
ZE_MINOR_VERSION(driverDdiTable.version) > ZE_MINOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetVFPropertiesExp, L0::zesVFManagementGetVFPropertiesExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetVFMemoryUtilizationExp, L0::zesVFManagementGetVFMemoryUtilizationExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetVFEngineUtilizationExp, L0::zesVFManagementGetVFEngineUtilizationExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnSetVFTelemetryModeExp, L0::zesVFManagementSetVFTelemetryModeExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnSetVFTelemetrySamplingIntervalExp, L0::zesVFManagementSetVFTelemetrySamplingIntervalExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetVFCapabilitiesExp, L0::zesVFManagementGetVFCapabilitiesExp, version, ZE_API_VERSION_1_11);
fillDdiEntry(pDdiTable->pfnGetVFMemoryUtilizationExp2, L0::zesVFManagementGetVFMemoryUtilizationExp2, version, ZE_API_VERSION_1_11);
fillDdiEntry(pDdiTable->pfnGetVFEngineUtilizationExp2, L0::zesVFManagementGetVFEngineUtilizationExp2, version, ZE_API_VERSION_1_11);
fillDdiEntry(pDdiTable->pfnGetVFCapabilitiesExp2, L0::zesVFManagementGetVFCapabilitiesExp2, version, ZE_API_VERSION_1_12);
fillDdiEntry(pDdiTable->pfnGetVFPropertiesExp, L0::globalDriverDispatch.sysmanVFManagementExp.pfnGetVFPropertiesExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetVFMemoryUtilizationExp, L0::globalDriverDispatch.sysmanVFManagementExp.pfnGetVFMemoryUtilizationExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetVFEngineUtilizationExp, L0::globalDriverDispatch.sysmanVFManagementExp.pfnGetVFEngineUtilizationExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnSetVFTelemetryModeExp, L0::globalDriverDispatch.sysmanVFManagementExp.pfnSetVFTelemetryModeExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnSetVFTelemetrySamplingIntervalExp, L0::globalDriverDispatch.sysmanVFManagementExp.pfnSetVFTelemetrySamplingIntervalExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetVFCapabilitiesExp, L0::globalDriverDispatch.sysmanVFManagementExp.pfnGetVFCapabilitiesExp, version, ZE_API_VERSION_1_11);
fillDdiEntry(pDdiTable->pfnGetVFMemoryUtilizationExp2, L0::globalDriverDispatch.sysmanVFManagementExp.pfnGetVFMemoryUtilizationExp2, version, ZE_API_VERSION_1_11);
fillDdiEntry(pDdiTable->pfnGetVFEngineUtilizationExp2, L0::globalDriverDispatch.sysmanVFManagementExp.pfnGetVFEngineUtilizationExp2, version, ZE_API_VERSION_1_11);
fillDdiEntry(pDdiTable->pfnGetVFCapabilitiesExp2, L0::globalDriverDispatch.sysmanVFManagementExp.pfnGetVFCapabilitiesExp2, version, ZE_API_VERSION_1_12);
return result;
}
@@ -412,13 +405,12 @@ ZE_DLLEXPORT ze_result_t ZE_APICALL zesGetFirmwareExpProcAddrTable(
zes_firmware_exp_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version) ||
ZE_MINOR_VERSION(driverDdiTable.version) > ZE_MINOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetSecurityVersionExp, L0::zesFirmwareGetSecurityVersionExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnSetSecurityVersionExp, L0::zesFirmwareSetSecurityVersionExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetSecurityVersionExp, L0::globalDriverDispatch.sysmanFirmwareExp.pfnGetSecurityVersionExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnSetSecurityVersionExp, L0::globalDriverDispatch.sysmanFirmwareExp.pfnSetSecurityVersionExp, version, ZE_API_VERSION_1_9);
return result;
}
@@ -429,18 +421,18 @@ zesGetSchedulerProcAddrTable(
zes_scheduler_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesSchedulerGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetCurrentMode, L0::zesSchedulerGetCurrentMode, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetTimeoutModeProperties, L0::zesSchedulerGetTimeoutModeProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetTimesliceModeProperties, L0::zesSchedulerGetTimesliceModeProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetTimeoutMode, L0::zesSchedulerSetTimeoutMode, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetTimesliceMode, L0::zesSchedulerSetTimesliceMode, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetExclusiveMode, L0::zesSchedulerSetExclusiveMode, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetComputeUnitDebugMode, L0::zesSchedulerSetComputeUnitDebugMode, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanScheduler.pfnGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetCurrentMode, L0::globalDriverDispatch.sysmanScheduler.pfnGetCurrentMode, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetTimeoutModeProperties, L0::globalDriverDispatch.sysmanScheduler.pfnGetTimeoutModeProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetTimesliceModeProperties, L0::globalDriverDispatch.sysmanScheduler.pfnGetTimesliceModeProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetTimeoutMode, L0::globalDriverDispatch.sysmanScheduler.pfnSetTimeoutMode, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetTimesliceMode, L0::globalDriverDispatch.sysmanScheduler.pfnSetTimesliceMode, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetExclusiveMode, L0::globalDriverDispatch.sysmanScheduler.pfnSetExclusiveMode, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetComputeUnitDebugMode, L0::globalDriverDispatch.sysmanScheduler.pfnSetComputeUnitDebugMode, version, ZE_API_VERSION_1_0);
return result;
}
@@ -451,13 +443,13 @@ zesGetStandbyProcAddrTable(
zes_standby_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesStandbyGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetMode, L0::zesStandbyGetMode, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetMode, L0::zesStandbySetMode, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanStandby.pfnGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetMode, L0::globalDriverDispatch.sysmanStandby.pfnGetMode, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetMode, L0::globalDriverDispatch.sysmanStandby.pfnSetMode, version, ZE_API_VERSION_1_0);
return result;
}
@@ -468,14 +460,14 @@ zesGetTemperatureProcAddrTable(
zes_temperature_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetProperties, L0::zesTemperatureGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetConfig, L0::zesTemperatureGetConfig, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetConfig, L0::zesTemperatureSetConfig, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetState, L0::zesTemperatureGetState, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.sysmanTemperature.pfnGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetConfig, L0::globalDriverDispatch.sysmanTemperature.pfnGetConfig, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetConfig, L0::globalDriverDispatch.sysmanTemperature.pfnSetConfig, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetState, L0::globalDriverDispatch.sysmanTemperature.pfnGetState, version, ZE_API_VERSION_1_0);
return result;
}
@@ -487,19 +479,19 @@ zesGetOverclockProcAddrTable(
) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.sysman.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetDomainProperties, L0::zesOverclockGetDomainProperties, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnGetDomainVFProperties, L0::zesOverclockGetDomainVFProperties, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnGetDomainControlProperties, L0::zesOverclockGetDomainControlProperties, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnGetControlCurrentValue, L0::zesOverclockGetControlCurrentValue, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnGetControlPendingValue, L0::zesOverclockGetControlPendingValue, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnSetControlUserValue, L0::zesOverclockSetControlUserValue, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnGetControlState, L0::zesOverclockGetControlState, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnGetVFPointValues, L0::zesOverclockGetVFPointValues, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnSetVFPointValues, L0::zesOverclockSetVFPointValues, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnGetDomainProperties, L0::globalDriverDispatch.sysmanOverclock.pfnGetDomainProperties, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnGetDomainVFProperties, L0::globalDriverDispatch.sysmanOverclock.pfnGetDomainVFProperties, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnGetDomainControlProperties, L0::globalDriverDispatch.sysmanOverclock.pfnGetDomainControlProperties, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnGetControlCurrentValue, L0::globalDriverDispatch.sysmanOverclock.pfnGetControlCurrentValue, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnGetControlPendingValue, L0::globalDriverDispatch.sysmanOverclock.pfnGetControlPendingValue, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnSetControlUserValue, L0::globalDriverDispatch.sysmanOverclock.pfnSetControlUserValue, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnGetControlState, L0::globalDriverDispatch.sysmanOverclock.pfnGetControlState, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnGetVFPointValues, L0::globalDriverDispatch.sysmanOverclock.pfnGetVFPointValues, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnSetVFPointValues, L0::globalDriverDispatch.sysmanOverclock.pfnSetVFPointValues, version, ZE_API_VERSION_1_5);
return result;
}

View File

@@ -5,8 +5,7 @@
*
*/
#include "level_zero/api/driver_experimental/tracing/zet_tracing.h"
#include "level_zero/api/extensions/public/ze_exp_ext.h"
#include "level_zero/ddi/ze_ddi_tables.h"
#include <level_zero/ze_api.h>
#include <level_zero/ze_ddi.h>
#include <level_zero/zes_api.h>
@@ -14,11 +13,6 @@
#include <level_zero/zet_api.h>
#include <level_zero/zet_ddi.h>
#include "ze_ddi_tables.h"
#include "zet_tools_all_api_entrypoints.h"
extern ze_gpu_driver_dditable_t driverDdiTable;
ZE_DLLEXPORT ze_result_t ZE_APICALL
zetGetContextProcAddrTable(
ze_api_version_t version,
@@ -26,9 +20,9 @@ zetGetContextProcAddrTable(
ze_result_t result = ZE_RESULT_SUCCESS;
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.tools.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
fillDdiEntry(pDdiTable->pfnActivateMetricGroups, L0::zetContextActivateMetricGroups, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnActivateMetricGroups, L0::globalDriverDispatch.toolsContext.pfnActivateMetricGroups, version, ZE_API_VERSION_1_0);
return result;
}
@@ -38,13 +32,13 @@ zetGetMetricStreamerProcAddrTable(
zet_metric_streamer_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.tools.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnOpen, L0::zetMetricStreamerOpen, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnClose, L0::zetMetricStreamerClose, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnReadData, L0::zetMetricStreamerReadData, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnOpen, L0::globalDriverDispatch.toolsMetricStreamer.pfnOpen, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnClose, L0::globalDriverDispatch.toolsMetricStreamer.pfnClose, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnReadData, L0::globalDriverDispatch.toolsMetricStreamer.pfnReadData, version, ZE_API_VERSION_1_0);
return result;
}
@@ -55,14 +49,14 @@ zetGetTracerExpProcAddrTable(
zet_tracer_exp_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.tools.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnCreate, L0::zetTracerExpCreate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDestroy, L0::zetTracerExpDestroy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetPrologues, L0::zetTracerExpSetPrologues, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetEpilogues, L0::zetTracerExpSetEpilogues, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetEnabled, L0::zetTracerExpSetEnabled, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnCreate, L0::globalDriverDispatch.toolsTracerExp.pfnCreate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.toolsTracerExp.pfnDestroy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetPrologues, L0::globalDriverDispatch.toolsTracerExp.pfnSetPrologues, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetEpilogues, L0::globalDriverDispatch.toolsTracerExp.pfnSetEpilogues, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnSetEnabled, L0::globalDriverDispatch.toolsTracerExp.pfnSetEnabled, version, ZE_API_VERSION_1_0);
return result;
}
@@ -72,13 +66,13 @@ zetGetCommandListProcAddrTable(
zet_command_list_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.tools.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnAppendMetricStreamerMarker, L0::zetCommandListAppendMetricStreamerMarker, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendMetricQueryBegin, L0::zetCommandListAppendMetricQueryBegin, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendMetricQueryEnd, L0::zetCommandListAppendMetricQueryEnd, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendMetricMemoryBarrier, L0::zetCommandListAppendMetricMemoryBarrier, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendMetricStreamerMarker, L0::globalDriverDispatch.toolsCommandList.pfnAppendMetricStreamerMarker, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendMetricQueryBegin, L0::globalDriverDispatch.toolsCommandList.pfnAppendMetricQueryBegin, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendMetricQueryEnd, L0::globalDriverDispatch.toolsCommandList.pfnAppendMetricQueryEnd, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAppendMetricMemoryBarrier, L0::globalDriverDispatch.toolsCommandList.pfnAppendMetricMemoryBarrier, version, ZE_API_VERSION_1_0);
return result;
}
@@ -88,10 +82,10 @@ zetGetModuleProcAddrTable(
zet_module_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.tools.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetDebugInfo, L0::zetModuleGetDebugInfo, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetDebugInfo, L0::globalDriverDispatch.toolsModule.pfnGetDebugInfo, version, ZE_API_VERSION_1_0);
return result;
}
@@ -101,10 +95,10 @@ zetGetKernelProcAddrTable(
zet_kernel_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.tools.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetProfileInfo, L0::zetKernelGetProfileInfo, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetProfileInfo, L0::globalDriverDispatch.toolsKernel.pfnGetProfileInfo, version, ZE_API_VERSION_1_0);
return result;
}
@@ -114,12 +108,12 @@ zetGetMetricGroupProcAddrTable(
zet_metric_group_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.tools.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGet, L0::zetMetricGroupGet, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetProperties, L0::zetMetricGroupGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnCalculateMetricValues, L0::zetMetricGroupCalculateMetricValues, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGet, L0::globalDriverDispatch.toolsMetricGroup.pfnGet, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.toolsMetricGroup.pfnGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnCalculateMetricValues, L0::globalDriverDispatch.toolsMetricGroup.pfnCalculateMetricValues, version, ZE_API_VERSION_1_0);
return result;
}
@@ -129,12 +123,12 @@ zetGetMetricProcAddrTable(
zet_metric_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.tools.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGet, L0::zetMetricGet, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetProperties, L0::zetMetricGetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGet, L0::globalDriverDispatch.toolsMetric.pfnGet, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetProperties, L0::globalDriverDispatch.toolsMetric.pfnGetProperties, version, ZE_API_VERSION_1_0);
return result;
}
@@ -144,11 +138,11 @@ zetGetMetricQueryPoolProcAddrTable(
zet_metric_query_pool_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.tools.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnCreate, L0::zetMetricQueryPoolCreate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDestroy, L0::zetMetricQueryPoolDestroy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnCreate, L0::globalDriverDispatch.toolsMetricQueryPool.pfnCreate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.toolsMetricQueryPool.pfnDestroy, version, ZE_API_VERSION_1_0);
return result;
}
@@ -158,14 +152,14 @@ zetGetMetricQueryProcAddrTable(
zet_metric_query_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.tools.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnCreate, L0::zetMetricQueryCreate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDestroy, L0::zetMetricQueryDestroy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnReset, L0::zetMetricQueryReset, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetData, L0::zetMetricQueryGetData, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnCreate, L0::globalDriverDispatch.toolsMetricQuery.pfnCreate, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDestroy, L0::globalDriverDispatch.toolsMetricQuery.pfnDestroy, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnReset, L0::globalDriverDispatch.toolsMetricQuery.pfnReset, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetData, L0::globalDriverDispatch.toolsMetricQuery.pfnGetData, version, ZE_API_VERSION_1_0);
return result;
}
@@ -175,11 +169,11 @@ zetGetDeviceProcAddrTable(
zet_device_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.tools.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetDebugProperties, L0::zetDeviceGetDebugProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetDebugProperties, L0::globalDriverDispatch.toolsDevice.pfnGetDebugProperties, version, ZE_API_VERSION_1_0);
return result;
}
@@ -189,22 +183,22 @@ zetGetDebugProcAddrTable(
zet_debug_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.tools.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnAttach, L0::zetDebugAttach, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDetach, L0::zetDebugDetach, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnReadEvent, L0::zetDebugReadEvent, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAcknowledgeEvent, L0::zetDebugAcknowledgeEvent, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnInterrupt, L0::zetDebugInterrupt, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnResume, L0::zetDebugResume, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnReadMemory, L0::zetDebugReadMemory, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnWriteMemory, L0::zetDebugWriteMemory, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetRegisterSetProperties, L0::zetDebugGetRegisterSetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnReadRegisters, L0::zetDebugReadRegisters, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnWriteRegisters, L0::zetDebugWriteRegisters, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetThreadRegisterSetProperties, L0::zetDebugGetThreadRegisterSetProperties, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnAttach, L0::globalDriverDispatch.toolsDebug.pfnAttach, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnDetach, L0::globalDriverDispatch.toolsDebug.pfnDetach, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnReadEvent, L0::globalDriverDispatch.toolsDebug.pfnReadEvent, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnAcknowledgeEvent, L0::globalDriverDispatch.toolsDebug.pfnAcknowledgeEvent, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnInterrupt, L0::globalDriverDispatch.toolsDebug.pfnInterrupt, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnResume, L0::globalDriverDispatch.toolsDebug.pfnResume, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnReadMemory, L0::globalDriverDispatch.toolsDebug.pfnReadMemory, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnWriteMemory, L0::globalDriverDispatch.toolsDebug.pfnWriteMemory, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetRegisterSetProperties, L0::globalDriverDispatch.toolsDebug.pfnGetRegisterSetProperties, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnReadRegisters, L0::globalDriverDispatch.toolsDebug.pfnReadRegisters, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnWriteRegisters, L0::globalDriverDispatch.toolsDebug.pfnWriteRegisters, version, ZE_API_VERSION_1_0);
fillDdiEntry(pDdiTable->pfnGetThreadRegisterSetProperties, L0::globalDriverDispatch.toolsDebug.pfnGetThreadRegisterSetProperties, version, ZE_API_VERSION_1_5);
return result;
}
@@ -215,19 +209,19 @@ zetGetMetricGroupExpProcAddrTable(
zet_metric_group_exp_dditable_t *pDdiTable) {
if (nullptr == pDdiTable)
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
if (ZE_MAJOR_VERSION(driverDdiTable.version) != ZE_MAJOR_VERSION(version))
if (ZE_MAJOR_VERSION(L0::globalDriverDispatch.tools.version) != ZE_MAJOR_VERSION(version))
return ZE_RESULT_ERROR_UNSUPPORTED_VERSION;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnCalculateMultipleMetricValuesExp, L0::zetMetricGroupCalculateMultipleMetricValuesExp, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnGetGlobalTimestampsExp, L0::zetMetricGroupGetGlobalTimestampsExp, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnGetExportDataExp, L0::zetMetricGroupGetExportDataExp, version, ZE_API_VERSION_1_6);
fillDdiEntry(pDdiTable->pfnCalculateMetricExportDataExp, L0::zetDriverCalculateMetricExportDataExp, version, ZE_API_VERSION_1_6);
fillDdiEntry(pDdiTable->pfnCreateExp, L0::zetMetricGroupCreateExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnAddMetricExp, L0::zetMetricGroupAddMetricExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnRemoveMetricExp, L0::zetMetricGroupRemoveMetricExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnCloseExp, L0::zetMetricGroupCloseExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnDestroyExp, L0::zetMetricGroupDestroyExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnCalculateMultipleMetricValuesExp, L0::globalDriverDispatch.toolsMetricGroupExp.pfnCalculateMultipleMetricValuesExp, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnGetGlobalTimestampsExp, L0::globalDriverDispatch.toolsMetricGroupExp.pfnGetGlobalTimestampsExp, version, ZE_API_VERSION_1_5);
fillDdiEntry(pDdiTable->pfnGetExportDataExp, L0::globalDriverDispatch.toolsMetricGroupExp.pfnGetExportDataExp, version, ZE_API_VERSION_1_6);
fillDdiEntry(pDdiTable->pfnCalculateMetricExportDataExp, L0::globalDriverDispatch.toolsMetricGroupExp.pfnCalculateMetricExportDataExp, version, ZE_API_VERSION_1_6);
fillDdiEntry(pDdiTable->pfnCreateExp, L0::globalDriverDispatch.toolsMetricGroupExp.pfnCreateExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnAddMetricExp, L0::globalDriverDispatch.toolsMetricGroupExp.pfnAddMetricExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnRemoveMetricExp, L0::globalDriverDispatch.toolsMetricGroupExp.pfnRemoveMetricExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnCloseExp, L0::globalDriverDispatch.toolsMetricGroupExp.pfnCloseExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnDestroyExp, L0::globalDriverDispatch.toolsMetricGroupExp.pfnDestroyExp, version, ZE_API_VERSION_1_9);
return result;
}
@@ -241,10 +235,10 @@ zetGetMetricProgrammableExpProcAddrTable(
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetExp, L0::zetMetricProgrammableGetExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetPropertiesExp, L0::zetMetricProgrammableGetPropertiesExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetParamInfoExp, L0::zetMetricProgrammableGetParamInfoExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetParamValueInfoExp, L0::zetMetricProgrammableGetParamValueInfoExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetExp, L0::globalDriverDispatch.toolsMetricProgrammableExp.pfnGetExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetPropertiesExp, L0::globalDriverDispatch.toolsMetricProgrammableExp.pfnGetPropertiesExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetParamInfoExp, L0::globalDriverDispatch.toolsMetricProgrammableExp.pfnGetParamInfoExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnGetParamValueInfoExp, L0::globalDriverDispatch.toolsMetricProgrammableExp.pfnGetParamValueInfoExp, version, ZE_API_VERSION_1_9);
return result;
}
@@ -258,8 +252,8 @@ zetGetMetricExpProcAddrTable(
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnCreateFromProgrammableExp, L0::zetMetricCreateFromProgrammableExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnDestroyExp, L0::zetMetricDestroyExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnCreateFromProgrammableExp, L0::globalDriverDispatch.toolsMetricExp.pfnCreateFromProgrammableExp, version, ZE_API_VERSION_1_9);
fillDdiEntry(pDdiTable->pfnDestroyExp, L0::globalDriverDispatch.toolsMetricExp.pfnDestroyExp, version, ZE_API_VERSION_1_9);
return result;
}
@@ -273,12 +267,12 @@ zetGetMetricTracerExpProcAddrTable(
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnCreateExp, L0::zetMetricTracerCreateExp, version, ZE_API_VERSION_1_11);
fillDdiEntry(pDdiTable->pfnDestroyExp, L0::zetMetricTracerDestroyExp, version, ZE_API_VERSION_1_11);
fillDdiEntry(pDdiTable->pfnEnableExp, L0::zetMetricTracerEnableExp, version, ZE_API_VERSION_1_11);
fillDdiEntry(pDdiTable->pfnDisableExp, L0::zetMetricTracerDisableExp, version, ZE_API_VERSION_1_11);
fillDdiEntry(pDdiTable->pfnReadDataExp, L0::zetMetricTracerReadDataExp, version, ZE_API_VERSION_1_11);
fillDdiEntry(pDdiTable->pfnDecodeExp, L0::zetMetricTracerDecodeExp, version, ZE_API_VERSION_1_11);
fillDdiEntry(pDdiTable->pfnCreateExp, L0::globalDriverDispatch.toolsMetricTracerExp.pfnCreateExp, version, ZE_API_VERSION_1_11);
fillDdiEntry(pDdiTable->pfnDestroyExp, L0::globalDriverDispatch.toolsMetricTracerExp.pfnDestroyExp, version, ZE_API_VERSION_1_11);
fillDdiEntry(pDdiTable->pfnEnableExp, L0::globalDriverDispatch.toolsMetricTracerExp.pfnEnableExp, version, ZE_API_VERSION_1_11);
fillDdiEntry(pDdiTable->pfnDisableExp, L0::globalDriverDispatch.toolsMetricTracerExp.pfnDisableExp, version, ZE_API_VERSION_1_11);
fillDdiEntry(pDdiTable->pfnReadDataExp, L0::globalDriverDispatch.toolsMetricTracerExp.pfnReadDataExp, version, ZE_API_VERSION_1_11);
fillDdiEntry(pDdiTable->pfnDecodeExp, L0::globalDriverDispatch.toolsMetricTracerExp.pfnDecodeExp, version, ZE_API_VERSION_1_11);
return result;
}
@@ -293,9 +287,9 @@ zetGetMetricDecoderExpProcAddrTable(
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnCreateExp, L0::zetMetricDecoderCreateExp, version, ZE_API_VERSION_1_11);
fillDdiEntry(pDdiTable->pfnDestroyExp, L0::zetMetricDecoderDestroyExp, version, ZE_API_VERSION_1_11);
fillDdiEntry(pDdiTable->pfnGetDecodableMetricsExp, L0::zetMetricDecoderGetDecodableMetricsExp, version, ZE_API_VERSION_1_11);
fillDdiEntry(pDdiTable->pfnCreateExp, L0::globalDriverDispatch.toolsMetricDecoderExp.pfnCreateExp, version, ZE_API_VERSION_1_11);
fillDdiEntry(pDdiTable->pfnDestroyExp, L0::globalDriverDispatch.toolsMetricDecoderExp.pfnDestroyExp, version, ZE_API_VERSION_1_11);
fillDdiEntry(pDdiTable->pfnGetDecodableMetricsExp, L0::globalDriverDispatch.toolsMetricDecoderExp.pfnGetDecodableMetricsExp, version, ZE_API_VERSION_1_11);
return result;
}
@@ -310,8 +304,8 @@ zetGetDeviceExpProcAddrTable(
ze_result_t result = ZE_RESULT_SUCCESS;
fillDdiEntry(pDdiTable->pfnGetConcurrentMetricGroupsExp, L0::zetDeviceGetConcurrentMetricGroupsExp, version, ZE_API_VERSION_1_11);
fillDdiEntry(pDdiTable->pfnCreateMetricGroupsFromMetricsExp, L0::zetDeviceCreateMetricGroupsFromMetricsExp, version, ZE_API_VERSION_1_11);
fillDdiEntry(pDdiTable->pfnGetConcurrentMetricGroupsExp, L0::globalDriverDispatch.toolsDeviceExp.pfnGetConcurrentMetricGroupsExp, version, ZE_API_VERSION_1_11);
fillDdiEntry(pDdiTable->pfnCreateMetricGroupsFromMetricsExp, L0::globalDriverDispatch.toolsDeviceExp.pfnCreateMetricGroupsFromMetricsExp, version, ZE_API_VERSION_1_11);
return result;
}