mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 23:56:39 +08:00
Unify mapAllocation and hostPtrAllocation to transferAllocation
Change-Id: I875d6886ce3b0866da7679925ba973d2d16a1141 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
224740207f
commit
6059e77fb4
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user