Correct CL_QUEUE_PROPERTIES_ARRAY query

Add support of this query for Device Queues.

Change-Id: Ia4ad110af22e509efe8b9ae4c27bcccd4271f4a5
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2020-08-27 18:30:18 +02:00
committed by sys_ocldev
parent 1c0e2430c5
commit cfe1d76781
4 changed files with 44 additions and 8 deletions

View File

@@ -38,6 +38,7 @@ DeviceQueue::DeviceQueue(Context *context,
queueSize = device->getDeviceInfo().queueOnDevicePreferredSize;
}
storeProperties(&properties);
allocateResources();
initDeviceQueue();
}
@@ -101,6 +102,16 @@ cl_int DeviceQueue::getCommandQueueInfo(cl_command_queue_info paramName,
return getQueueInfo<DeviceQueue>(this, paramName, paramValueSize, paramValue, paramValueSizeRet);
}
void DeviceQueue::storeProperties(const cl_queue_properties *properties) {
if (properties) {
for (size_t i = 0; properties[i] != 0; i += 2) {
propertiesVector.push_back(properties[i]);
propertiesVector.push_back(properties[i + 1]);
}
propertiesVector.push_back(0);
}
}
void DeviceQueue::allocateResources() {
auto &caps = device->getDeviceInfo();