mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-22 10:17:01 +08:00
Refactor queue extra properties validation
Change-Id: If95190159b3885653507c0ffc243d8b45aaa6cc7 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
f0f0151736
commit
01ff1accfa
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@@ -1,5 +1,5 @@
|
||||
#!groovy
|
||||
dependenciesRevision='ec7183fc6b8fde18df4a38ab2aa6d6f364b507f1-1216'
|
||||
strategy='EQUAL'
|
||||
allowedCD=274
|
||||
allowedCD=275
|
||||
allowedF=4
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user