Unify mapAllocation and hostPtrAllocation to transferAllocation

Change-Id: I875d6886ce3b0866da7679925ba973d2d16a1141
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2019-10-24 14:18:39 +02:00
committed by sys_ocldev
parent 224740207f
commit 6059e77fb4
6 changed files with 10 additions and 16 deletions

View File

@@ -766,7 +766,7 @@ HWTEST_F(BcsTests, givenMapAllocationInBuiltinOpParamsWhenConstructingThenUseItA
builtinOpParams.dstMemObj = buffer.get();
builtinOpParams.srcPtr = mapPtr;
builtinOpParams.size.x = 1;
builtinOpParams.mapAllocation = mapAllocation;
builtinOpParams.transferAllocation = mapAllocation;
auto blitProperties = BlitProperties::constructPropertiesForReadWriteBuffer(BlitterConstants::BlitDirection::HostPtrToBuffer,
csr, builtinOpParams, true);
@@ -778,7 +778,7 @@ HWTEST_F(BcsTests, givenMapAllocationInBuiltinOpParamsWhenConstructingThenUseItA
builtinOpParams.srcMemObj = buffer.get();
builtinOpParams.dstPtr = mapPtr;
builtinOpParams.size.x = 1;
builtinOpParams.mapAllocation = mapAllocation;
builtinOpParams.transferAllocation = mapAllocation;
auto blitProperties = BlitProperties::constructPropertiesForReadWriteBuffer(BlitterConstants::BlitDirection::BufferToHostPtr,
csr, builtinOpParams, true);

View File

@@ -887,15 +887,15 @@ HWTEST_TEMPLATED_F(BcsBufferTests, givenMapAllocationWhenEnqueueingReadOrWriteBu
auto mapAllocation = bufferForBlt->getMapAllocation();
EXPECT_NE(nullptr, mapAllocation);
mockCmdQ->kernelParams.mapAllocation = nullptr;
mockCmdQ->kernelParams.transferAllocation = nullptr;
auto mapPtr = clEnqueueMapBuffer(mockCmdQ, bufferForBlt.get(), true, 0, 0, 1, 0, nullptr, nullptr, &retVal);
EXPECT_EQ(CL_SUCCESS, retVal);
EXPECT_EQ(mapAllocation, mockCmdQ->kernelParams.mapAllocation);
EXPECT_EQ(mapAllocation, mockCmdQ->kernelParams.transferAllocation);
mockCmdQ->kernelParams.mapAllocation = nullptr;
mockCmdQ->kernelParams.transferAllocation = nullptr;
retVal = clEnqueueUnmapMemObject(mockCmdQ, bufferForBlt.get(), mapPtr, 0, nullptr, nullptr);
EXPECT_EQ(CL_SUCCESS, retVal);
EXPECT_EQ(mapAllocation, mockCmdQ->kernelParams.mapAllocation);
EXPECT_EQ(mapAllocation, mockCmdQ->kernelParams.transferAllocation);
}
HWTEST_TEMPLATED_F(BcsBufferTests, givenWriteBufferEnqueueWhenProgrammingCommandStreamThenAddSemaphoreWait) {