Unmap calls are non blocking.

Resolves: NEO-4324
Change-Id: I675840a3534bb557fcd853503a9201ca7f4339aa
Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
Michal Mrozek
2020-03-10 08:13:30 +01:00
parent a685834b25
commit 050d164e0f
2 changed files with 3 additions and 3 deletions

View File

@ -328,7 +328,7 @@ cl_int CommandQueue::enqueueWriteMemObjForUnmap(MemObj *memObj, void *mappedPtr,
if (memObj->peekClMemObjType() == CL_MEM_OBJECT_BUFFER) {
auto buffer = castToObject<Buffer>(memObj);
retVal = enqueueWriteBuffer(buffer, CL_TRUE, unmapInfo.offset[0], unmapInfo.size[0], mappedPtr, memObj->getMapAllocation(),
retVal = enqueueWriteBuffer(buffer, CL_FALSE, unmapInfo.offset[0], unmapInfo.size[0], mappedPtr, memObj->getMapAllocation(),
eventsRequest.numEventsInWaitList, eventsRequest.eventWaitList, eventsRequest.outEvent);
} else {
auto image = castToObjectOrAbort<Image>(memObj);

View File

@ -2426,7 +2426,7 @@ struct BufferUnmapTest : public DeviceFixture, public ::testing::Test {
}
};
HWTEST_F(BufferUnmapTest, givenBufferWithSharingHandlerWhenUnmappingThenUseEnqueueWriteBuffer) {
HWTEST_F(BufferUnmapTest, givenBufferWithSharingHandlerWhenUnmappingThenUseNonBlockingEnqueueWriteBuffer) {
MockContext context(pClDevice);
MockCommandQueueHw<FamilyType> cmdQ(&context, pClDevice, nullptr);
@ -2445,7 +2445,7 @@ HWTEST_F(BufferUnmapTest, givenBufferWithSharingHandlerWhenUnmappingThenUseEnque
EXPECT_EQ(CL_SUCCESS, retVal);
EXPECT_EQ(1u, cmdQ.EnqueueWriteBufferCounter);
EXPECT_TRUE(cmdQ.blockingWriteBuffer);
EXPECT_FALSE(cmdQ.blockingWriteBuffer);
}
HWTEST_F(BufferUnmapTest, givenBufferWithoutSharingHandlerWhenUnmappingThenDontUseEnqueueWriteBuffer) {