mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 07:14:10 +08:00
Correct arguments verification of clEnqueueReleaseDX9ObjectsINTEL call
When clEnqueueReleaseDX9ObjectsINTEL is called and incorrect memory objects list is passed, ensure that api returns gracefully and proper value is returned. Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
f043797f51
commit
74bf623ddb
@@ -184,6 +184,11 @@ cl_int CL_API_CALL clEnqueueReleaseDX9ObjectsINTEL(cl_command_queue commandQueue
|
||||
return retVal;
|
||||
}
|
||||
|
||||
retVal = validateObjects(MemObjList(numObjects, memObjects));
|
||||
if (retVal != CL_SUCCESS) {
|
||||
return retVal;
|
||||
}
|
||||
|
||||
for (unsigned int object = 0; object < numObjects; object++) {
|
||||
auto memObject = castToObject<MemObj>(memObjects[object]);
|
||||
if (!static_cast<D3DSharing<D3DTypesHelper::D3D9> *>(memObject->peekSharingHandler())->isSharedResource()) {
|
||||
|
||||
Reference in New Issue
Block a user