Extend image functionality

- add imageView extension
- add import win32 NT handle
- add black box test with imageView usage example


Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
This commit is contained in:
Kamil Diedrich
2021-06-25 01:25:22 +00:00
committed by Compute-Runtime-Automation
parent 94154145c0
commit 6035607718
19 changed files with 909 additions and 139 deletions

View File

@@ -597,6 +597,7 @@ zeGetImageExpProcAddrTable(
ze_result_t result = ZE_RESULT_SUCCESS;
pDdiTable->pfnGetMemoryPropertiesExp = zeImageGetMemoryPropertiesExp;
pDdiTable->pfnViewCreateExp = zeImageViewCreateExp;
driver_ddiTable.core_ddiTable.ImageExp = *pDdiTable;
return result;
}

View File

@@ -30,6 +30,16 @@ zeImageGetMemoryPropertiesExp(
return L0::Image::fromHandle(hImage)->getMemoryProperties(pMemoryProperties);
}
ZE_APIEXPORT ze_result_t ZE_APICALL
zeImageViewCreateExp(
ze_context_handle_t hContext,
ze_device_handle_t hDevice,
const ze_image_desc_t *desc,
ze_image_handle_t hImage,
ze_image_handle_t *phImageView) {
return L0::Image::fromHandle(hImage)->createView(L0::Device::fromHandle(hDevice), desc, phImageView);
}
#if defined(__cplusplus)
} // extern "C"
#endif