Add supportsOcl21Features value to capability table
Related-To: NEO-4368 Change-Id: If176d3be7c47d9d9ab70beebe664f2d569997501 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
parent
4c23b60b30
commit
8fd40b090d
|
@ -1153,7 +1153,7 @@ cl_int CL_API_CALL clGetImageParamsINTEL(cl_context context,
|
|||
retVal = Image::validateImageFormat(imageFormat);
|
||||
}
|
||||
if (CL_SUCCESS == retVal) {
|
||||
surfaceFormat = (ClSurfaceFormatInfo *)Image::getSurfaceFormatFromTable(memFlags, imageFormat, pContext->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
surfaceFormat = (ClSurfaceFormatInfo *)Image::getSurfaceFormatFromTable(memFlags, imageFormat, pContext->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
retVal = Image::validate(pContext, MemoryPropertiesParser::createMemoryProperties(memFlags, 0, 0), surfaceFormat, imageDesc, nullptr);
|
||||
}
|
||||
if (CL_SUCCESS == retVal) {
|
||||
|
|
|
@ -111,7 +111,7 @@ void ClDevice::initializeCaps() {
|
|||
deviceInfo.clCVersion = "OpenCL C 1.2 ";
|
||||
break;
|
||||
}
|
||||
deviceInfo.platformLP = (hwInfo.capabilityTable.clVersionSupport == 12) ? true : false;
|
||||
deviceInfo.platformLP = (hwInfo.capabilityTable.supportsOcl21Features == false);
|
||||
deviceInfo.spirVersions = spirVersions.c_str();
|
||||
auto supportsVme = hwInfo.capabilityTable.supportsVme;
|
||||
auto supportsAdvancedVme = hwInfo.capabilityTable.supportsVme;
|
||||
|
|
|
@ -308,7 +308,7 @@ cl_int Context::getSupportedImageFormats(
|
|||
};
|
||||
|
||||
if (flags & CL_MEM_READ_ONLY) {
|
||||
if (this->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport >= 20) {
|
||||
if (this->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features) {
|
||||
appendImageFormats(SurfaceFormats::readOnly20());
|
||||
} else {
|
||||
appendImageFormats(SurfaceFormats::readOnly12());
|
||||
|
@ -328,7 +328,7 @@ cl_int Context::getSupportedImageFormats(
|
|||
appendImageFormats(SurfaceFormats::readWriteDepth());
|
||||
}
|
||||
} else if (nv12ExtensionEnabled && (flags & CL_MEM_NO_ACCESS_INTEL)) {
|
||||
if (this->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport >= 20) {
|
||||
if (this->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features) {
|
||||
appendImageFormats(SurfaceFormats::readOnly20());
|
||||
} else {
|
||||
appendImageFormats(SurfaceFormats::readOnly12());
|
||||
|
|
|
@ -71,6 +71,7 @@ const RuntimeCapabilityTable EHL::capabilityTable{
|
|||
true, // supportsImages
|
||||
true, // supportsDeviceEnqueue
|
||||
false, // supportsPipes
|
||||
false, // supportsOcl21Features
|
||||
true // hostPtrTrackingEnabled
|
||||
};
|
||||
|
||||
|
|
|
@ -72,6 +72,7 @@ const RuntimeCapabilityTable ICLLP::capabilityTable{
|
|||
true, // supportsImages
|
||||
true, // supportsDeviceEnqueue
|
||||
true, // supportsPipes
|
||||
true, // supportsOcl21Features
|
||||
true // hostPtrTrackingEnabled
|
||||
};
|
||||
|
||||
|
|
|
@ -71,6 +71,7 @@ const RuntimeCapabilityTable LKF::capabilityTable{
|
|||
true, // supportsImages
|
||||
true, // supportsDeviceEnqueue
|
||||
false, // supportsPipes
|
||||
false, // supportsOcl21Features
|
||||
true // hostPtrTrackingEnabled
|
||||
};
|
||||
|
||||
|
|
|
@ -73,6 +73,7 @@ const RuntimeCapabilityTable TGLLP::capabilityTable{
|
|||
true, // supportsImages
|
||||
true, // supportsDeviceEnqueue
|
||||
false, // supportsPipes
|
||||
true, // supportsOcl21Features
|
||||
false // hostPtrTrackingEnabled
|
||||
};
|
||||
|
||||
|
|
|
@ -76,6 +76,7 @@ const RuntimeCapabilityTable BDW::capabilityTable{
|
|||
true, // supportsImages
|
||||
true, // supportsDeviceEnqueue
|
||||
true, // supportsPipes
|
||||
true, // supportsOcl21Features
|
||||
true // hostPtrTrackingEnabled
|
||||
};
|
||||
|
||||
|
|
|
@ -73,6 +73,7 @@ const RuntimeCapabilityTable BXT::capabilityTable{
|
|||
true, // supportsImages
|
||||
false, // supportsDeviceEnqueue
|
||||
false, // supportsPipes
|
||||
false, // supportsOcl21Features
|
||||
true // hostPtrTrackingEnabled
|
||||
};
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@ const RuntimeCapabilityTable CFL::capabilityTable{
|
|||
true, // supportsImages
|
||||
true, // supportsDeviceEnqueue
|
||||
true, // supportsPipes
|
||||
true, // supportsOcl21Features
|
||||
true // hostPtrTrackingEnabled
|
||||
};
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@ const RuntimeCapabilityTable GLK::capabilityTable{
|
|||
true, // supportsImages
|
||||
false, // supportsDeviceEnqueue
|
||||
false, // supportsPipes
|
||||
false, // supportsOcl21Features
|
||||
true // hostPtrTrackingEnabled
|
||||
};
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@ const RuntimeCapabilityTable KBL::capabilityTable{
|
|||
true, // supportsImages
|
||||
true, // supportsDeviceEnqueue
|
||||
true, // supportsPipes
|
||||
true, // supportsOcl21Features
|
||||
true // hostPtrTrackingEnabled
|
||||
};
|
||||
|
||||
|
|
|
@ -76,6 +76,7 @@ const RuntimeCapabilityTable SKL::capabilityTable{
|
|||
true, // supportsImages
|
||||
true, // supportsDeviceEnqueue
|
||||
true, // supportsPipes
|
||||
true, // supportsOcl21Features
|
||||
true // hostPtrTrackingEnabled
|
||||
};
|
||||
WorkaroundTable SKL::workaroundTable = {};
|
||||
|
|
|
@ -139,9 +139,9 @@ ArrayRef<const ClSurfaceFormatInfo> SurfaceFormats::readWriteDepth() noexcept {
|
|||
return ArrayRef<const ClSurfaceFormatInfo>(readWriteDepthSurfaceFormats);
|
||||
}
|
||||
|
||||
ArrayRef<const ClSurfaceFormatInfo> SurfaceFormats::surfaceFormats(cl_mem_flags flags, unsigned int clVersionSupport) noexcept {
|
||||
ArrayRef<const ClSurfaceFormatInfo> SurfaceFormats::surfaceFormats(cl_mem_flags flags, bool supportsOcl20Features) noexcept {
|
||||
if (flags & CL_MEM_READ_ONLY) {
|
||||
if(clVersionSupport >= 20 ) {
|
||||
if(supportsOcl20Features) {
|
||||
return readOnly20();
|
||||
}
|
||||
else {
|
||||
|
@ -156,7 +156,7 @@ ArrayRef<const ClSurfaceFormatInfo> SurfaceFormats::surfaceFormats(cl_mem_flags
|
|||
}
|
||||
}
|
||||
|
||||
ArrayRef<const ClSurfaceFormatInfo> SurfaceFormats::surfaceFormats(cl_mem_flags flags, const cl_image_format *imageFormat, unsigned int clVersionSupport) noexcept {
|
||||
ArrayRef<const ClSurfaceFormatInfo> SurfaceFormats::surfaceFormats(cl_mem_flags flags, const cl_image_format *imageFormat, bool supportsOcl20Features) noexcept {
|
||||
if (NEO::IsNV12Image(imageFormat)) {
|
||||
return planarYuv();
|
||||
}
|
||||
|
@ -172,7 +172,7 @@ ArrayRef<const ClSurfaceFormatInfo> SurfaceFormats::surfaceFormats(cl_mem_flags
|
|||
}
|
||||
}
|
||||
else if (flags & CL_MEM_READ_ONLY) {
|
||||
if(clVersionSupport >= 20 ) {
|
||||
if(supportsOcl20Features) {
|
||||
return readOnly20();
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -41,8 +41,8 @@ class SurfaceFormats {
|
|||
static ArrayRef<const ClSurfaceFormatInfo> readOnlyDepth() noexcept;
|
||||
static ArrayRef<const ClSurfaceFormatInfo> readWriteDepth() noexcept;
|
||||
|
||||
static ArrayRef<const ClSurfaceFormatInfo> surfaceFormats(cl_mem_flags flags, unsigned int clVersionSupport) noexcept;
|
||||
static ArrayRef<const ClSurfaceFormatInfo> surfaceFormats(cl_mem_flags flags, const cl_image_format *imageFormat, unsigned int clVersionSupport) noexcept;
|
||||
static ArrayRef<const ClSurfaceFormatInfo> surfaceFormats(cl_mem_flags flags, bool supportsOcl20Features) noexcept;
|
||||
static ArrayRef<const ClSurfaceFormatInfo> surfaceFormats(cl_mem_flags flags, const cl_image_format *imageFormat, bool supportsOcl20Features) noexcept;
|
||||
};
|
||||
|
||||
} // namespace NEO
|
||||
|
|
|
@ -1030,7 +1030,7 @@ cl_int Image::writeNV12Planes(const void *hostPtr, size_t hostPtrRowPitch) {
|
|||
imageDesc.mem_object = this;
|
||||
// get access to the Y plane (CL_R)
|
||||
imageDesc.image_depth = 0;
|
||||
const ClSurfaceFormatInfo *surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
const ClSurfaceFormatInfo *surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
|
||||
// Create NV12 UV Plane image
|
||||
std::unique_ptr<Image> imageYPlane(Image::create(
|
||||
|
@ -1055,7 +1055,7 @@ cl_int Image::writeNV12Planes(const void *hostPtr, size_t hostPtrRowPitch) {
|
|||
imageFormat.image_channel_order = CL_RG;
|
||||
|
||||
hostPtr = static_cast<const void *>(static_cast<const char *>(hostPtr) + (hostPtrRowPitch * this->imageDesc.image_height));
|
||||
surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
// Create NV12 UV Plane image
|
||||
std::unique_ptr<Image> imageUVPlane(Image::create(
|
||||
context,
|
||||
|
@ -1072,13 +1072,13 @@ cl_int Image::writeNV12Planes(const void *hostPtr, size_t hostPtrRowPitch) {
|
|||
return retVal;
|
||||
}
|
||||
|
||||
const ClSurfaceFormatInfo *Image::getSurfaceFormatFromTable(cl_mem_flags flags, const cl_image_format *imageFormat, unsigned int clVersionSupport) {
|
||||
const ClSurfaceFormatInfo *Image::getSurfaceFormatFromTable(cl_mem_flags flags, const cl_image_format *imageFormat, bool supportsOcl20Features) {
|
||||
if (!imageFormat) {
|
||||
DEBUG_BREAK_IF("Invalid format");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ArrayRef<const ClSurfaceFormatInfo> formats = SurfaceFormats::surfaceFormats(flags, imageFormat, clVersionSupport);
|
||||
ArrayRef<const ClSurfaceFormatInfo> formats = SurfaceFormats::surfaceFormats(flags, imageFormat, supportsOcl20Features);
|
||||
|
||||
for (auto &format : formats) {
|
||||
if (format.OCLImageFormat.image_channel_data_type == imageFormat->image_channel_data_type &&
|
||||
|
@ -1136,7 +1136,7 @@ Image *Image::validateAndCreateImage(Context *context,
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
const auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
const auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
|
||||
errcodeRet = Image::validate(context, memoryProperties, surfaceFormat, imageDesc, hostPtr);
|
||||
if (errcodeRet != CL_SUCCESS) {
|
||||
|
|
|
@ -168,7 +168,7 @@ class Image : public MemObj {
|
|||
uint32_t peekMipCount() { return mipCount; }
|
||||
void setMipCount(uint32_t mipCountNew) { this->mipCount = mipCountNew; }
|
||||
|
||||
static const ClSurfaceFormatInfo *getSurfaceFormatFromTable(cl_mem_flags flags, const cl_image_format *imageFormat, unsigned int clVersionSupport);
|
||||
static const ClSurfaceFormatInfo *getSurfaceFormatFromTable(cl_mem_flags flags, const cl_image_format *imageFormat, bool supportsOcl20Features);
|
||||
static cl_int validateRegionAndOrigin(const size_t *origin, const size_t *region, const cl_image_desc &imgDesc);
|
||||
|
||||
cl_int writeNV12Planes(const void *hostPtr, size_t hostPtrRowPitch);
|
||||
|
|
|
@ -38,7 +38,7 @@ std::string getExtensionsList(const HardwareInfo &hwInfo) {
|
|||
|
||||
allExtensionsList.append(deviceExtensionsList);
|
||||
|
||||
if (hwInfo.capabilityTable.clVersionSupport >= 21) {
|
||||
if (hwInfo.capabilityTable.supportsOcl21Features) {
|
||||
allExtensionsList += "cl_khr_subgroups ";
|
||||
allExtensionsList += "cl_khr_il_program ";
|
||||
if (hwInfo.capabilityTable.supportsVme) {
|
||||
|
|
|
@ -82,8 +82,8 @@ void D3DSharing<D3D>::updateImgInfoAndDesc(Gmm *gmm, ImageInfo &imgInfo, ImagePl
|
|||
}
|
||||
|
||||
template <typename D3D>
|
||||
const ClSurfaceFormatInfo *D3DSharing<D3D>::findSurfaceFormatInfo(GMM_RESOURCE_FORMAT_ENUM gmmFormat, cl_mem_flags flags, unsigned int clVersionSupport) {
|
||||
ArrayRef<const ClSurfaceFormatInfo> formats = SurfaceFormats::surfaceFormats(flags, clVersionSupport);
|
||||
const ClSurfaceFormatInfo *D3DSharing<D3D>::findSurfaceFormatInfo(GMM_RESOURCE_FORMAT_ENUM gmmFormat, cl_mem_flags flags, bool supportsOcl20Features) {
|
||||
ArrayRef<const ClSurfaceFormatInfo> formats = SurfaceFormats::surfaceFormats(flags, supportsOcl20Features);
|
||||
for (auto &format : formats) {
|
||||
if (gmmFormat == format.surfaceFormat.GMMSurfaceFormat) {
|
||||
return &format;
|
||||
|
|
|
@ -36,7 +36,7 @@ class D3DSharing : public SharingHandler {
|
|||
unsigned int &getSubresource() { return subresource; }
|
||||
typename D3DQuery *getQuery() { return d3dQuery; }
|
||||
bool isSharedResource() { return sharedResource; }
|
||||
static const ClSurfaceFormatInfo *findSurfaceFormatInfo(GMM_RESOURCE_FORMAT_ENUM gmmFormat, cl_mem_flags flags, unsigned int clVersionSupport);
|
||||
static const ClSurfaceFormatInfo *findSurfaceFormatInfo(GMM_RESOURCE_FORMAT_ENUM gmmFormat, cl_mem_flags flags, bool supportsOcl20Features);
|
||||
static bool isFormatWithPlane1(DXGI_FORMAT format);
|
||||
|
||||
protected:
|
||||
|
|
|
@ -71,7 +71,7 @@ Image *D3DSurface::create(Context *context, cl_dx9_surface_info_khr *surfaceInfo
|
|||
}
|
||||
|
||||
imgInfo.plane = GmmTypesConverter::convertPlane(imagePlane);
|
||||
auto *clSurfaceFormat = Image::getSurfaceFormatFromTable(flags, &imgFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto *clSurfaceFormat = Image::getSurfaceFormatFromTable(flags, &imgFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
imgInfo.surfaceFormat = &clSurfaceFormat->surfaceFormat;
|
||||
|
||||
bool isSharedResource = false;
|
||||
|
|
|
@ -91,7 +91,7 @@ Image *D3DTexture<D3D>::create2d(Context *context, D3DTexture2d *d3dTexture, cl_
|
|||
clSurfaceFormat = findYuvSurfaceFormatInfo(textureDesc.Format, imagePlane, flags);
|
||||
imgInfo.surfaceFormat = &clSurfaceFormat->surfaceFormat;
|
||||
} else {
|
||||
clSurfaceFormat = findSurfaceFormatInfo(alloc->getDefaultGmm()->gmmResourceInfo->getResourceFormat(), flags, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
clSurfaceFormat = findSurfaceFormatInfo(alloc->getDefaultGmm()->gmmResourceInfo->getResourceFormat(), flags, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
imgInfo.surfaceFormat = &clSurfaceFormat->surfaceFormat;
|
||||
}
|
||||
|
||||
|
@ -155,7 +155,7 @@ Image *D3DTexture<D3D>::create3d(Context *context, D3DTexture3d *d3dTexture, cl_
|
|||
updateImgInfoAndDesc(alloc->getDefaultGmm(), imgInfo, ImagePlane::NO_PLANE, 0u);
|
||||
|
||||
auto d3dTextureObj = new D3DTexture<D3D>(context, d3dTexture, subresource, textureStaging, sharedResource);
|
||||
auto *clSurfaceFormat = findSurfaceFormatInfo(alloc->getDefaultGmm()->gmmResourceInfo->getResourceFormat(), flags, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto *clSurfaceFormat = findSurfaceFormatInfo(alloc->getDefaultGmm()->gmmResourceInfo->getResourceFormat(), flags, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
imgInfo.qPitch = alloc->getDefaultGmm()->queryQPitch(GMM_RESOURCE_TYPE::RESOURCE_3D);
|
||||
|
||||
imgInfo.surfaceFormat = &clSurfaceFormat->surfaceFormat;
|
||||
|
@ -184,5 +184,5 @@ const ClSurfaceFormatInfo *D3DTexture<D3D>::findYuvSurfaceFormatInfo(DXGI_FORMAT
|
|||
imgFormat.image_channel_data_type = CL_UNORM_INT8;
|
||||
}
|
||||
|
||||
return Image::getSurfaceFormatFromTable(flags, &imgFormat, 12);
|
||||
return Image::getSurfaceFormatFromTable(flags, &imgFormat, false /* supportsOcl20Features */);
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ Image *GlTexture::createSharedGlTexture(Context *context, cl_mem_flags flags, cl
|
|||
errorCode.set(CL_INVALID_GL_OBJECT);
|
||||
return nullptr;
|
||||
}
|
||||
auto surfaceFormatInfoAddress = Image::getSurfaceFormatFromTable(flags, &imgFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormatInfoAddress = Image::getSurfaceFormatFromTable(flags, &imgFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
if (!surfaceFormatInfoAddress) {
|
||||
memoryManager->freeGraphicsMemory(alloc);
|
||||
errorCode.set(CL_INVALID_GL_OBJECT);
|
||||
|
|
|
@ -26,7 +26,7 @@ Image *UnifiedImage::createSharedUnifiedImage(Context *context, cl_mem_flags fla
|
|||
ErrorCodeHelper errorCode(errcodeRet, CL_SUCCESS);
|
||||
UnifiedSharingFunctions *sharingFunctions = context->getSharing<UnifiedSharingFunctions>();
|
||||
|
||||
auto *clSurfaceFormat = Image::getSurfaceFormatFromTable(flags, imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto *clSurfaceFormat = Image::getSurfaceFormatFromTable(flags, imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
ImageInfo imgInfo = {};
|
||||
imgInfo.imgDesc = Image::convertDescriptor(*imageDesc);
|
||||
imgInfo.surfaceFormat = &clSurfaceFormat->surfaceFormat;
|
||||
|
|
|
@ -51,7 +51,7 @@ Image *VASurface::createSharedVaSurface(Context *context, VASharingFunctions *sh
|
|||
UNRECOVERABLE_IF(true);
|
||||
}
|
||||
|
||||
auto gmmSurfaceFormat = Image::getSurfaceFormatFromTable(flags, &gmmImgFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport); //vaImage.format.fourcc == VA_FOURCC_NV12
|
||||
auto gmmSurfaceFormat = Image::getSurfaceFormatFromTable(flags, &gmmImgFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features); //vaImage.format.fourcc == VA_FOURCC_NV12
|
||||
|
||||
if (DebugManager.flags.EnableExtendedVaFormats.get() && vaImage.format.fourcc == VA_FOURCC_P010) {
|
||||
channelType = CL_UNORM_INT16;
|
||||
|
@ -60,7 +60,7 @@ Image *VASurface::createSharedVaSurface(Context *context, VASharingFunctions *sh
|
|||
imgInfo.surfaceFormat = &gmmSurfaceFormat->surfaceFormat;
|
||||
|
||||
cl_image_format imgFormat = {channelOrder, channelType};
|
||||
auto imgSurfaceFormat = Image::getSurfaceFormatFromTable(flags, &imgFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto imgSurfaceFormat = Image::getSurfaceFormatFromTable(flags, &imgFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
|
||||
sharingFunctions->extGetSurfaceHandle(surface, &sharedHandle);
|
||||
AllocationProperties properties(context->getDevice(0)->getRootDeviceIndex(),
|
||||
|
|
|
@ -918,7 +918,7 @@ TEST_F(clCreateImageFromImageTest, GivenImage2dWhenCreatingImage2dFromImageWithT
|
|||
nullptr,
|
||||
&retVal);
|
||||
|
||||
if (pContext->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport < 20) {
|
||||
if (pContext->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features == false) {
|
||||
EXPECT_EQ(CL_IMAGE_FORMAT_NOT_SUPPORTED, retVal);
|
||||
EXPECT_EQ(nullptr, imageFromImageObject);
|
||||
} else {
|
||||
|
@ -976,7 +976,7 @@ TEST_F(clCreateImageFromImageTest, GivenImage2dWhenCreatingImage2dFromImageWithD
|
|||
nullptr,
|
||||
&retVal);
|
||||
|
||||
if (pContext->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport >= 20) {
|
||||
if (pContext->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features) {
|
||||
EXPECT_EQ(CL_INVALID_IMAGE_FORMAT_DESCRIPTOR, retVal);
|
||||
} else {
|
||||
EXPECT_EQ(CL_IMAGE_FORMAT_NOT_SUPPORTED, retVal);
|
||||
|
|
|
@ -83,7 +83,7 @@ HWTEST_P(AUBCopyImage, simple) {
|
|||
imageDesc.num_samples = 0;
|
||||
imageDesc.mem_object = NULL;
|
||||
// clang-format on
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, pClDevice->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, pClDevice->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
auto retVal = CL_INVALID_VALUE;
|
||||
srcImage.reset(Image::create(
|
||||
context.get(),
|
||||
|
|
|
@ -100,7 +100,7 @@ struct AubFillImage
|
|||
CommandStreamFixture::SetUp(pCmdQ);
|
||||
|
||||
context = std::make_unique<MockContext>(pClDevice);
|
||||
if ((pClDevice->getHardwareInfo().capabilityTable.clVersionSupport < 20) && (channelOrder == CL_sRGBA || channelOrder == CL_sBGRA)) {
|
||||
if ((pClDevice->getHardwareInfo().capabilityTable.supportsOcl21Features == false) && (channelOrder == CL_sRGBA || channelOrder == CL_sBGRA)) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ HWTEST_P(AubFillImage, simple) {
|
|||
|
||||
auto retVal = CL_INVALID_VALUE;
|
||||
cl_mem_flags flags = CL_MEM_READ_ONLY;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
image.reset(Image::create(
|
||||
context.get(),
|
||||
MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
|
|
|
@ -370,7 +370,7 @@ INSTANTIATE_TEST_CASE_P(
|
|||
|
||||
struct AUBSimpleArgNonUniformFixture : public KernelAUBFixture<SimpleArgNonUniformKernelFixture> {
|
||||
void SetUp() override {
|
||||
if (NEO::defaultHwInfo->capabilityTable.clVersionSupport < 20) {
|
||||
if (NEO::defaultHwInfo->capabilityTable.supportsOcl21Features == false) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
KernelAUBFixture<SimpleArgNonUniformKernelFixture>::SetUp();
|
||||
|
@ -430,7 +430,7 @@ struct AUBSimpleArgNonUniformFixture : public KernelAUBFixture<SimpleArgNonUnifo
|
|||
}
|
||||
|
||||
void TearDown() override {
|
||||
if (NEO::defaultHwInfo->capabilityTable.clVersionSupport < 20) {
|
||||
if (NEO::defaultHwInfo->capabilityTable.supportsOcl21Features == false) {
|
||||
return;
|
||||
}
|
||||
if (destMemory) {
|
||||
|
|
|
@ -124,7 +124,7 @@ HWTEST_P(AUBMapImage, MapUpdateUnmapVerify) {
|
|||
|
||||
auto retVal = CL_INVALID_VALUE;
|
||||
cl_mem_flags flags = CL_MEM_COPY_HOST_PTR;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, pClDevice->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, pClDevice->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
srcImage.reset(Image::create(
|
||||
context.get(),
|
||||
MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
|
|
|
@ -141,7 +141,7 @@ HWTEST_P(AUBReadImage, simpleUnalignedMemory) {
|
|||
}
|
||||
|
||||
cl_mem_flags flags = CL_MEM_USE_HOST_PTR;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
auto retVal = CL_INVALID_VALUE;
|
||||
srcImage.reset(Image::create(
|
||||
context.get(),
|
||||
|
|
|
@ -77,7 +77,7 @@ struct AUBImageUnaligned
|
|||
imageDesc.mem_object = NULL;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_USE_HOST_PTR | CL_MEM_READ_WRITE;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, pClDevice->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, pClDevice->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
auto retVal = CL_INVALID_VALUE;
|
||||
|
||||
auto image = std::unique_ptr<Image>(Image::create(
|
||||
|
@ -172,7 +172,7 @@ struct AUBImageUnaligned
|
|||
imageDesc.mem_object = NULL;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_USE_HOST_PTR | CL_MEM_READ_WRITE;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, pClDevice->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, pClDevice->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
auto retVal = CL_INVALID_VALUE;
|
||||
|
||||
auto image = std::unique_ptr<Image>(Image::create(
|
||||
|
|
|
@ -70,7 +70,7 @@ HWTEST_P(VerifyMemoryImageHw, givenDifferentImagesWhenValidatingMemoryThenSucces
|
|||
|
||||
cl_mem_flags flags = CL_MEM_READ_ONLY;
|
||||
auto surfaceFormat = Image::
|
||||
getSurfaceFormatFromTable(flags, &imageFormat, pClDevice->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
getSurfaceFormatFromTable(flags, &imageFormat, pClDevice->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
auto retVal = CL_INVALID_VALUE;
|
||||
std::unique_ptr<Image> image(Image::create(
|
||||
context,
|
||||
|
|
|
@ -136,7 +136,7 @@ HWTEST_P(AUBWriteImage, simpleUnalignedMemory) {
|
|||
|
||||
auto retVal = CL_INVALID_VALUE;
|
||||
cl_mem_flags flags = 0;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
dstImage.reset(Image::create(
|
||||
context.get(),
|
||||
MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
|
|
|
@ -20,11 +20,11 @@ class AUBParentKernelFixture : public CommandEnqueueAUBFixture,
|
|||
using HelloWorldKernelFixture::SetUp;
|
||||
|
||||
void SetUp() override {
|
||||
CommandEnqueueAUBFixture::SetUp();
|
||||
ASSERT_NE(nullptr, pClDevice);
|
||||
if (pClDevice->getHardwareInfo().capabilityTable.clVersionSupport < 20) {
|
||||
if (defaultHwInfo->capabilityTable.supportsOcl21Features == false) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
CommandEnqueueAUBFixture::SetUp();
|
||||
ASSERT_NE(nullptr, pClDevice);
|
||||
HelloWorldKernelFixture::SetUp(pClDevice, programFile, kernelName, "-cl-std=CL2.0");
|
||||
}
|
||||
void TearDown() override {
|
||||
|
|
|
@ -53,7 +53,7 @@ GEN11TEST_F(GEN11AUBParentKernelFixture, EnqueueParentKernel) {
|
|||
desc.image_slice_pitch = 0;
|
||||
// clang-format on
|
||||
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(0, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(0, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
Image *image = Image::create(
|
||||
pContext,
|
||||
{},
|
||||
|
|
|
@ -53,7 +53,7 @@ GEN12LPTEST_F(GEN12LPAUBParentKernelFixture, EnqueueParentKernel) {
|
|||
desc.image_slice_pitch = 0;
|
||||
// clang-format on
|
||||
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(0, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(0, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
Image *image = Image::create(
|
||||
pContext,
|
||||
{},
|
||||
|
|
|
@ -53,7 +53,7 @@ GEN8TEST_F(GEN8AUBParentKernelFixture, EnqueueParentKernel) {
|
|||
desc.image_row_pitch = 0;
|
||||
desc.image_slice_pitch = 0;
|
||||
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(0, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(0, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
std::unique_ptr<Image> image(Image::create(
|
||||
pContext,
|
||||
{},
|
||||
|
|
|
@ -51,7 +51,7 @@ GEN9TEST_F(AUBParentKernelFixture, EnqueueParentKernel) {
|
|||
desc.image_slice_pitch = 0;
|
||||
// clang-format on
|
||||
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(0, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(0, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
Image *image = Image::create(
|
||||
pContext,
|
||||
{},
|
||||
|
|
|
@ -329,7 +329,7 @@ SKLTEST_F(AUBRunKernelIntegrateTest, deviceSideVme) {
|
|||
refMemory[xMovement + yMovement * testWidth + 1] = 0xFF;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
auto srcImage = Image::create(
|
||||
context,
|
||||
MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
|
|
|
@ -95,7 +95,7 @@ HWTEST_P(AUBCreateImageArray, CheckArrayImages) {
|
|||
imageDesc.image_height = 1;
|
||||
}
|
||||
cl_mem_flags flags = CL_MEM_COPY_HOST_PTR;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
auto imgInfo = MockGmm::initImgInfo(imageDesc, 0, surfaceFormat);
|
||||
imgInfo.linearStorage = !hwHelper.tilingAllowed(false, Image::isImage1d(imageDesc), false);
|
||||
auto queryGmm = MockGmm::queryImgParams(pDevice->getGmmClientContext(), imgInfo);
|
||||
|
@ -221,7 +221,7 @@ INSTANTIATE_TEST_CASE_P(
|
|||
testing::ValuesIn(copyHostPtrFlags));
|
||||
|
||||
HWTEST_P(CopyHostPtrTest, imageWithDoubledRowPitchThatIsCreatedWithCopyHostPtrFlagHasProperRowPitchSet) {
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
auto imgInfo = MockGmm::initImgInfo(imageDesc, 0, surfaceFormat);
|
||||
|
||||
MockGmm::queryImgParams(pDevice->getGmmClientContext(), imgInfo);
|
||||
|
@ -291,7 +291,7 @@ HWTEST_P(CopyHostPtrTest, imageWithDoubledRowPitchThatIsCreatedWithCopyHostPtrFl
|
|||
HWTEST_P(UseHostPtrTest, imageWithRowPitchCreatedWithUseHostPtrFlagCopiedActuallyVerifyMapImageData) {
|
||||
imageDesc.image_width = 546;
|
||||
imageDesc.image_height = 1;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
auto imgInfo = MockGmm::initImgInfo(imageDesc, 0, surfaceFormat);
|
||||
MockGmm::queryImgParams(pDevice->getGmmClientContext(), imgInfo);
|
||||
auto passedRowPitch = imgInfo.rowPitch + 32;
|
||||
|
@ -407,7 +407,7 @@ HWTEST_F(AUBCreateImage, image3DCreatedWithDoubledSlicePitchWhenQueriedForDataRe
|
|||
data += inputSlicePitch;
|
||||
}
|
||||
cl_mem_flags flags = CL_MEM_READ_WRITE | CL_MEM_COPY_HOST_PTR;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
image.reset(Image::create(context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
flags, 0, surfaceFormat, &imageDesc, host_ptr, retVal));
|
||||
|
||||
|
|
|
@ -960,7 +960,7 @@ TEST_F(EnqueueMapImageTest, givenImage1DArrayWhenEnqueueMapImageIsCalledThenRetu
|
|||
imageFormat.image_channel_order = CL_RGBA;
|
||||
imageFormat.image_channel_data_type = CL_UNSIGNED_INT16;
|
||||
|
||||
const ClSurfaceFormatInfo *surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
const ClSurfaceFormatInfo *surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
auto allocation = context->getMemoryManager()->allocateGraphicsMemoryWithProperties(MockAllocationProperties{context->getDevice(0)->getRootDeviceIndex(), imgSize});
|
||||
ASSERT_NE(allocation, nullptr);
|
||||
|
||||
|
|
|
@ -216,7 +216,7 @@ HWTEST_F(EnqueueThreading, enqueueCopyBufferToImage) {
|
|||
imageDesc.image_width = 1024u;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_WRITE_ONLY;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
std::unique_ptr<Image> dstImage(Image::create(context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), flags, 0, surfaceFormat, &imageDesc, nullptr, retVal));
|
||||
ASSERT_NE(nullptr, dstImage.get());
|
||||
|
||||
|
@ -240,7 +240,7 @@ HWTEST_F(EnqueueThreading, enqueueCopyImage) {
|
|||
imageDesc.image_type = CL_MEM_OBJECT_IMAGE1D;
|
||||
imageDesc.image_width = 1024u;
|
||||
cl_mem_flags flags = CL_MEM_WRITE_ONLY;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
std::unique_ptr<Image> srcImage(Image::create(context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), flags, 0, surfaceFormat, &imageDesc, nullptr, retVal));
|
||||
ASSERT_NE(nullptr, srcImage.get());
|
||||
std::unique_ptr<Image> dstImage(Image::create(context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), flags, 0, surfaceFormat, &imageDesc, nullptr, retVal));
|
||||
|
@ -268,7 +268,7 @@ HWTEST_F(EnqueueThreading, enqueueCopyImageToBuffer) {
|
|||
imageDesc.image_width = 1024u;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_WRITE_ONLY;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
std::unique_ptr<Image> srcImage(Image::create(context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), flags, 0, surfaceFormat, &imageDesc, nullptr, retVal));
|
||||
ASSERT_NE(nullptr, srcImage.get());
|
||||
|
||||
|
@ -307,7 +307,7 @@ HWTEST_F(EnqueueThreading, enqueueFillImage) {
|
|||
imageDesc.image_width = 1024u;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_WRITE_ONLY;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
std::unique_ptr<Image> image(Image::create(context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), flags, 0, surfaceFormat, &imageDesc, nullptr, retVal));
|
||||
ASSERT_NE(nullptr, image.get());
|
||||
|
||||
|
@ -353,7 +353,7 @@ HWTEST_F(EnqueueThreading, enqueueReadImage) {
|
|||
imageDesc.image_width = 1024u;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_WRITE_ONLY;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
std::unique_ptr<Image> image(Image::create(context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), flags, 0, surfaceFormat, &imageDesc, nullptr, retVal));
|
||||
ASSERT_NE(nullptr, image.get());
|
||||
|
||||
|
@ -403,7 +403,7 @@ HWTEST_F(EnqueueThreading, enqueueWriteImage) {
|
|||
imageDesc.image_width = 1024u;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_READ_ONLY;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
std::unique_ptr<Image> image(Image::create(context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), flags, 0, surfaceFormat, &imageDesc, nullptr, retVal));
|
||||
ASSERT_NE(nullptr, image.get());
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ struct MultipleMapImageTest : public DeviceFixture, public ::testing::Test {
|
|||
VariableBackup<ImageCreatFunc> backup(&imageFactory[eRenderCoreFamily].createImageFunction);
|
||||
imageFactory[eRenderCoreFamily].createImageFunction = MockImage<FamilyType>::createMockImage;
|
||||
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(Traits::flags, &Traits::imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(Traits::flags, &Traits::imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
auto img = Image::create(context, MemoryPropertiesParser::createMemoryProperties(Traits::flags, 0, 0), Traits::flags, 0, surfaceFormat, &Traits::imageDesc, Traits::hostPtr, retVal);
|
||||
|
|
|
@ -559,7 +559,7 @@ TEST_F(PerformanceHintTest, givenCompressedImageWhenItsCreatedThenProperPerforma
|
|||
imageDesc.image_slice_pitch = 0;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_READ_WRITE | CL_MEM_USE_HOST_PTR;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
|
||||
auto image = std::unique_ptr<Image>(Image::create(
|
||||
context.get(),
|
||||
|
@ -618,7 +618,7 @@ TEST_F(PerformanceHintTest, givenImageWithNoGmmWhenItsCreatedThenNoPerformanceHi
|
|||
imageDesc.image_slice_pitch = 0;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_READ_WRITE | CL_MEM_USE_HOST_PTR;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
|
||||
auto image = std::unique_ptr<Image>(Image::create(
|
||||
context.get(),
|
||||
|
@ -679,7 +679,7 @@ TEST_F(PerformanceHintTest, givenUncompressedImageWhenItsCreatedThenProperPerfor
|
|||
imageDesc.image_slice_pitch = 0;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_READ_WRITE | CL_MEM_USE_HOST_PTR;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
|
||||
auto image = std::unique_ptr<Image>(Image::create(
|
||||
context.get(),
|
||||
|
|
|
@ -147,7 +147,7 @@ TEST_P(GetSupportedImageFormatsTest, retrieveImageFormatsSRGB) {
|
|||
}
|
||||
}
|
||||
|
||||
if (isReadOnly && ((&castToObject<ClDevice>(devices[0])->getDevice())->getHardwareInfo().capabilityTable.clVersionSupport >= 20)) {
|
||||
if (isReadOnly && ((&castToObject<ClDevice>(devices[0])->getDevice())->getHardwareInfo().capabilityTable.supportsOcl21Features)) {
|
||||
EXPECT_TRUE(sRGBAFormatFound & sBGRAFormatFound);
|
||||
} else {
|
||||
EXPECT_FALSE(sRGBAFormatFound | sBGRAFormatFound);
|
||||
|
@ -287,8 +287,8 @@ TEST_P(NV12ExtensionSupportedImageFormatsTest, givenNV12ExtensionWhenQueriedForI
|
|||
nullptr,
|
||||
&numImageFormats);
|
||||
|
||||
unsigned int clVersionSupport = device.get()->getHardwareInfo().capabilityTable.clVersionSupport;
|
||||
size_t expectedNumReadOnlyFormats = (clVersionSupport >= 20) ? SurfaceFormats::readOnly20().size() : SurfaceFormats::readOnly12().size();
|
||||
auto supportsOcl20Features = device.get()->getHardwareInfo().capabilityTable.supportsOcl21Features;
|
||||
size_t expectedNumReadOnlyFormats = (supportsOcl20Features) ? SurfaceFormats::readOnly20().size() : SurfaceFormats::readOnly12().size();
|
||||
|
||||
if (Image::isImage2dOr2dArray(imageFormats) && imageFormatsFlags == CL_MEM_READ_ONLY) {
|
||||
expectedNumReadOnlyFormats += SurfaceFormats::readOnlyDepth().size();
|
||||
|
|
|
@ -632,7 +632,7 @@ TYPED_TEST_P(D3DTests, givenReadonlyFormatWhenLookingForSurfaceFormatThenReturnV
|
|||
format.OCLImageFormat.image_channel_order == CL_BGRA ||
|
||||
format.OCLImageFormat.image_channel_order == CL_RG ||
|
||||
format.OCLImageFormat.image_channel_order == CL_R) {
|
||||
auto surfaceFormat = D3DSharing<TypeParam>::findSurfaceFormatInfo(format.surfaceFormat.GMMSurfaceFormat, CL_MEM_READ_ONLY, 12);
|
||||
auto surfaceFormat = D3DSharing<TypeParam>::findSurfaceFormatInfo(format.surfaceFormat.GMMSurfaceFormat, CL_MEM_READ_ONLY, false /* supportsOcl20Features */);
|
||||
ASSERT_NE(nullptr, surfaceFormat);
|
||||
EXPECT_EQ(&format, surfaceFormat);
|
||||
}
|
||||
|
@ -647,7 +647,7 @@ TYPED_TEST_P(D3DTests, givenWriteOnlyFormatWhenLookingForSurfaceFormatThenReturn
|
|||
format.OCLImageFormat.image_channel_order == CL_BGRA ||
|
||||
format.OCLImageFormat.image_channel_order == CL_RG ||
|
||||
format.OCLImageFormat.image_channel_order == CL_R) {
|
||||
auto surfaceFormat = D3DSharing<TypeParam>::findSurfaceFormatInfo(format.surfaceFormat.GMMSurfaceFormat, CL_MEM_WRITE_ONLY, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = D3DSharing<TypeParam>::findSurfaceFormatInfo(format.surfaceFormat.GMMSurfaceFormat, CL_MEM_WRITE_ONLY, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
ASSERT_NE(nullptr, surfaceFormat);
|
||||
EXPECT_EQ(&format, surfaceFormat);
|
||||
}
|
||||
|
@ -662,7 +662,7 @@ TYPED_TEST_P(D3DTests, givenReadWriteFormatWhenLookingForSurfaceFormatThenReturn
|
|||
format.OCLImageFormat.image_channel_order == CL_BGRA ||
|
||||
format.OCLImageFormat.image_channel_order == CL_RG ||
|
||||
format.OCLImageFormat.image_channel_order == CL_R) {
|
||||
auto surfaceFormat = D3DSharing<TypeParam>::findSurfaceFormatInfo(format.surfaceFormat.GMMSurfaceFormat, CL_MEM_READ_WRITE, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = D3DSharing<TypeParam>::findSurfaceFormatInfo(format.surfaceFormat.GMMSurfaceFormat, CL_MEM_READ_WRITE, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
ASSERT_NE(nullptr, surfaceFormat);
|
||||
EXPECT_EQ(&format, surfaceFormat);
|
||||
}
|
||||
|
|
|
@ -179,7 +179,7 @@ TEST_F(DeviceGetCapsTest, WhenCreatingDeviceThenCapsArePopulatedCorrectly) {
|
|||
EXPECT_EQ(16384u, sharedCaps.image2DMaxWidth);
|
||||
EXPECT_EQ(16384u, sharedCaps.image2DMaxHeight);
|
||||
EXPECT_EQ(2048u, sharedCaps.imageMaxArraySize);
|
||||
if (device->getHardwareInfo().capabilityTable.clVersionSupport == 12 && is64bit) {
|
||||
if (device->getHardwareInfo().capabilityTable.supportsOcl21Features == false && is64bit) {
|
||||
EXPECT_TRUE(sharedCaps.force32BitAddressess);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ struct ImageHelper {
|
|||
static Image *create(Context *context = Traits::context, const cl_image_desc *imgDesc = &Traits::imageDesc,
|
||||
const cl_image_format *imgFormat = &Traits::imageFormat) {
|
||||
auto retVal = CL_INVALID_VALUE;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(Traits::flags, imgFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(Traits::flags, imgFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
auto image = Image::create(
|
||||
context,
|
||||
NEO::MemoryPropertiesParser::createMemoryProperties(Traits::flags, 0, 0),
|
||||
|
|
|
@ -36,7 +36,7 @@ struct AppendSurfaceStateParamsTest : public ::testing::Test {
|
|||
}
|
||||
|
||||
void createImage() {
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
EXPECT_NE(nullptr, surfaceFormat);
|
||||
image.reset(Image::create(&context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), flags, 0, surfaceFormat, &imageDesc, nullptr, retVal));
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ TEST_F(KernelImageArgTest, givenImageWithNumSamplesWhenSetArgIsCalledThenPatchNu
|
|||
imgDesc.image_width = 5;
|
||||
imgDesc.image_height = 5;
|
||||
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(0, &imgFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(0, &imgFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
auto sampleImg = Image::create(context.get(), {}, 0, 0, surfaceFormat, &imgDesc, nullptr, retVal);
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
|
||||
|
@ -120,7 +120,7 @@ TEST_F(KernelImageArgTest, givenImageWithWriteOnlyAccessAndReadOnlyArgWhenCheckC
|
|||
cl_mem_flags flags = CL_MEM_WRITE_ONLY;
|
||||
imgDesc.image_width = 5;
|
||||
imgDesc.image_height = 5;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(0, &imgFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(0, &imgFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
std::unique_ptr<Image> img(Image::create(context.get(), MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), flags, 0, surfaceFormat, &imgDesc, nullptr, retVal));
|
||||
pKernelInfo->kernelArgInfo[0].metadata.accessQualifier = NEO::KernelArgMetadata::AccessReadOnly;
|
||||
cl_mem memObj = img.get();
|
||||
|
@ -159,7 +159,7 @@ TEST_F(KernelImageArgTest, givenImageWithReadOnlyAccessAndWriteOnlyArgWhenCheckC
|
|||
cl_mem_flags flags = CL_MEM_READ_ONLY;
|
||||
imgDesc.image_width = 5;
|
||||
imgDesc.image_height = 5;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(0, &imgFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(0, &imgFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
std::unique_ptr<Image> img(Image::create(context.get(), MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), flags, 0, surfaceFormat, &imgDesc, nullptr, retVal));
|
||||
pKernelInfo->kernelArgInfo[0].metadata.accessQualifier = NEO::KernelArgMetadata::AccessWriteOnly;
|
||||
cl_mem memObj = img.get();
|
||||
|
@ -179,7 +179,7 @@ TEST_F(KernelImageArgTest, givenImageWithReadOnlyAccessAndReadOnlyArgWhenCheckCo
|
|||
cl_mem_flags flags = CL_MEM_READ_ONLY;
|
||||
imgDesc.image_width = 5;
|
||||
imgDesc.image_height = 5;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(0, &imgFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(0, &imgFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
std::unique_ptr<Image> img(Image::create(context.get(), MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), flags, 0, surfaceFormat, &imgDesc, nullptr, retVal));
|
||||
pKernelInfo->kernelArgInfo[0].metadata.accessQualifier = NEO::KernelArgMetadata::AccessReadOnly;
|
||||
cl_mem memObj = img.get();
|
||||
|
@ -195,7 +195,7 @@ TEST_F(KernelImageArgTest, givenImageWithWriteOnlyAccessAndWriteOnlyArgWhenCheck
|
|||
cl_mem_flags flags = CL_MEM_WRITE_ONLY;
|
||||
imgDesc.image_width = 5;
|
||||
imgDesc.image_height = 5;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(0, &imgFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(0, &imgFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
std::unique_ptr<Image> img(Image::create(context.get(), MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), flags, 0, surfaceFormat, &imgDesc, nullptr, retVal));
|
||||
pKernelInfo->kernelArgInfo[0].metadata.accessQualifier = NEO::KernelArgMetadata::AccessWriteOnly;
|
||||
cl_mem memObj = img.get();
|
||||
|
@ -212,7 +212,7 @@ HWTEST_F(KernelImageArgTest, givenImgWithMcsAllocWhenMakeResidentThenMakeMcsAllo
|
|||
imgDesc.image_width = 5;
|
||||
imgDesc.image_height = 5;
|
||||
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(0, &imgFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(0, &imgFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
auto img = Image::create(context.get(), {}, 0, 0, surfaceFormat, &imgDesc, nullptr, retVal);
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
auto mcsAlloc = context->getMemoryManager()->allocateGraphicsMemoryWithProperties(MockAllocationProperties{pDevice->getRootDeviceIndex(), MemoryConstants::pageSize});
|
||||
|
@ -240,7 +240,7 @@ TEST_F(KernelImageArgTest, givenKernelWithSettedArgWhenUnSetCalledThenArgIsUnset
|
|||
cl_mem_flags flags = CL_MEM_WRITE_ONLY;
|
||||
imgDesc.image_width = 5;
|
||||
imgDesc.image_height = 5;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(0, &imgFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(0, &imgFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
std::unique_ptr<Image> img(Image::create(context.get(), MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), flags, 0, surfaceFormat, &imgDesc, nullptr, retVal));
|
||||
cl_mem memObj = img.get();
|
||||
|
||||
|
@ -277,7 +277,7 @@ TEST_F(KernelImageArgTest, givenKernelWithSharedImageWhenSetArgCalledThenUsingSh
|
|||
cl_mem_flags flags = CL_MEM_WRITE_ONLY;
|
||||
imgDesc.image_width = 5;
|
||||
imgDesc.image_height = 5;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(0, &imgFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(0, &imgFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
std::unique_ptr<Image> img(Image::create(context.get(), MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), flags, 0, surfaceFormat, &imgDesc, nullptr, retVal));
|
||||
cl_mem memObj = img.get();
|
||||
|
||||
|
@ -410,4 +410,4 @@ TEST_F(KernelImageArgTest, givenNotUsedBindlessImagesAndImageArgWhenPatchingSurf
|
|||
auto patchLocation = reinterpret_cast<uint32_t *>(ptrOffset(pKernel->getCrossThreadData(), crossThreadDataOffset));
|
||||
|
||||
EXPECT_EQ(0xdeadu, *patchLocation);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2079,7 +2079,7 @@ HWTEST_F(KernelResidencyTest, test_MakeArgsResidentCheckImageFromImage) {
|
|||
cl_image_format imageFormat;
|
||||
imageFormat.image_channel_data_type = CL_UNORM_INT8;
|
||||
imageFormat.image_channel_order = CL_NV12_INTEL;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, pClDevice->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, pClDevice->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
|
||||
cl_image_desc imageDesc = {};
|
||||
imageDesc.image_type = CL_MEM_OBJECT_IMAGE2D;
|
||||
|
@ -2096,7 +2096,7 @@ HWTEST_F(KernelResidencyTest, test_MakeArgsResidentCheckImageFromImage) {
|
|||
//create Y plane
|
||||
imageFormat.image_channel_order = CL_R;
|
||||
flags = CL_MEM_READ_ONLY;
|
||||
surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
|
||||
imageDesc.image_width = 0;
|
||||
imageDesc.image_height = 0;
|
||||
|
|
|
@ -29,7 +29,7 @@ class CreateImageFormatTest : public testing::TestWithParam<size_t> {
|
|||
indexImageFormat = GetParam();
|
||||
|
||||
ArrayRef<const ClSurfaceFormatInfo>
|
||||
surfaceFormatTable = SurfaceFormats::surfaceFormats(flags, defaultHwInfo->capabilityTable.clVersionSupport);
|
||||
surfaceFormatTable = SurfaceFormats::surfaceFormats(flags, defaultHwInfo->capabilityTable.supportsOcl21Features);
|
||||
ASSERT_GT(surfaceFormatTable.size(), indexImageFormat);
|
||||
|
||||
surfaceFormat = &surfaceFormatTable[indexImageFormat];
|
||||
|
|
|
@ -72,7 +72,7 @@ typedef CreateImage1DTest CreateImage1DType;
|
|||
|
||||
HWTEST_P(CreateImage1DType, validTypes) {
|
||||
cl_mem_flags flags = CL_MEM_READ_WRITE;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, pClDevice->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, pClDevice->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
auto image = Image::create(
|
||||
context,
|
||||
MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
|
|
|
@ -59,7 +59,7 @@ class Image2dFromBufferTest : public DeviceFixture, public ::testing::Test {
|
|||
|
||||
Image *createImage() {
|
||||
cl_mem_flags flags = CL_MEM_READ_ONLY;
|
||||
auto surfaceFormat = (ClSurfaceFormatInfo *)Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = (ClSurfaceFormatInfo *)Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
return Image::create(&context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), flags, 0, surfaceFormat, &imageDesc, NULL, retVal);
|
||||
}
|
||||
cl_image_format imageFormat;
|
||||
|
@ -90,7 +90,7 @@ TEST_F(Image2dFromBufferTest, CreateImage2dFromBuffer) {
|
|||
TEST_F(Image2dFromBufferTest, givenBufferWhenCreateImage2dArrayFromBufferThenImageDescriptorIsInvalid) {
|
||||
imageDesc.image_type = CL_MEM_OBJECT_IMAGE2D_ARRAY;
|
||||
cl_mem_flags flags = CL_MEM_READ_ONLY;
|
||||
auto surfaceFormat = (ClSurfaceFormatInfo *)Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = (ClSurfaceFormatInfo *)Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
retVal = Image::validate(&context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), surfaceFormat, &imageDesc, NULL);
|
||||
EXPECT_EQ(CL_INVALID_IMAGE_DESCRIPTOR, retVal);
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ TEST_F(Image2dFromBufferTest, givenInvalidRowPitchWhenCreateImage2dFromBufferThe
|
|||
char ptr[10];
|
||||
imageDesc.image_row_pitch = 255;
|
||||
cl_mem_flags flags = CL_MEM_READ_ONLY;
|
||||
auto surfaceFormat = (ClSurfaceFormatInfo *)Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = (ClSurfaceFormatInfo *)Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
retVal = Image::validate(&context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), surfaceFormat, &imageDesc, ptr);
|
||||
EXPECT_EQ(CL_INVALID_IMAGE_FORMAT_DESCRIPTOR, retVal);
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ TEST_F(Image2dFromBufferTest, InvalidHostPtrAlignment) {
|
|||
imageDesc.mem_object = clCreateBuffer(&context, CL_MEM_USE_HOST_PTR, size, nonAlignedHostPtr, &retVal);
|
||||
ASSERT_NE(nullptr, imageDesc.mem_object);
|
||||
cl_mem_flags flags = CL_MEM_READ_ONLY;
|
||||
auto surfaceFormat = (ClSurfaceFormatInfo *)Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = (ClSurfaceFormatInfo *)Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
retVal = Image::validate(&context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), surfaceFormat, &imageDesc, NULL);
|
||||
EXPECT_EQ(CL_INVALID_IMAGE_FORMAT_DESCRIPTOR, retVal);
|
||||
|
||||
|
@ -148,7 +148,7 @@ TEST_F(Image2dFromBufferTest, givenInvalidFlagsWhenValidateIsCalledThenReturnErr
|
|||
cl_mem_flags flags[] = {CL_MEM_USE_HOST_PTR, CL_MEM_COPY_HOST_PTR};
|
||||
|
||||
for (auto flag : flags) {
|
||||
const auto surfaceFormat = Image::getSurfaceFormatFromTable(flag, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
const auto surfaceFormat = Image::getSurfaceFormatFromTable(flag, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
retVal = Image::validate(&context, MemoryPropertiesParser::createMemoryProperties(flag, 0, 0), surfaceFormat, &imageDesc, reinterpret_cast<void *>(0x12345));
|
||||
EXPECT_EQ(CL_INVALID_VALUE, retVal);
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ TEST_F(Image2dFromBufferTest, givenOneChannel8BitColorsNoRowPitchSpecifiedAndToo
|
|||
imageFormat.image_channel_data_type = CL_UNORM_INT8;
|
||||
imageFormat.image_channel_order = CL_R;
|
||||
|
||||
const auto surfaceFormat = static_cast<const ClSurfaceFormatInfo *>(Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport));
|
||||
const auto surfaceFormat = static_cast<const ClSurfaceFormatInfo *>(Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features));
|
||||
retVal = Image::validate(&context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), surfaceFormat, &imageDesc, NULL);
|
||||
EXPECT_EQ(CL_INVALID_IMAGE_FORMAT_DESCRIPTOR, retVal);
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ TEST_F(Image2dFromBufferTest, givenOneChannel16BitColorsNoRowPitchSpecifiedAndTo
|
|||
imageFormat.image_channel_data_type = CL_UNORM_INT16;
|
||||
imageFormat.image_channel_order = CL_R;
|
||||
|
||||
const auto surfaceFormat = static_cast<const ClSurfaceFormatInfo *>(Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport));
|
||||
const auto surfaceFormat = static_cast<const ClSurfaceFormatInfo *>(Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features));
|
||||
retVal = Image::validate(&context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), surfaceFormat, &imageDesc, NULL);
|
||||
EXPECT_EQ(CL_INVALID_IMAGE_FORMAT_DESCRIPTOR, retVal);
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ TEST_F(Image2dFromBufferTest, givenFourChannel8BitColorsNoRowPitchSpecifiedAndTo
|
|||
imageFormat.image_channel_data_type = CL_UNORM_INT8;
|
||||
imageFormat.image_channel_order = CL_RGBA;
|
||||
|
||||
const auto surfaceFormat = static_cast<const ClSurfaceFormatInfo *>(Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport));
|
||||
const auto surfaceFormat = static_cast<const ClSurfaceFormatInfo *>(Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features));
|
||||
retVal = Image::validate(&context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), surfaceFormat, &imageDesc, NULL);
|
||||
EXPECT_EQ(CL_INVALID_IMAGE_FORMAT_DESCRIPTOR, retVal);
|
||||
}
|
||||
|
@ -197,7 +197,7 @@ TEST_F(Image2dFromBufferTest, givenFourChannel16BitColorsNoRowPitchSpecifiedAndT
|
|||
imageFormat.image_channel_data_type = CL_UNORM_INT16;
|
||||
imageFormat.image_channel_order = CL_RGBA;
|
||||
|
||||
const auto surfaceFormat = static_cast<const ClSurfaceFormatInfo *>(Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport));
|
||||
const auto surfaceFormat = static_cast<const ClSurfaceFormatInfo *>(Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features));
|
||||
retVal = Image::validate(&context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), surfaceFormat, &imageDesc, NULL);
|
||||
EXPECT_EQ(CL_INVALID_IMAGE_FORMAT_DESCRIPTOR, retVal);
|
||||
}
|
||||
|
@ -210,7 +210,7 @@ TEST_F(Image2dFromBufferTest, givenFourChannel8BitColorsAndNotTooLargeRowPitchSp
|
|||
imageFormat.image_channel_data_type = CL_UNORM_INT8;
|
||||
imageFormat.image_channel_order = CL_RGBA;
|
||||
|
||||
const auto surfaceFormat = static_cast<const ClSurfaceFormatInfo *>(Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport));
|
||||
const auto surfaceFormat = static_cast<const ClSurfaceFormatInfo *>(Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features));
|
||||
retVal = Image::validate(&context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), surfaceFormat, &imageDesc, NULL);
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ TEST_F(Image2dFromBufferTest, givenFourChannel8BitColorsAndTooLargeRowPitchSpeci
|
|||
imageFormat.image_channel_data_type = CL_UNORM_INT8;
|
||||
imageFormat.image_channel_order = CL_RGBA;
|
||||
|
||||
const auto surfaceFormat = static_cast<const ClSurfaceFormatInfo *>(Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport));
|
||||
const auto surfaceFormat = static_cast<const ClSurfaceFormatInfo *>(Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features));
|
||||
retVal = Image::validate(&context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), surfaceFormat, &imageDesc, NULL);
|
||||
EXPECT_EQ(CL_INVALID_IMAGE_FORMAT_DESCRIPTOR, retVal);
|
||||
}
|
||||
|
@ -238,7 +238,7 @@ TEST_F(Image2dFromBufferTest, givenUnalignedImageWidthAndNoSpaceInBufferForAlign
|
|||
imageFormat.image_channel_data_type = CL_UNORM_INT8;
|
||||
imageFormat.image_channel_order = CL_R;
|
||||
|
||||
const auto surfaceFormat = static_cast<const ClSurfaceFormatInfo *>(Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport));
|
||||
const auto surfaceFormat = static_cast<const ClSurfaceFormatInfo *>(Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features));
|
||||
retVal = Image::validate(&context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), surfaceFormat, &imageDesc, NULL);
|
||||
EXPECT_EQ(CL_INVALID_IMAGE_FORMAT_DESCRIPTOR, retVal);
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ class CreateImage2DTest : public DeviceFixture,
|
|||
DeviceFixture::TearDown();
|
||||
}
|
||||
Image *createImageWithFlags(cl_mem_flags flags) {
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
return Image::create(context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), flags, 0, surfaceFormat, &imageDesc, nullptr, retVal);
|
||||
}
|
||||
cl_image_format imageFormat;
|
||||
|
|
|
@ -60,7 +60,7 @@ class CreateImage3DTest : public DeviceFixture,
|
|||
|
||||
HWTEST_F(CreateImage3DTest, validTypes) {
|
||||
cl_mem_flags flags = CL_MEM_READ_WRITE;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
auto image = Image::create(context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), flags, 0, surfaceFormat, &imageDesc, nullptr, retVal);
|
||||
|
||||
ASSERT_EQ(CL_SUCCESS, retVal);
|
||||
|
@ -88,7 +88,7 @@ HWTEST_F(CreateImage3DTest, validTypes) {
|
|||
HWTEST_F(CreateImage3DTest, calculate3dImageQpitchTiledAndLinear) {
|
||||
bool defaultTiling = DebugManager.flags.ForceLinearImages.get();
|
||||
imageDesc.image_height = 1;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(0, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(0, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
auto imgInfo = MockGmm::initImgInfo(imageDesc, 0, surfaceFormat);
|
||||
MockGmm::queryImgParams(context->getDevice(0)->getGmmClientContext(), imgInfo);
|
||||
|
||||
|
@ -113,7 +113,7 @@ HWTEST_F(CreateImage3DTest, calculate3dImageQpitchTiledAndLinear) {
|
|||
DebugManager.flags.ForceLinearImages.set(!defaultTiling);
|
||||
|
||||
// query again
|
||||
surfaceFormat = Image::getSurfaceFormatFromTable(0, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
surfaceFormat = Image::getSurfaceFormatFromTable(0, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
MockGmm::queryImgParams(context->getDevice(0)->getGmmClientContext(), imgInfo);
|
||||
|
||||
image = Image::create(
|
||||
|
|
|
@ -72,7 +72,7 @@ typedef ImageArraySizeTest CreateImageArraySize;
|
|||
HWTEST_P(CreateImageArraySize, arrayTypes) {
|
||||
|
||||
cl_mem_flags flags = CL_MEM_READ_WRITE;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
auto image = Image::create(
|
||||
context,
|
||||
MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
|
@ -113,7 +113,7 @@ typedef ImageArraySizeTest CreateImageNonArraySize;
|
|||
HWTEST_P(CreateImageNonArraySize, NonArrayTypes) {
|
||||
|
||||
cl_mem_flags flags = CL_MEM_READ_WRITE;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
auto image = Image::create(
|
||||
context,
|
||||
MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
|
|
|
@ -61,7 +61,7 @@ class ImageFromSubBufferTest : public DeviceFixture, public ::testing::Test {
|
|||
|
||||
Image *createImage() {
|
||||
cl_mem_flags flags = CL_MEM_READ_ONLY;
|
||||
auto surfaceFormat = (ClSurfaceFormatInfo *)Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = (ClSurfaceFormatInfo *)Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
return Image::create(&context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), flags, 0, surfaceFormat, &imageDesc, NULL, retVal);
|
||||
}
|
||||
cl_image_format imageFormat;
|
||||
|
|
|
@ -50,7 +50,7 @@ class ImageRedescribeTest : public testing::TestWithParam<std::tuple<size_t, uin
|
|||
|
||||
retVal = CL_INVALID_VALUE;
|
||||
cl_mem_flags flags = CL_MEM_READ_WRITE;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
image.reset(Image::create(
|
||||
&context,
|
||||
MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
|
@ -192,7 +192,7 @@ TEST_P(ImageRedescribeTest, givenImageWithMaxSizesWhenItIsRedescribedThenNewImag
|
|||
imageDesc.num_samples = 0;
|
||||
imageDesc.mem_object = NULL;
|
||||
cl_mem_flags flags = CL_MEM_READ_WRITE;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
auto bigImage = std::unique_ptr<Image>(Image::create(&context,
|
||||
MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
flags,
|
||||
|
|
|
@ -40,12 +40,12 @@ TEST_P(SnormSurfaceFormatAccessFlagsTests, givenSnormFormatWhenGetSurfaceFormatF
|
|||
cl_mem_flags flags = GetParam();
|
||||
|
||||
for (const auto &snormSurfaceFormat : referenceSnormSurfaceFormats) {
|
||||
auto format = Image::getSurfaceFormatFromTable(flags, &snormSurfaceFormat.OCLImageFormat, 12);
|
||||
auto format = Image::getSurfaceFormatFromTable(flags, &snormSurfaceFormat.OCLImageFormat, false /* supportsOcl20Features */);
|
||||
EXPECT_NE(nullptr, format);
|
||||
EXPECT_TRUE(memcmp(&snormSurfaceFormat, format, sizeof(ClSurfaceFormatInfo)) == 0);
|
||||
}
|
||||
for (const auto &snormSurfaceFormat : referenceSnormSurfaceFormats) {
|
||||
auto format = Image::getSurfaceFormatFromTable(flags, &snormSurfaceFormat.OCLImageFormat, 20);
|
||||
auto format = Image::getSurfaceFormatFromTable(flags, &snormSurfaceFormat.OCLImageFormat, true /* supportsOcl20Features */);
|
||||
EXPECT_NE(nullptr, format);
|
||||
EXPECT_TRUE(memcmp(&snormSurfaceFormat, format, sizeof(ClSurfaceFormatInfo)) == 0);
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ class CreateImageTest : public DeviceFixture,
|
|||
CreateImageTest() {
|
||||
}
|
||||
Image *createImageWithFlags(cl_mem_flags flags) {
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
return Image::create(context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
flags, 0, surfaceFormat, &imageDesc, nullptr, retVal);
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ TEST(TestSliceAndRowPitch, ForDifferentDescriptorsGetHostPtrSlicePitchAndRowPitc
|
|||
imageDesc.image_slice_pitch = 0;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_READ_WRITE | CL_MEM_USE_HOST_PTR;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
auto image = Image::create(
|
||||
&context,
|
||||
MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
|
@ -345,7 +345,7 @@ TEST(TestCreateImage, UseSharedContextToCreateImage) {
|
|||
imageDesc.image_slice_pitch = 0;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_READ_WRITE | CL_MEM_USE_HOST_PTR;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
|
||||
auto image = Image::create(
|
||||
&context,
|
||||
|
@ -406,7 +406,7 @@ TEST(TestCreateImageUseHostPtr, CheckMemoryAllocationForDifferenHostPtrAlignment
|
|||
true};
|
||||
|
||||
cl_mem_flags flags = CL_MEM_HOST_NO_ACCESS | CL_MEM_USE_HOST_PTR;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
for (int i = 0; i < 4; i++) {
|
||||
auto image = Image::create(
|
||||
&context,
|
||||
|
@ -443,7 +443,7 @@ TEST(TestCreateImageUseHostPtr, givenZeroCopyImageValuesWhenUsingHostPtrThenZero
|
|||
imageFormat.image_channel_order = CL_R;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_READ_WRITE | CL_MEM_USE_HOST_PTR;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
auto hostPtr = alignedMalloc(imageDesc.image_width * surfaceFormat->surfaceFormat.ImageElementSizeInBytes, MemoryConstants::cacheLineSize);
|
||||
|
||||
auto image = std::unique_ptr<Image>(Image::create(
|
||||
|
@ -554,7 +554,7 @@ struct CreateImageHostPtr
|
|||
}
|
||||
|
||||
Image *createImage(cl_int &retVal) {
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context->getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
return Image::create(
|
||||
context,
|
||||
MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
|
@ -961,7 +961,7 @@ INSTANTIATE_TEST_CASE_P(
|
|||
|
||||
TEST(ImageGetSurfaceFormatInfoTest, givenNullptrFormatWhenGetSurfaceFormatInfoIsCalledThenReturnsNullptr) {
|
||||
MockContext context;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(0, nullptr, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(0, nullptr, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
EXPECT_EQ(nullptr, surfaceFormat);
|
||||
}
|
||||
|
||||
|
@ -970,7 +970,7 @@ HWTEST_F(ImageCompressionTests, givenTiledImageWhenCreatingAllocationThenPreferR
|
|||
imageDesc.image_width = 5;
|
||||
imageDesc.image_height = 5;
|
||||
MockContext context;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
|
||||
auto image = std::unique_ptr<Image>(Image::create(mockContext.get(), MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
flags, 0, surfaceFormat, &imageDesc, nullptr, retVal));
|
||||
|
@ -984,7 +984,7 @@ TEST_F(ImageCompressionTests, givenNonTiledImageWhenCreatingAllocationThenDontPr
|
|||
imageDesc.image_type = CL_MEM_OBJECT_IMAGE1D;
|
||||
imageDesc.image_width = 5;
|
||||
MockContext context;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
|
||||
auto image = std::unique_ptr<Image>(Image::create(mockContext.get(), MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
flags, 0, surfaceFormat, &imageDesc, nullptr, retVal));
|
||||
|
@ -1182,7 +1182,7 @@ TEST(ImageTest, givenClMemForceLinearStorageSetWhenCreateImageThenDisallowTiling
|
|||
imageFormat.image_channel_order = CL_R;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_READ_WRITE | CL_MEM_FORCE_LINEAR_STORAGE_INTEL;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
|
||||
auto image = std::unique_ptr<Image>(Image::create(
|
||||
&context,
|
||||
|
@ -1229,7 +1229,7 @@ TEST(ImageTest, givenClMemCopyHostPointerPassedToImageCreateWhenAllocationIsNotI
|
|||
imageFormat.image_channel_data_type = CL_UNSIGNED_INT8;
|
||||
imageFormat.image_channel_order = CL_R;
|
||||
MockContext context;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
|
||||
std::unique_ptr<Image> image(Image::create(&ctx, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), flags, 0, surfaceFormat, &imageDesc, memory, retVal));
|
||||
EXPECT_NE(nullptr, image);
|
||||
|
|
|
@ -70,7 +70,7 @@ class CreateTiledImageTest : public DeviceFixture,
|
|||
HWTEST_P(CreateTiledImageTest, isTiledImageIsSetForTiledImages) {
|
||||
MockContext context;
|
||||
cl_mem_flags flags = CL_MEM_READ_WRITE;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, pClDevice->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, pClDevice->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
auto image = Image::create(
|
||||
&context,
|
||||
MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
|
|
|
@ -112,12 +112,12 @@ TEST(ImageDepthFormatTest, returnSurfaceFormatForDepthFormats) {
|
|||
imgFormat.image_channel_order = CL_DEPTH;
|
||||
imgFormat.image_channel_data_type = CL_FLOAT;
|
||||
|
||||
auto surfaceFormatInfo = Image::getSurfaceFormatFromTable(CL_MEM_READ_WRITE, &imgFormat, defaultHwInfo->capabilityTable.clVersionSupport);
|
||||
auto surfaceFormatInfo = Image::getSurfaceFormatFromTable(CL_MEM_READ_WRITE, &imgFormat, defaultHwInfo->capabilityTable.supportsOcl21Features);
|
||||
ASSERT_NE(surfaceFormatInfo, nullptr);
|
||||
EXPECT_TRUE(surfaceFormatInfo->surfaceFormat.GMMSurfaceFormat == GMM_FORMAT_R32_FLOAT_TYPE);
|
||||
|
||||
imgFormat.image_channel_data_type = CL_UNORM_INT16;
|
||||
surfaceFormatInfo = Image::getSurfaceFormatFromTable(CL_MEM_READ_WRITE, &imgFormat, defaultHwInfo->capabilityTable.clVersionSupport);
|
||||
surfaceFormatInfo = Image::getSurfaceFormatFromTable(CL_MEM_READ_WRITE, &imgFormat, defaultHwInfo->capabilityTable.supportsOcl21Features);
|
||||
ASSERT_NE(surfaceFormatInfo, nullptr);
|
||||
EXPECT_TRUE(surfaceFormatInfo->surfaceFormat.GMMSurfaceFormat == GMM_FORMAT_R16_UNORM_TYPE);
|
||||
}
|
||||
|
@ -127,12 +127,12 @@ TEST(ImageDepthFormatTest, returnSurfaceFormatForWriteOnlyDepthFormats) {
|
|||
imgFormat.image_channel_order = CL_DEPTH;
|
||||
imgFormat.image_channel_data_type = CL_FLOAT;
|
||||
|
||||
auto surfaceFormatInfo = Image::getSurfaceFormatFromTable(CL_MEM_WRITE_ONLY, &imgFormat, defaultHwInfo->capabilityTable.clVersionSupport);
|
||||
auto surfaceFormatInfo = Image::getSurfaceFormatFromTable(CL_MEM_WRITE_ONLY, &imgFormat, defaultHwInfo->capabilityTable.supportsOcl21Features);
|
||||
ASSERT_NE(surfaceFormatInfo, nullptr);
|
||||
EXPECT_TRUE(surfaceFormatInfo->surfaceFormat.GMMSurfaceFormat == GMM_FORMAT_R32_FLOAT_TYPE);
|
||||
|
||||
imgFormat.image_channel_data_type = CL_UNORM_INT16;
|
||||
surfaceFormatInfo = Image::getSurfaceFormatFromTable(CL_MEM_WRITE_ONLY, &imgFormat, defaultHwInfo->capabilityTable.clVersionSupport);
|
||||
surfaceFormatInfo = Image::getSurfaceFormatFromTable(CL_MEM_WRITE_ONLY, &imgFormat, defaultHwInfo->capabilityTable.supportsOcl21Features);
|
||||
ASSERT_NE(surfaceFormatInfo, nullptr);
|
||||
EXPECT_TRUE(surfaceFormatInfo->surfaceFormat.GMMSurfaceFormat == GMM_FORMAT_R16_UNORM_TYPE);
|
||||
}
|
||||
|
@ -142,13 +142,13 @@ TEST(ImageDepthFormatTest, returnSurfaceFormatForDepthStencilFormats) {
|
|||
imgFormat.image_channel_order = CL_DEPTH_STENCIL;
|
||||
imgFormat.image_channel_data_type = CL_UNORM_INT24;
|
||||
|
||||
auto surfaceFormatInfo = Image::getSurfaceFormatFromTable(CL_MEM_READ_ONLY, &imgFormat, defaultHwInfo->capabilityTable.clVersionSupport);
|
||||
auto surfaceFormatInfo = Image::getSurfaceFormatFromTable(CL_MEM_READ_ONLY, &imgFormat, defaultHwInfo->capabilityTable.supportsOcl21Features);
|
||||
ASSERT_NE(surfaceFormatInfo, nullptr);
|
||||
EXPECT_TRUE(surfaceFormatInfo->surfaceFormat.GMMSurfaceFormat == GMM_FORMAT_GENERIC_32BIT);
|
||||
|
||||
imgFormat.image_channel_order = CL_DEPTH_STENCIL;
|
||||
imgFormat.image_channel_data_type = CL_FLOAT;
|
||||
surfaceFormatInfo = Image::getSurfaceFormatFromTable(CL_MEM_READ_ONLY, &imgFormat, defaultHwInfo->capabilityTable.clVersionSupport);
|
||||
surfaceFormatInfo = Image::getSurfaceFormatFromTable(CL_MEM_READ_ONLY, &imgFormat, defaultHwInfo->capabilityTable.supportsOcl21Features);
|
||||
ASSERT_NE(surfaceFormatInfo, nullptr);
|
||||
EXPECT_TRUE(surfaceFormatInfo->surfaceFormat.GMMSurfaceFormat == GMM_FORMAT_R32G32_FLOAT_TYPE);
|
||||
}
|
||||
|
|
|
@ -329,7 +329,7 @@ HWTEST_F(UsmDestructionTests, givenSharedUsmAllocationWhenBlockingFreeIsCalledTh
|
|||
MockClDevice mockClDevice(&mockDevice);
|
||||
MockContext mockContext(&mockClDevice, false);
|
||||
|
||||
if (mockContext.getDevice(0u)->getHardwareInfo().capabilityTable.clVersionSupport < 20) {
|
||||
if (mockContext.getDevice(0u)->getHardwareInfo().capabilityTable.supportsOcl21Features == false) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
|
||||
|
@ -368,7 +368,7 @@ HWTEST_F(UsmDestructionTests, givenUsmAllocationWhenBlockingFreeIsCalledThenWait
|
|||
MockClDevice mockClDevice(&mockDevice);
|
||||
MockContext mockContext(&mockClDevice, false);
|
||||
|
||||
if (mockContext.getDevice(0u)->getHardwareInfo().capabilityTable.clVersionSupport < 20) {
|
||||
if (mockContext.getDevice(0u)->getHardwareInfo().capabilityTable.supportsOcl21Features == false) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
|
||||
|
|
|
@ -73,12 +73,12 @@ class Nv12ImageTest : public testing::Test {
|
|||
}
|
||||
|
||||
void validateImageWithFlags(cl_mem_flags flags) {
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
retVal = Image::validate(&context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), surfaceFormat, &imageDesc, nullptr);
|
||||
}
|
||||
|
||||
Image *createImageWithFlags(cl_mem_flags flags) {
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
return Image::create(&context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
flags, 0, surfaceFormat, &imageDesc, nullptr, retVal);
|
||||
}
|
||||
|
@ -396,7 +396,7 @@ HWTEST_F(Nv12ImageTest, checkIfPlanesAreWritten) {
|
|||
|
||||
// Create Parent NV12 image
|
||||
cl_mem_flags flags = CL_MEM_READ_ONLY | CL_MEM_ACCESS_FLAGS_UNRESTRICTED_INTEL | CL_MEM_USE_HOST_PTR;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
auto imageNV12 = Image::create(contextWithMockCmdQ, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
flags, 0, surfaceFormat, &imageDesc, hostPtr, retVal);
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ class PackedYuvImageTest : public testing::Test,
|
|||
retVal = Image::validateImageFormat(&imageFormat);
|
||||
if (retVal != CL_SUCCESS)
|
||||
return;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
retVal = Image::validate(&context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0), surfaceFormat, &imageDesc, nullptr);
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ cl_channel_order packedYuvChannels[] = {CL_YUYV_INTEL, CL_UYVY_INTEL, CL_YVYU_IN
|
|||
TEST_P(PackedYuvImageTest, isPackedYuvImageReturnsTrue) {
|
||||
|
||||
flags = CL_MEM_READ_ONLY;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
auto image = Image::create(
|
||||
&context,
|
||||
MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
|
|
|
@ -706,7 +706,7 @@ TEST(OsAgnosticMemoryManager, givenHostPointerNotRequiringCopyWhenAllocateGraphi
|
|||
imageFormat.image_channel_order = CL_RGBA;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_READ_WRITE | CL_MEM_USE_HOST_PTR;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, defaultHwInfo->capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, defaultHwInfo->capabilityTable.supportsOcl21Features);
|
||||
|
||||
auto imgInfo = MockGmm::initImgInfo(imgDesc, 0, surfaceFormat);
|
||||
imgInfo.rowPitch = imgDesc.image_width * 4;
|
||||
|
@ -746,7 +746,7 @@ TEST(OsAgnosticMemoryManager, givenHostPointerRequiringCopyWhenAllocateGraphicsM
|
|||
imageFormat.image_channel_order = CL_RGBA;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_READ_WRITE | CL_MEM_USE_HOST_PTR;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, defaultHwInfo->capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, defaultHwInfo->capabilityTable.supportsOcl21Features);
|
||||
|
||||
auto imgInfo = MockGmm::initImgInfo(imgDesc, 0, surfaceFormat);
|
||||
imgInfo.rowPitch = imgDesc.image_width * 4;
|
||||
|
@ -1858,7 +1858,7 @@ TEST(MemoryManagerTest, givenAllowedTilingWhenIsCopyRequiredIsCalledThenTrueIsRe
|
|||
imageFormat.image_channel_order = CL_R;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_READ_WRITE | CL_MEM_USE_HOST_PTR;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, defaultHwInfo->capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, defaultHwInfo->capabilityTable.supportsOcl21Features);
|
||||
|
||||
imgInfo.imgDesc = Image::convertDescriptor(imageDesc);
|
||||
imgInfo.surfaceFormat = &surfaceFormat->surfaceFormat;
|
||||
|
@ -1884,7 +1884,7 @@ TEST(MemoryManagerTest, givenDifferentRowPitchWhenIsCopyRequiredIsCalledThenTrue
|
|||
imageFormat.image_channel_order = CL_R;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_READ_WRITE | CL_MEM_USE_HOST_PTR;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, defaultHwInfo->capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, defaultHwInfo->capabilityTable.supportsOcl21Features);
|
||||
|
||||
imgInfo.imgDesc = Image::convertDescriptor(imageDesc);
|
||||
imgInfo.surfaceFormat = &surfaceFormat->surfaceFormat;
|
||||
|
@ -1905,7 +1905,7 @@ TEST(MemoryManagerTest, givenDifferentSlicePitchAndTilingNotAllowedWhenIsCopyReq
|
|||
imageFormat.image_channel_order = CL_R;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_READ_WRITE | CL_MEM_USE_HOST_PTR;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, defaultHwInfo->capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, defaultHwInfo->capabilityTable.supportsOcl21Features);
|
||||
|
||||
cl_image_desc imageDesc{};
|
||||
imageDesc.image_type = CL_MEM_OBJECT_IMAGE1D;
|
||||
|
@ -1931,7 +1931,7 @@ TEST(MemoryManagerTest, givenNotCachelinAlignedPointerWhenIsCopyRequiredIsCalled
|
|||
imageFormat.image_channel_order = CL_R;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_READ_WRITE | CL_MEM_USE_HOST_PTR;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, defaultHwInfo->capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, defaultHwInfo->capabilityTable.supportsOcl21Features);
|
||||
|
||||
cl_image_desc imageDesc{};
|
||||
imageDesc.image_type = CL_MEM_OBJECT_IMAGE1D;
|
||||
|
@ -1956,7 +1956,7 @@ TEST(MemoryManagerTest, givenCachelineAlignedPointerAndProperDescriptorValuesWhe
|
|||
imageFormat.image_channel_order = CL_R;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_READ_WRITE | CL_MEM_USE_HOST_PTR;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, defaultHwInfo->capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, defaultHwInfo->capabilityTable.supportsOcl21Features);
|
||||
|
||||
cl_image_desc imageDesc{};
|
||||
imageDesc.image_type = CL_MEM_OBJECT_IMAGE1D;
|
||||
|
@ -1988,7 +1988,7 @@ TEST(MemoryManagerTest, givenForcedLinearImages3DImageAndProperDescriptorValuesW
|
|||
imageFormat.image_channel_order = CL_R;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_READ_WRITE | CL_MEM_USE_HOST_PTR;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, defaultHwInfo->capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, defaultHwInfo->capabilityTable.supportsOcl21Features);
|
||||
|
||||
cl_image_desc imageDesc{};
|
||||
imageDesc.image_type = CL_MEM_OBJECT_IMAGE3D;
|
||||
|
|
|
@ -709,7 +709,7 @@ TEST(UnfiedSharedMemoryTransferCalls, givenHostUsmAllocationWhenPtrIsUsedForTran
|
|||
MockContext mockContext;
|
||||
cl_context clContext = &mockContext;
|
||||
|
||||
if (mockContext.getDevice(0u)->getHardwareInfo().capabilityTable.clVersionSupport < 20) {
|
||||
if (mockContext.getDevice(0u)->getHardwareInfo().capabilityTable.supportsOcl21Features == false) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
|
||||
|
|
|
@ -1332,7 +1332,7 @@ HWTEST_F(DrmMemoryManagerTest, givenDrmMemoryManagerWhenTiledImageWithMipCountZe
|
|||
auto retVal = CL_SUCCESS;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_WRITE_ONLY;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
std::unique_ptr<Image> dstImage(Image::create(&context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
flags, 0, surfaceFormat, &imageDesc, nullptr, retVal));
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
|
@ -1379,7 +1379,7 @@ HWTEST_F(DrmMemoryManagerTest, givenDrmMemoryManagerWhenTiledImageWithMipCountNo
|
|||
auto retVal = CL_SUCCESS;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_WRITE_ONLY;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
std::unique_ptr<Image> dstImage(Image::create(&context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
flags, 0, surfaceFormat, &imageDesc, nullptr, retVal));
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
|
@ -1419,7 +1419,7 @@ TEST_F(DrmMemoryManagerTest, givenDrmMemoryManagerWhenTiledImageIsBeingCreatedAn
|
|||
|
||||
InjectedFunction method = [&](size_t failureIndex) {
|
||||
cl_mem_flags flags = CL_MEM_WRITE_ONLY;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
std::unique_ptr<Image> dstImage(Image::create(&context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
flags, 0, surfaceFormat, &imageDesc, nullptr, retVal));
|
||||
if (MemoryManagement::nonfailingAllocation == failureIndex) {
|
||||
|
@ -1480,7 +1480,7 @@ HWTEST_F(DrmMemoryManagerTest, givenDrmMemoryManagerWhenTiledImageIsBeingCreated
|
|||
auto retVal = CL_SUCCESS;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_WRITE_ONLY | CL_MEM_USE_HOST_PTR;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
std::unique_ptr<Image> dstImage(Image::create(&context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
flags, 0, surfaceFormat, &imageDesc, data, retVal));
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
|
@ -1525,7 +1525,7 @@ TEST_F(DrmMemoryManagerTest, givenDrmMemoryManagerWhenMemoryAllocatedForImageThe
|
|||
auto retVal = CL_SUCCESS;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_WRITE_ONLY | CL_MEM_USE_HOST_PTR;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
std::unique_ptr<Image> dstImage(Image::create(&context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
flags, 0, surfaceFormat, &imageDesc, data, retVal));
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
|
@ -1557,7 +1557,7 @@ TEST_F(DrmMemoryManagerTest, givenDrmMemoryManagerWhenNonTiledImgWithMipCountZer
|
|||
auto retVal = CL_SUCCESS;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_WRITE_ONLY | CL_MEM_USE_HOST_PTR;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
std::unique_ptr<Image> dstImage(Image::create(&context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
flags, 0, surfaceFormat, &imageDesc, data, retVal));
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
|
@ -1601,7 +1601,7 @@ TEST_F(DrmMemoryManagerTest, givenDrmMemoryManagerWhenNonTiledImgWithMipCountNon
|
|||
auto retVal = CL_SUCCESS;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_WRITE_ONLY;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
std::unique_ptr<Image> dstImage(Image::create(&context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
flags, 0, surfaceFormat, &imageDesc, data, retVal));
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
|
@ -1645,7 +1645,7 @@ TEST_F(DrmMemoryManagerTest, givenDrmMemoryManagerWhen1DarrayImageIsBeingCreated
|
|||
auto retVal = CL_SUCCESS;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_WRITE_ONLY | CL_MEM_USE_HOST_PTR;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
std::unique_ptr<Image> dstImage(Image::create(&context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
flags, 0, surfaceFormat, &imageDesc, data, retVal));
|
||||
auto imageGraphicsAllocation = dstImage->getGraphicsAllocation();
|
||||
|
@ -1679,7 +1679,7 @@ TEST_F(DrmMemoryManagerTest, givenHostPointerNotRequiringCopyWhenAllocateGraphic
|
|||
|
||||
cl_mem_flags flags = CL_MEM_READ_WRITE | CL_MEM_USE_HOST_PTR;
|
||||
MockContext context(device);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
|
||||
auto imgInfo = MockGmm::initImgInfo(imgDesc, 0, surfaceFormat);
|
||||
imgInfo.rowPitch = imgDesc.image_width * surfaceFormat->surfaceFormat.ImageElementSizeInBytes;
|
||||
|
@ -1788,7 +1788,7 @@ TEST_F(DrmMemoryManagerTest, givenOsHandleWithNonTiledObjectWhenCreateFromShared
|
|||
|
||||
imgInfo.imgDesc = Image::convertDescriptor(imgDesc);
|
||||
MockContext context(device);
|
||||
gmmSurfaceFormat = Image::getSurfaceFormatFromTable(flags, &gmmImgFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
gmmSurfaceFormat = Image::getSurfaceFormatFromTable(flags, &gmmImgFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
imgInfo.surfaceFormat = &gmmSurfaceFormat->surfaceFormat;
|
||||
imgInfo.plane = GMM_PLANE_Y;
|
||||
|
||||
|
@ -1830,7 +1830,7 @@ TEST_F(DrmMemoryManagerTest, givenOsHandleWithTileYObjectWhenCreateFromSharedHan
|
|||
|
||||
imgInfo.imgDesc = Image::convertDescriptor(imgDesc);
|
||||
MockContext context(device);
|
||||
gmmSurfaceFormat = Image::getSurfaceFormatFromTable(flags, &gmmImgFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
gmmSurfaceFormat = Image::getSurfaceFormatFromTable(flags, &gmmImgFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
imgInfo.surfaceFormat = &gmmSurfaceFormat->surfaceFormat;
|
||||
imgInfo.plane = GMM_PLANE_Y;
|
||||
|
||||
|
@ -1872,7 +1872,7 @@ TEST_F(DrmMemoryManagerTest, givenDrmMemoryManagerWhenCreateFromSharedHandleFail
|
|||
|
||||
imgInfo.imgDesc = Image::convertDescriptor(imgDesc);
|
||||
MockContext context(device);
|
||||
gmmSurfaceFormat = Image::getSurfaceFormatFromTable(flags, &gmmImgFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
gmmSurfaceFormat = Image::getSurfaceFormatFromTable(flags, &gmmImgFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
imgInfo.surfaceFormat = &gmmSurfaceFormat->surfaceFormat;
|
||||
imgInfo.plane = GMM_PLANE_Y;
|
||||
|
||||
|
|
|
@ -642,7 +642,7 @@ HWTEST_F(WddmMemoryManagerTest, givenWddmMemoryManagerWhenTiledImageWithMipCount
|
|||
auto retVal = CL_SUCCESS;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_WRITE_ONLY;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
std::unique_ptr<Image> dstImage(Image::create(&context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
flags, 0, surfaceFormat, &imageDesc, nullptr, retVal));
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
|
@ -671,7 +671,7 @@ TEST_F(WddmMemoryManagerTest, givenWddmMemoryManagerWhenTiledImageWithMipCountNo
|
|||
auto retVal = CL_SUCCESS;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_WRITE_ONLY;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
std::unique_ptr<Image> dstImage(Image::create(&context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
flags, 0, surfaceFormat, &imageDesc, nullptr, retVal));
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
|
@ -707,7 +707,7 @@ HWTEST_F(WddmMemoryManagerTest, givenWddmMemoryManagerWhenTiledImageIsBeingCreat
|
|||
auto retVal = CL_SUCCESS;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_WRITE_ONLY | CL_MEM_USE_HOST_PTR;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
std::unique_ptr<Image> dstImage(Image::create(&context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
flags, 0, surfaceFormat, &imageDesc, data, retVal));
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
|
@ -736,7 +736,7 @@ TEST_F(WddmMemoryManagerTest, givenWddmMemoryManagerWhenNonTiledImgWithMipCountZ
|
|||
auto retVal = CL_SUCCESS;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_WRITE_ONLY | CL_MEM_USE_HOST_PTR;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
std::unique_ptr<Image> dstImage(Image::create(&context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
flags, 0, surfaceFormat, &imageDesc, data, retVal));
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
|
@ -764,7 +764,7 @@ TEST_F(WddmMemoryManagerTest, givenWddmMemoryManagerWhenNonTiledImgWithMipCountN
|
|||
auto retVal = CL_SUCCESS;
|
||||
|
||||
cl_mem_flags flags = CL_MEM_WRITE_ONLY;
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.clVersionSupport);
|
||||
auto surfaceFormat = Image::getSurfaceFormatFromTable(flags, &imageFormat, context.getDevice(0)->getHardwareInfo().capabilityTable.supportsOcl21Features);
|
||||
std::unique_ptr<Image> dstImage(Image::create(&context, MemoryPropertiesParser::createMemoryProperties(flags, 0, 0),
|
||||
flags, 0, surfaceFormat, &imageDesc, nullptr, retVal));
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
|
|
|
@ -242,7 +242,7 @@ TEST_F(PlatformTest, givenSupportingCl21WhenPlatformSupportsFp64ThenFillMatching
|
|||
std::string compilerExtensions = convertEnabledExtensionsToCompilerInternalOptions(extensionsList.c_str());
|
||||
EXPECT_THAT(compilerExtensions, ::testing::HasSubstr(std::string(" -cl-ext=-all,+cl")));
|
||||
|
||||
if (hwInfo->capabilityTable.clVersionSupport > 20) {
|
||||
if (hwInfo->capabilityTable.supportsOcl21Features) {
|
||||
EXPECT_THAT(compilerExtensions, ::testing::HasSubstr(std::string("cl_khr_subgroups")));
|
||||
EXPECT_THAT(compilerExtensions, ::testing::HasSubstr(std::string("cl_khr_il_program")));
|
||||
if (hwInfo->capabilityTable.supportsVme) {
|
||||
|
@ -274,6 +274,7 @@ TEST_F(PlatformTest, givenNotSupportingCl21WhenPlatformNotSupportFp64ThenNotFill
|
|||
HardwareInfo TesthwInfo = *defaultHwInfo;
|
||||
TesthwInfo.capabilityTable.ftrSupportsFP64 = false;
|
||||
TesthwInfo.capabilityTable.clVersionSupport = 10;
|
||||
TesthwInfo.capabilityTable.supportsOcl21Features = false;
|
||||
|
||||
std::string extensionsList = getExtensionsList(TesthwInfo);
|
||||
if (TesthwInfo.capabilityTable.supportsImages) {
|
||||
|
@ -308,6 +309,7 @@ TEST_F(PlatformTest, givenSupporteImagesAndClVersion21WhenCreateExtentionsListTh
|
|||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
hwInfo.capabilityTable.supportsImages = true;
|
||||
hwInfo.capabilityTable.clVersionSupport = 21;
|
||||
hwInfo.capabilityTable.supportsOcl21Features = true;
|
||||
std::string extensionsList = getExtensionsList(hwInfo);
|
||||
std::string compilerExtensions = convertEnabledExtensionsToCompilerInternalOptions(extensionsList.c_str());
|
||||
|
||||
|
|
|
@ -209,7 +209,7 @@ TEST_F(GlSharingTextureTests, givenDifferentHwFormatWhenSurfaceFormatInfoIsSetTh
|
|||
cl_int retVal = CL_INVALID_VALUE;
|
||||
cl_image_format imageFormat = {};
|
||||
GlTexture::setClImageFormat(GL_DEPTH32F_STENCIL8, imageFormat);
|
||||
auto format = Image::getSurfaceFormatFromTable(CL_MEM_READ_ONLY, &imageFormat, defaultHwInfo->capabilityTable.clVersionSupport);
|
||||
auto format = Image::getSurfaceFormatFromTable(CL_MEM_READ_ONLY, &imageFormat, defaultHwInfo->capabilityTable.supportsOcl21Features);
|
||||
ASSERT_NE(format, nullptr);
|
||||
auto newHwFormat = 217u;
|
||||
|
||||
|
|
|
@ -55,6 +55,7 @@ struct RuntimeCapabilityTable {
|
|||
bool supportsImages;
|
||||
bool supportsDeviceEnqueue;
|
||||
bool supportsPipes;
|
||||
bool supportsOcl21Features;
|
||||
bool hostPtrTrackingEnabled;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue