mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
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:
@ -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);
|
||||
|
@ -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) {
|
||||
|
Reference in New Issue
Block a user