From a2c0f4bcb38c2eac9b7aae8674edd6af30d590f1 Mon Sep 17 00:00:00 2001 From: "Neil R. Spruit" Date: Fri, 22 Nov 2024 07:51:43 -0800 Subject: [PATCH] Added usage of the ddi common and handle_t Signed-off-by: Neil R. Spruit --- source/drivers/null/ze_null.h | 1 + source/drivers/null/ze_nullddi.cpp | 4 ++++ source/layers/validation/ze_validation_layer.h | 1 + source/lib/ze_lib.h | 1 + source/lib/ze_libddi.cpp | 1 + source/loader/ze_loader_internal.h | 1 + 6 files changed, 9 insertions(+) diff --git a/source/drivers/null/ze_null.h b/source/drivers/null/ze_null.h index b603e2ad..6336b29b 100644 --- a/source/drivers/null/ze_null.h +++ b/source/drivers/null/ze_null.h @@ -14,6 +14,7 @@ #include "zet_ddi.h" #include "zes_ddi.h" #include "ze_util.h" +#include "ze_ddi_common.h" namespace driver { diff --git a/source/drivers/null/ze_nullddi.cpp b/source/drivers/null/ze_nullddi.cpp index 4eb10ddb..24b0ca62 100644 --- a/source/drivers/null/ze_nullddi.cpp +++ b/source/drivers/null/ze_nullddi.cpp @@ -21,6 +21,10 @@ namespace driver ) { ze_result_t result = ZE_RESULT_SUCCESS; + ze_handle_t handle = {}; + handle.pCore = &context.zeDdiTable; + handle.pTools = &context.zetDdiTable; + handle.pSysman = &context.zesDdiTable; // if the driver has created a custom function, then call it instead of using the generic path auto pfnInit = context.zeDdiTable.Global.pfnInit; diff --git a/source/layers/validation/ze_validation_layer.h b/source/layers/validation/ze_validation_layer.h index 307b80e9..81b7f471 100644 --- a/source/layers/validation/ze_validation_layer.h +++ b/source/layers/validation/ze_validation_layer.h @@ -11,6 +11,7 @@ #include "ze_ddi.h" #include "zet_ddi.h" #include "zes_ddi.h" +#include "ze_ddi_common.h" #include "ze_util.h" #include "loader/ze_loader.h" #include "handle_lifetime.h" diff --git a/source/lib/ze_lib.h b/source/lib/ze_lib.h index 73589936..f4d75c89 100644 --- a/source/lib/ze_lib.h +++ b/source/lib/ze_lib.h @@ -10,6 +10,7 @@ #pragma once #include "ze_api.h" #include "ze_ddi.h" +#include "ze_ddi_common.h" #include "zet_api.h" #include "zet_ddi.h" #include "zes_api.h" diff --git a/source/lib/ze_libddi.cpp b/source/lib/ze_libddi.cpp index 42aa0dde..39d19d65 100644 --- a/source/lib/ze_libddi.cpp +++ b/source/lib/ze_libddi.cpp @@ -10,6 +10,7 @@ #include "ze_lib.h" #ifndef DYNAMIC_LOAD_LOADER #include "ze_ddi.h" +#include "ze_ddi_common.h" #endif namespace ze_lib diff --git a/source/loader/ze_loader_internal.h b/source/loader/ze_loader_internal.h index 087adef9..d27edee7 100644 --- a/source/loader/ze_loader_internal.h +++ b/source/loader/ze_loader_internal.h @@ -13,6 +13,7 @@ #include "ze_ddi.h" #include "zet_ddi.h" #include "zes_ddi.h" +#include "ze_ddi_common.h" #include "ze_util.h" #include "ze_object.h"