Correct error code in clCreateImage when device doesn't support images.

Related-To: NEO-3175

Change-Id: I27c6fd3f6b86ef47599bf8f7f68b2dfa8c46e1f0
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2019-05-13 14:37:42 +02:00
committed by sys_ocldev
parent 1dbab32755
commit 9ecaaa731a
3 changed files with 26 additions and 2 deletions

View File

@@ -1011,6 +1011,10 @@ Image *Image::validateAndCreateImage(Context *context,
if (errcodeRet != CL_SUCCESS) {
return nullptr;
}
if (!context->getDevice(0)->getDeviceInfo().imageSupport) {
errcodeRet = CL_INVALID_OPERATION;
return nullptr;
}
SurfaceFormatInfo *surfaceFormat = nullptr;
Image *image = nullptr;
do {