Skip to content

Commit

Permalink
Fix reading updated state of the driver_t for checking initStatus
Browse files Browse the repository at this point in the history
- Fixed init_drivers call to correctly get the updated state of the
  driver_t entry for reliably checking the driver initStatus after call
to pfnInit.

Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
  • Loading branch information
nrspruit committed Aug 28, 2024
1 parent 1fc8584 commit b364ea0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/loader/ze_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ namespace loader
return ZE_RESULT_SUCCESS;
}

ze_result_t context_t::init_driver(driver_t driver, ze_init_flags_t flags, ze_global_dditable_t *globalInitStored, zes_global_dditable_t *sysmanGlobalInitStored, bool sysmanOnly) {
ze_result_t context_t::init_driver(driver_t &driver, ze_init_flags_t flags, ze_global_dditable_t *globalInitStored, zes_global_dditable_t *sysmanGlobalInitStored, bool sysmanOnly) {

if (sysmanOnly) {
auto getTable = reinterpret_cast<zes_pfnGetGlobalProcAddrTable_t>(
Expand Down
2 changes: 1 addition & 1 deletion source/loader/ze_loader_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ namespace loader
ze_result_t check_drivers(ze_init_flags_t flags, ze_global_dditable_t *globalInitStored, zes_global_dditable_t *sysmanGlobalInitStored, bool *requireDdiReinit, bool sysmanOnly);
void debug_trace_message(std::string errorMessage, std::string errorValue);
ze_result_t init();
ze_result_t init_driver(driver_t driver, ze_init_flags_t flags, ze_global_dditable_t *globalInitStored, zes_global_dditable_t *sysmanGlobalInitStored, bool sysmanOnly);
ze_result_t init_driver(driver_t &driver, ze_init_flags_t flags, ze_global_dditable_t *globalInitStored, zes_global_dditable_t *sysmanGlobalInitStored, bool sysmanOnly);
void add_loader_version();
~context_t();
bool intercept_enabled = false;
Expand Down

0 comments on commit b364ea0

Please sign in to comment.