mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 05:56:36 +08:00
fix: add fallback for invalid handles in extension functions
handle context, commandlist, driver, device, event, image and kernel handles Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
066282e15b
commit
d45c16dfc2
@@ -13,7 +13,7 @@
|
||||
|
||||
namespace L0 {
|
||||
ZE_APIEXPORT ze_result_t ZE_APICALL zeIntelMediaCommunicationCreate(ze_context_handle_t hContext, ze_device_handle_t hDevice, ze_intel_media_communication_desc_t *desc, ze_intel_media_doorbell_handle_desc_t *phDoorbell) {
|
||||
auto device = Device::fromHandle(hDevice);
|
||||
auto device = Device::fromHandle(toInternalType(hDevice));
|
||||
|
||||
if (!device || !desc || !phDoorbell) {
|
||||
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
|
||||
@@ -28,7 +28,7 @@ ZE_APIEXPORT ze_result_t ZE_APICALL zeIntelMediaCommunicationCreate(ze_context_h
|
||||
}
|
||||
|
||||
ZE_APIEXPORT ze_result_t ZE_APICALL zeIntelMediaCommunicationDestroy(ze_context_handle_t hContext, ze_device_handle_t hDevice, ze_intel_media_doorbell_handle_desc_t *phDoorbell) {
|
||||
auto device = Device::fromHandle(hDevice);
|
||||
auto device = Device::fromHandle(toInternalType(hDevice));
|
||||
|
||||
if (!device || !phDoorbell) {
|
||||
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
|
||||
|
||||
Reference in New Issue
Block a user