mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
feature: add L0 API functions to get default context handle
- zeDriverGetDefaultContext to get default context for given driver handle - zerDriverGetDefaultContext to get default context for default driver handle Related-To: NEO-14560 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
3d1ea7165c
commit
aaaea67557
@@ -63,6 +63,15 @@ zeIntelGetDriverVersionString(
|
||||
return ZE_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
ze_context_handle_t ZE_APICALL zeDriverGetDefaultContext(
|
||||
ze_driver_handle_t hDriver) {
|
||||
return L0::DriverHandle::fromHandle(hDriver)->getDefaultContext();
|
||||
}
|
||||
|
||||
ze_context_handle_t ZE_APICALL zerDriverGetDefaultContext() {
|
||||
return L0::DriverHandle::fromHandle(L0::globalDriverHandles->front())->getDefaultContext();
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
|
||||
ZE_APIEXPORT ze_result_t ZE_APICALL
|
||||
|
||||
Reference in New Issue
Block a user