Add ClDevice::isOcl21Conformant function

Do not report support of OpenCl C 2.0 if device is not OpenCL 2.1 conformant.

Related-To: NEO-4368

Change-Id: I076d539506760953cc28eed39ff5e7585630df51
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2020-06-23 18:59:36 +02:00
committed by sys_ocldev
parent 0c9c55cd17
commit c5f3fe5987
5 changed files with 34 additions and 2 deletions

View File

@@ -88,6 +88,12 @@ unique_ptr_if_unused<ClDevice> ClDevice::decRefInternal() {
return pParentDevice->decRefInternal();
}
bool ClDevice::isOcl21Conformant() const {
auto &hwInfo = device.getHardwareInfo();
return (hwInfo.capabilityTable.supportsOcl21Features && hwInfo.capabilityTable.supportsDeviceEnqueue &&
hwInfo.capabilityTable.supportsPipes && hwInfo.capabilityTable.supportsIndependentForwardProgress);
}
void ClDevice::allocateSyncBufferHandler() {
TakeOwnershipWrapper<ClDevice> lock(*this);
if (syncBufferHandler.get() == nullptr) {