mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
Add implementation of new OpenCL 3.0 API functions
Additionally unify implementation of API functions related to creating buffers and images. Related-To: NEO-4368 Change-Id: Icfafc32f15e667e249fb318072194b6f76bd6481 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
37a6a900a8
commit
0a6da52bd4
@@ -1989,7 +1989,7 @@ TEST_P(NoHostPtr, ValidFlags) {
|
||||
}
|
||||
|
||||
TEST_P(NoHostPtr, GivenNoHostPtrWhenHwBufferCreationFailsThenReturnNullptr) {
|
||||
BufferFuncs BufferFuncsBackup[IGFX_MAX_CORE];
|
||||
BufferFactoryFuncs BufferFuncsBackup[IGFX_MAX_CORE];
|
||||
|
||||
for (uint32_t i = 0; i < IGFX_MAX_CORE; i++) {
|
||||
BufferFuncsBackup[i] = bufferFactory[i];
|
||||
|
||||
@@ -669,10 +669,10 @@ TEST(validateAndCreateImage, givenInvalidImageFormatWhenValidateAndCreateImageIs
|
||||
MockContext context;
|
||||
cl_image_format imageFormat;
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
Image *image;
|
||||
cl_mem image;
|
||||
imageFormat.image_channel_order = 0;
|
||||
imageFormat.image_channel_data_type = 0;
|
||||
image = Image::validateAndCreateImage(&context, {}, 0, 0, &imageFormat, &Image1dDefaults::imageDesc, nullptr, retVal);
|
||||
image = Image::validateAndCreateImage(&context, nullptr, 0, 0, &imageFormat, &Image1dDefaults::imageDesc, nullptr, retVal);
|
||||
EXPECT_EQ(nullptr, image);
|
||||
EXPECT_EQ(CL_INVALID_IMAGE_FORMAT_DESCRIPTOR, retVal);
|
||||
}
|
||||
@@ -681,9 +681,9 @@ TEST(validateAndCreateImage, givenNotSupportedImageFormatWhenValidateAndCreateIm
|
||||
MockContext context;
|
||||
cl_image_format imageFormat = {CL_INTENSITY, CL_UNORM_INT8};
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
Image *image;
|
||||
cl_mem image;
|
||||
cl_mem_flags flags = CL_MEM_READ_WRITE;
|
||||
image = Image::validateAndCreateImage(&context, MemoryPropertiesHelper::createMemoryProperties(flags, 0, 0), flags, 0, &imageFormat, &Image1dDefaults::imageDesc, nullptr, retVal);
|
||||
image = Image::validateAndCreateImage(&context, nullptr, flags, 0, &imageFormat, &Image1dDefaults::imageDesc, nullptr, retVal);
|
||||
EXPECT_EQ(nullptr, image);
|
||||
EXPECT_EQ(CL_IMAGE_FORMAT_NOT_SUPPORTED, retVal);
|
||||
}
|
||||
@@ -709,15 +709,15 @@ TEST(validateAndCreateImage, givenValidImageParamsWhenValidateAndCreateImageIsCa
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
|
||||
std::unique_ptr<Image> image = nullptr;
|
||||
image.reset(Image::validateAndCreateImage(
|
||||
image.reset(static_cast<Image *>(Image::validateAndCreateImage(
|
||||
&context,
|
||||
MemoryPropertiesHelper::createMemoryProperties(flags, 0, 0),
|
||||
nullptr,
|
||||
flags,
|
||||
0,
|
||||
&imageFormat,
|
||||
&imageDesc,
|
||||
nullptr,
|
||||
retVal));
|
||||
retVal)));
|
||||
EXPECT_NE(nullptr, image);
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user