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

2
Jenkinsfile vendored
View File

@@ -1,5 +1,5 @@
#!groovy
dependenciesRevision='ec7183fc6b8fde18df4a38ab2aa6d6f364b507f1-1216'
strategy='EQUAL'
allowedCD=274
allowedCD=275
allowedF=4

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;

View File

@@ -8,10 +8,14 @@
#include "runtime/helpers/queue_helpers.h"
namespace OCLRT {
bool processExtraTokens(Device *&device, Context &context, const cl_queue_properties *property) {
bool isExtraToken(const cl_queue_properties *property) {
return false;
}
bool verifyExtraTokens(Device *&device, Context &context, const cl_queue_properties *properties) {
return true;
}
void CommandQueue::processProperties(const cl_queue_properties *properties) {
}
} // namespace OCLRT

View File

@@ -113,5 +113,6 @@ returnType getCmdQueueProperties(const cl_queue_properties *properties,
}
return retVal;
}
bool processExtraTokens(Device *&device, Context &context, const cl_queue_properties *property);
bool isExtraToken(const cl_queue_properties *property);
bool verifyExtraTokens(Device *&device, Context &context, const cl_queue_properties *properties);
} // namespace OCLRT