mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Map/unmap enqueue fixes [2/n]: CPU operations on limited range
- Curently each non-zerocopy CPU operation on map/unmap make a full copy using hostPtr - This commit adds functionality to select specific range of copy - Multiple mapping with different size is not supported yet, so copy will be made on full range for now. This is for future usage. Change-Id: I7652e85482ba6fffb2474169447baf9b080dcd1e
This commit is contained in:
committed by
sys_ocldev
parent
ff44e9922d
commit
4f2a05ac88
@@ -165,6 +165,30 @@ TEST_F(clCreateImageTest, NotNullHostPtrAndRowPitchIsNotMultipleOfElementSizeRet
|
||||
EXPECT_EQ(CL_INVALID_MEM_OBJECT, retVal);
|
||||
}
|
||||
|
||||
TEST_F(clCreateImageTest, givenNullHostPtrWhenCopyHostPtrFlagPassedThenReturnError) {
|
||||
auto image = clCreateImage(
|
||||
pContext,
|
||||
CL_MEM_READ_WRITE | CL_MEM_COPY_HOST_PTR,
|
||||
&imageFormat,
|
||||
&imageDesc,
|
||||
nullptr,
|
||||
&retVal);
|
||||
ASSERT_EQ(CL_INVALID_HOST_PTR, retVal);
|
||||
EXPECT_EQ(nullptr, image);
|
||||
}
|
||||
|
||||
TEST_F(clCreateImageTest, givenNullHostPtrWhenUseHostPtrFlagPassedThenReturnError) {
|
||||
auto image = clCreateImage(
|
||||
pContext,
|
||||
CL_MEM_READ_WRITE | CL_MEM_USE_HOST_PTR,
|
||||
&imageFormat,
|
||||
&imageDesc,
|
||||
nullptr,
|
||||
&retVal);
|
||||
ASSERT_EQ(CL_INVALID_HOST_PTR, retVal);
|
||||
EXPECT_EQ(nullptr, image);
|
||||
}
|
||||
|
||||
TEST_F(clCreateImageTest, NullHostPtrAndRowPitchIsNotZeroReturnsError) {
|
||||
imageDesc.image_row_pitch = 4;
|
||||
auto image = clCreateImage(
|
||||
|
||||
Reference in New Issue
Block a user