Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions source/lib/ze_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ namespace ze_lib
}

bool zeInitDriversSupport = true;
ze_api_version_t current_api_version = version;
const std::string loader_name = "loader";
for (auto &component : versions) {
if (loader_name == component.component_name) {
Expand All @@ -121,6 +122,12 @@ namespace ze_lib
}
}

if (version > current_api_version) {
version = current_api_version;
std::string message = "ze_lib Context Init() Static Loader Requesting Loader API Version v" + std::to_string(ZE_MAJOR_VERSION(version)) + "." + std::to_string(ZE_MINOR_VERSION(version));
debug_trace_message(message, "");
}

typedef HMODULE (ZE_APICALL *getTracing_t)();
auto getTracing = reinterpret_cast<getTracing_t>(
GET_FUNCTION_PTR(loader, "zeLoaderGetTracingHandle") );
Expand Down