mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-29 17:13:29 +08:00
OpenCL Queue Families extension 1/n
Basic implementation, some things will be tweaked in future commits Related-To: NEO-5120 Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
2be1b36422
commit
14f92cc7a1
@@ -4882,6 +4882,8 @@ cl_command_queue CL_API_CALL clCreateCommandQueueWithProperties(cl_context conte
|
||||
tokenValue != CL_QUEUE_PRIORITY_KHR &&
|
||||
tokenValue != CL_QUEUE_THROTTLE_KHR &&
|
||||
tokenValue != CL_QUEUE_SLICE_COUNT_INTEL &&
|
||||
tokenValue != CL_QUEUE_FAMILY_INTEL &&
|
||||
tokenValue != CL_QUEUE_INDEX_INTEL &&
|
||||
!isExtraToken(propertiesAddress)) {
|
||||
err.set(CL_INVALID_VALUE);
|
||||
TRACING_EXIT(clCreateCommandQueueWithProperties, &commandQueue);
|
||||
@@ -4956,6 +4958,23 @@ cl_command_queue CL_API_CALL clCreateCommandQueueWithProperties(cl_context conte
|
||||
return commandQueue;
|
||||
}
|
||||
|
||||
bool queueFamilySelected = false;
|
||||
bool queueSelected = false;
|
||||
const auto queueFamilyIndex = getCmdQueueProperties<cl_uint>(properties, CL_QUEUE_FAMILY_INTEL, &queueFamilySelected);
|
||||
const auto queueIndex = getCmdQueueProperties<cl_uint>(properties, CL_QUEUE_INDEX_INTEL, &queueSelected);
|
||||
if (queueFamilySelected != queueSelected) {
|
||||
err.set(CL_INVALID_QUEUE_PROPERTIES);
|
||||
TRACING_EXIT(clCreateCommandQueueWithProperties, &commandQueue);
|
||||
return commandQueue;
|
||||
}
|
||||
if (queueFamilySelected &&
|
||||
(queueFamilyIndex >= pDevice->getDeviceInfo().queueFamilyProperties.size() ||
|
||||
queueIndex >= pDevice->getDeviceInfo().queueFamilyProperties[queueFamilyIndex].count)) {
|
||||
err.set(CL_INVALID_QUEUE_PROPERTIES);
|
||||
TRACING_EXIT(clCreateCommandQueueWithProperties, &commandQueue);
|
||||
return commandQueue;
|
||||
}
|
||||
|
||||
auto maskedFlags = commandQueueProperties & minimumCreateDeviceQueueFlags;
|
||||
|
||||
if (maskedFlags == minimumCreateDeviceQueueFlags) {
|
||||
|
||||
Reference in New Issue
Block a user