Refactor queue extra properties validation

Change-Id: If95190159b3885653507c0ffc243d8b45aaa6cc7
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2019-03-18 13:34:14 +01:00
committed by sys_ocldev
parent f0f0151736
commit 01ff1accfa
4 changed files with 14 additions and 4 deletions

View File

@@ -3820,7 +3820,7 @@ cl_command_queue CL_API_CALL clCreateCommandQueueWithProperties(cl_context conte
tokenValue != CL_QUEUE_SIZE &&
tokenValue != CL_QUEUE_PRIORITY_KHR &&
tokenValue != CL_QUEUE_THROTTLE_KHR &&
!processExtraTokens(pDevice, *pContext, propertiesAddress)) {
!isExtraToken(propertiesAddress)) {
err.set(CL_INVALID_VALUE);
return commandQueue;
}
@@ -3828,6 +3828,11 @@ cl_command_queue CL_API_CALL clCreateCommandQueueWithProperties(cl_context conte
tokenValue = *propertiesAddress;
}
if (!verifyExtraTokens(pDevice, *pContext, properties)) {
err.set(CL_INVALID_VALUE);
return commandQueue;
}
auto commandQueueProperties = getCmdQueueProperties<cl_command_queue_properties>(properties);
uint32_t maxOnDeviceQueueSize = pDevice->getDeviceInfo().queueOnDeviceMaxSize;
uint32_t maxOnDeviceQueues = pDevice->getDeviceInfo().maxOnDeviceQueues;