Files
compute-runtime/opencl/test/unit_test/test_macros/test_checks.cpp
Filip Hazubski 853d870d1c Return CL_INVALID_OPERATION when creating an image
Error is returned when images are not supported.

Related-To: NEO-4368

Change-Id: I1e7098f7c450dbaefc546ab4cfdaebbb5376def4
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2020-04-21 18:29:51 +02:00

24 lines
548 B
C++

/*
* Copyright (C) 2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "opencl/test/unit_test/test_macros/test_checks.h"
#include "shared/source/device/device_info.h"
#include "opencl/source/cl_device/cl_device.h"
#include "opencl/source/context/context.h"
using namespace NEO;
bool TestChecks::supportsSvm(const ClDevice *pClDevice) {
return supportsSvm(&pClDevice->getDevice());
}
bool TestChecks::supportsImages(const Context *pContext) {
return pContext->getDevice(0)->getSharedDeviceInfo().imageSupport;
}