Remove dcFlush parameter from finish call
Change-Id: Ifc808822399a100745a9d81bb5f6e45903a895fa Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
parent
c0c6a46ece
commit
0337b58ee4
|
@ -2045,7 +2045,7 @@ cl_int CL_API_CALL clFinish(cl_command_queue commandQueue) {
|
|||
auto pCommandQueue = castToObject<CommandQueue>(commandQueue);
|
||||
|
||||
retVal = pCommandQueue
|
||||
? pCommandQueue->finish(false)
|
||||
? pCommandQueue->finish()
|
||||
: CL_INVALID_COMMAND_QUEUE;
|
||||
TRACING_EXIT(clFinish, &retVal);
|
||||
return retVal;
|
||||
|
|
|
@ -347,7 +347,7 @@ cl_int CommandQueue::enqueueWriteMemObjForUnmap(MemObj *memObj, void *mappedPtr,
|
|||
mustCallFinish = (CommandQueue::getTaskLevelFromWaitList(this->taskLevel, eventsRequest.numEventsInWaitList, eventsRequest.eventWaitList) != Event::eventNotReady);
|
||||
}
|
||||
if (mustCallFinish) {
|
||||
finish(true);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -308,7 +308,7 @@ class CommandQueue : public BaseObject<_cl_command_queue> {
|
|||
return CL_SUCCESS;
|
||||
}
|
||||
|
||||
virtual cl_int finish(bool dcFlush) { return CL_SUCCESS; }
|
||||
virtual cl_int finish() { return CL_SUCCESS; }
|
||||
|
||||
virtual cl_int flush() { return CL_SUCCESS; }
|
||||
|
||||
|
|
|
@ -286,7 +286,7 @@ class CommandQueueHw : public CommandQueue {
|
|||
const cl_event *eventWaitList,
|
||||
cl_event *event) override;
|
||||
|
||||
cl_int finish(bool dcFlush) override;
|
||||
cl_int finish() override;
|
||||
cl_int flush() override;
|
||||
|
||||
template <uint32_t enqueueType>
|
||||
|
|
|
@ -92,7 +92,7 @@ void *CommandQueue::cpuDataTransferHandler(TransferProperties &transferPropertie
|
|||
//wait for the completness of previous commands
|
||||
if (transferProperties.cmdType != CL_COMMAND_UNMAP_MEM_OBJECT) {
|
||||
if (!transferProperties.memObj->isMemObjZeroCopy() || transferProperties.blocking) {
|
||||
finish(true);
|
||||
finish();
|
||||
eventCompleted = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
namespace NEO {
|
||||
|
||||
template <typename GfxFamily>
|
||||
cl_int CommandQueueHw<GfxFamily>::finish(bool dcFlush) {
|
||||
cl_int CommandQueueHw<GfxFamily>::finish() {
|
||||
getGpgpuCommandStreamReceiver().flushBatchedSubmissions();
|
||||
|
||||
//as long as queue is blocked we need to stall.
|
||||
|
|
|
@ -20,7 +20,7 @@ void PageFaultManager::transferToGpu(void *ptr, void *cmdQ) {
|
|||
auto commandQueue = static_cast<CommandQueue *>(cmdQ);
|
||||
auto retVal = commandQueue->enqueueSVMUnmap(ptr, 0, nullptr, nullptr, false);
|
||||
UNRECOVERABLE_IF(retVal);
|
||||
retVal = commandQueue->finish(false);
|
||||
retVal = commandQueue->finish();
|
||||
UNRECOVERABLE_IF(retVal);
|
||||
}
|
||||
} // namespace NEO
|
||||
|
|
|
@ -170,7 +170,7 @@ cl_int CL_API_CALL clEnqueueReleaseDX9ObjectsINTEL(cl_command_queue commandQueue
|
|||
for (unsigned int object = 0; object < numObjects; object++) {
|
||||
auto memObject = castToObject<MemObj>(memObjects[object]);
|
||||
if (!static_cast<D3DSharing<D3DTypesHelper::D3D9> *>(memObject->peekSharingHandler())->isSharedResource()) {
|
||||
cmdQ->finish(true);
|
||||
cmdQ->finish();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ cl_int CL_API_CALL clEnqueueReleaseDX9ObjectsINTEL(cl_command_queue commandQueue
|
|||
retVal = cmdQ->enqueueReleaseSharedObjects(numObjects, memObjects, numEventsInWaitList,
|
||||
eventWaitList, event, CL_COMMAND_RELEASE_DX9_OBJECTS_INTEL);
|
||||
if (!cmdQ->getContext().getInteropUserSyncEnabled()) {
|
||||
cmdQ->finish(true);
|
||||
cmdQ->finish();
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
@ -264,7 +264,7 @@ cl_int CL_API_CALL clEnqueueReleaseDX9MediaSurfacesKHR(cl_command_queue commandQ
|
|||
auto memObject = castToObject<MemObj>(memObjects[object]);
|
||||
if (memObject) {
|
||||
if (!static_cast<D3DSharing<D3DTypesHelper::D3D9> *>(memObject->peekSharingHandler())->isSharedResource()) {
|
||||
cmdQ->finish(true);
|
||||
cmdQ->finish();
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -277,7 +277,7 @@ cl_int CL_API_CALL clEnqueueReleaseDX9MediaSurfacesKHR(cl_command_queue commandQ
|
|||
retVal = cmdQ->enqueueReleaseSharedObjects(numObjects, memObjects, numEventsInWaitList,
|
||||
eventWaitList, event, CL_COMMAND_RELEASE_DX9_MEDIA_SURFACES_KHR);
|
||||
if (!cmdQ->getContext().getInteropUserSyncEnabled()) {
|
||||
cmdQ->finish(true);
|
||||
cmdQ->finish();
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
@ -477,7 +477,7 @@ cl_int CL_API_CALL clEnqueueReleaseD3D10ObjectsKHR(cl_command_queue commandQueue
|
|||
return retVal;
|
||||
}
|
||||
if (!static_cast<D3DSharing<D3DTypesHelper::D3D10> *>(memObject->peekSharingHandler())->isSharedResource()) {
|
||||
cmdQ->finish(true);
|
||||
cmdQ->finish();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -485,7 +485,7 @@ cl_int CL_API_CALL clEnqueueReleaseD3D10ObjectsKHR(cl_command_queue commandQueue
|
|||
retVal = cmdQ->enqueueReleaseSharedObjects(numObjects, memObjects, numEventsInWaitList,
|
||||
eventWaitList, event, CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR);
|
||||
if (!cmdQ->getContext().getInteropUserSyncEnabled()) {
|
||||
cmdQ->finish(true);
|
||||
cmdQ->finish();
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
@ -682,7 +682,7 @@ cl_int CL_API_CALL clEnqueueReleaseD3D11ObjectsKHR(cl_command_queue commandQueue
|
|||
return retVal;
|
||||
}
|
||||
if (!static_cast<D3DSharing<D3DTypesHelper::D3D11> *>(memObject->peekSharingHandler())->isSharedResource()) {
|
||||
cmdQ->finish(true);
|
||||
cmdQ->finish();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -690,7 +690,7 @@ cl_int CL_API_CALL clEnqueueReleaseD3D11ObjectsKHR(cl_command_queue commandQueue
|
|||
retVal = cmdQ->enqueueReleaseSharedObjects(numObjects, memObjects, numEventsInWaitList,
|
||||
eventWaitList, event, CL_COMMAND_RELEASE_D3D11_OBJECTS_KHR);
|
||||
if (!cmdQ->getContext().getInteropUserSyncEnabled()) {
|
||||
cmdQ->finish(true);
|
||||
cmdQ->finish();
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
|
|
@ -273,7 +273,7 @@ cl_int CL_API_CALL clEnqueueReleaseGLObjects(cl_command_queue commandQueue, cl_u
|
|||
return retVal;
|
||||
}
|
||||
|
||||
pCommandQueue->finish(false);
|
||||
pCommandQueue->finish();
|
||||
retVal = pCommandQueue->enqueueReleaseSharedObjects(numObjects, memObjects, numEventsInWaitList, eventWaitList, event,
|
||||
CL_COMMAND_RELEASE_GL_OBJECTS);
|
||||
}
|
||||
|
|
|
@ -181,7 +181,7 @@ struct AUBReadBufferRectUnaligned
|
|||
AUBCommandStreamFixture::expectMemory<FamilyType>(dstMemoryGPUPtr, referenceMemory, offset);
|
||||
AUBCommandStreamFixture::expectMemory<FamilyType>(ptrOffset(dstMemoryGPUPtr, offset), &srcMemory[rowPitch * bufferOrigin[1]], size);
|
||||
AUBCommandStreamFixture::expectMemory<FamilyType>(ptrOffset(dstMemoryGPUPtr, size + offset), referenceMemory, bufferSize - offset - size);
|
||||
pCmdQ->finish(true);
|
||||
pCmdQ->finish();
|
||||
alignedFree(dstMemory);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -212,7 +212,7 @@ HWTEST_P(AUBReadImage, simpleUnalignedMemory) {
|
|||
ptrOffset(dstMemoryUnaligned, testWidth * testHeight * elementSize);
|
||||
}
|
||||
|
||||
retVal = pCmdQ->finish(true); //FixMe - not all test cases verified with expects
|
||||
retVal = pCmdQ->finish(); //FixMe - not all test cases verified with expects
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
|
||||
alignedFree(dstMemoryAligned);
|
||||
|
|
|
@ -115,7 +115,7 @@ struct AUBImageUnaligned
|
|||
AUBCommandStreamFixture::expectMemory<FamilyType>(dstMemoryGPUPtr, referenceMemory, offset);
|
||||
AUBCommandStreamFixture::expectMemory<FamilyType>(ptrOffset(dstMemoryGPUPtr, offset), &imageMemory[inputRowPitch * origin[1] * pixelSize], size * pixelSize);
|
||||
AUBCommandStreamFixture::expectMemory<FamilyType>(ptrOffset(dstMemoryGPUPtr, size * pixelSize + offset), referenceMemory, bufferSize - offset - size * pixelSize);
|
||||
pCmdQ->finish(true);
|
||||
pCmdQ->finish();
|
||||
alignedFree(dstMemory);
|
||||
}
|
||||
|
||||
|
@ -201,7 +201,7 @@ struct AUBImageUnaligned
|
|||
nullptr);
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
|
||||
pCmdQ->finish(true);
|
||||
pCmdQ->finish();
|
||||
|
||||
auto imageRowPitch = image->getImageDesc().image_row_pitch;
|
||||
|
||||
|
|
|
@ -171,7 +171,7 @@ struct AUBWriteBufferRectUnaligned
|
|||
nullptr);
|
||||
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
pCmdQ->finish(true);
|
||||
pCmdQ->finish();
|
||||
|
||||
AUBCommandStreamFixture::expectMemory<FamilyType>(pDestMemory, referenceMemory, rowPitch);
|
||||
AUBCommandStreamFixture::expectMemory<FamilyType>(pDestMemory + rowPitch * bufferOrigin[1], ptrOffset(srcMemory, offset), size);
|
||||
|
|
|
@ -98,7 +98,7 @@ GEN11TEST_F(GEN11AUBParentKernelFixture, EnqueueParentKernel) {
|
|||
|
||||
pCmdQ->enqueueKernel(pKernel, 1, offset, gws, lws, 0, 0, 0);
|
||||
|
||||
pCmdQ->finish(false);
|
||||
pCmdQ->finish();
|
||||
|
||||
uint32_t expectedNumberOfEnqueues = 1;
|
||||
uint64_t gpuAddress = devQueue->getQueueBuffer()->getGpuAddress() + offsetof(IGIL_CommandQueue, m_controls.m_TotalNumberOfQueues);
|
||||
|
|
|
@ -98,7 +98,7 @@ GEN8TEST_F(GEN8AUBParentKernelFixture, EnqueueParentKernel) {
|
|||
|
||||
pCmdQ->enqueueKernel(pKernel, 1, offset, gws, lws, 0, 0, 0);
|
||||
|
||||
pCmdQ->finish(false);
|
||||
pCmdQ->finish();
|
||||
|
||||
uint32_t expectedNumberOfEnqueues = 1;
|
||||
uint64_t gpuAddress = devQueue->getQueueBuffer()->getGpuAddress() + offsetof(IGIL_CommandQueue, m_controls.m_TotalNumberOfQueues);
|
||||
|
|
|
@ -96,7 +96,7 @@ GEN9TEST_F(AUBParentKernelFixture, EnqueueParentKernel) {
|
|||
|
||||
pCmdQ->enqueueKernel(pKernel, 1, offset, gws, lws, 0, 0, 0);
|
||||
|
||||
pCmdQ->finish(false);
|
||||
pCmdQ->finish();
|
||||
|
||||
uint32_t expectedNumberOfEnqueues = 1;
|
||||
uint64_t gpuAddress = devQueue->getQueueBuffer()->getGpuAddress() + offsetof(IGIL_CommandQueue, m_controls.m_TotalNumberOfQueues);
|
||||
|
|
|
@ -283,7 +283,7 @@ HWTEST_F(CommandQueueHwTest, GivenNonEmptyQueueOnBlockingMapBufferWillWaitForPre
|
|||
: CommandQueueHw<FamilyType>(context, device, 0) {
|
||||
finishWasCalled = false;
|
||||
}
|
||||
cl_int finish(bool dcFlush) override {
|
||||
cl_int finish() override {
|
||||
finishWasCalled = true;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -790,7 +790,7 @@ HWTEST_F(WaitForQueueCompletionTests, givenBlockingCallAndBlockedQueueWhenEnqueu
|
|||
|
||||
HWTEST_F(WaitForQueueCompletionTests, whenFinishIsCalledThenCallWaitWithoutQuickKmdSleepRequest) {
|
||||
std::unique_ptr<MyCmdQueue<FamilyType>> cmdQ(new MyCmdQueue<FamilyType>(context.get(), device.get()));
|
||||
cmdQ->finish(false);
|
||||
cmdQ->finish();
|
||||
EXPECT_EQ(1u, cmdQ->waitUntilCompleteCounter);
|
||||
EXPECT_FALSE(cmdQ->requestedUseQuickKmdSleep);
|
||||
}
|
||||
|
|
|
@ -617,7 +617,7 @@ HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenFinishIsCalledThenBatchesS
|
|||
pCmdQ->enqueueKernel(mockKernel.mockKernel, 1, nullptr, gws, nullptr, 0, nullptr, nullptr);
|
||||
pCmdQ->enqueueKernel(mockKernel.mockKernel, 1, nullptr, gws, nullptr, 0, nullptr, nullptr);
|
||||
|
||||
pCmdQ->finish(false);
|
||||
pCmdQ->finish();
|
||||
|
||||
EXPECT_TRUE(mockedSubmissionsAggregator->peekCmdBufferList().peekIsEmpty());
|
||||
EXPECT_EQ(1, mockCsr->flushCalledCount);
|
||||
|
@ -637,7 +637,7 @@ HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenThressEnqueueKernelsAreCal
|
|||
pCmdQ->enqueueKernel(mockKernel.mockKernel, 1, nullptr, gws, nullptr, 0, nullptr, nullptr);
|
||||
pCmdQ->enqueueKernel(mockKernel.mockKernel, 1, nullptr, gws, nullptr, 0, nullptr, nullptr);
|
||||
|
||||
pCmdQ->finish(false);
|
||||
pCmdQ->finish();
|
||||
|
||||
EXPECT_TRUE(mockedSubmissionsAggregator->peekCmdBufferList().peekIsEmpty());
|
||||
EXPECT_EQ(1, mockCsr->flushCalledCount);
|
||||
|
|
|
@ -88,7 +88,7 @@ TEST_F(EventTests, eventWaitShouldntSendPC) {
|
|||
// no more tasks after WFE, no need to write PC
|
||||
EXPECT_EQ(pEvent->taskLevel + 1, csr.peekTaskLevel());
|
||||
|
||||
pCmdQ->finish(false);
|
||||
pCmdQ->finish();
|
||||
|
||||
// Check CL_EVENT_COMMAND_TYPE
|
||||
{
|
||||
|
@ -132,7 +132,7 @@ TEST_F(EventTests, waitForArray) {
|
|||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
EXPECT_EQ(pEvent1->taskLevel + 1, csr.peekTaskLevel());
|
||||
|
||||
pCmdQ->finish(false);
|
||||
pCmdQ->finish();
|
||||
EXPECT_EQ(pEvent1->taskLevel + 1, csr.peekTaskLevel());
|
||||
// Check CL_EVENT_COMMAND_TYPE
|
||||
{
|
||||
|
@ -172,7 +172,7 @@ TEST_F(EventTests, event_NDR_Wait_NDR_Finish) {
|
|||
ASSERT_EQ(CL_SUCCESS, retVal);
|
||||
EXPECT_EQ(pEvent->taskLevel + 2, csr.peekTaskLevel());
|
||||
|
||||
pCmdQ->finish(false);
|
||||
pCmdQ->finish();
|
||||
EXPECT_EQ(pEvent->taskLevel + 2, csr.peekTaskLevel());
|
||||
|
||||
// Check CL_EVENT_COMMAND_TYPE
|
||||
|
|
|
@ -59,7 +59,7 @@ HWTEST_F(EnqueueKernelTest, givenCsrInBatchingModeWhenFinishIsCalledThenBatchesS
|
|||
thread.join();
|
||||
}
|
||||
|
||||
pCmdQ->finish(false);
|
||||
pCmdQ->finish();
|
||||
|
||||
EXPECT_GE(mockCsr->flushCalledCount, 1);
|
||||
|
||||
|
|
|
@ -548,7 +548,7 @@ HWTEST_F(EnqueueReadWriteBufferRectDispatch, givenOffsetResultingInMisalignedPtr
|
|||
ASSERT_NE(0u, cmdQ->lastEnqueuedKernels.size());
|
||||
Kernel *kernel = cmdQ->lastEnqueuedKernels[0];
|
||||
|
||||
cmdQ->finish(true);
|
||||
cmdQ->finish();
|
||||
|
||||
parseCommands<FamilyType>(*cmdQ);
|
||||
|
||||
|
|
|
@ -423,6 +423,6 @@ HWTEST_F(EnqueueThreading, finish) {
|
|||
auto csr = (CommandStreamReceiverMock<FamilyType> *)&this->pCmdQ->getGpgpuCommandStreamReceiver();
|
||||
csr->expectedToFreeCount = 0u;
|
||||
|
||||
pCmdQ->finish(false);
|
||||
pCmdQ->finish();
|
||||
}
|
||||
} // namespace ULT
|
||||
|
|
|
@ -545,7 +545,7 @@ HWTEST_F(EnqueueReadWriteBufferRectDispatch, givenOffsetResultingInMisalignedPtr
|
|||
ASSERT_NE(0u, cmdQ->lastEnqueuedKernels.size());
|
||||
Kernel *kernel = cmdQ->lastEnqueuedKernels[0];
|
||||
|
||||
cmdQ->finish(true);
|
||||
cmdQ->finish();
|
||||
|
||||
parseCommands<FamilyType>(*cmdQ);
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ HWTEST_F(FinishTest, ShouldntAddPipeControl_If_CS_greater_than_CQ) {
|
|||
commandStreamReceiver.taskLevel = originalCSRLevel; // Must be greater than or equal to HW
|
||||
pCmdQ->taskLevel = originalCQLevel;
|
||||
|
||||
auto retVal = pCmdQ->finish(false);
|
||||
auto retVal = pCmdQ->finish();
|
||||
ASSERT_EQ(CL_SUCCESS, retVal);
|
||||
|
||||
// Don't need to artificially execute PIPE_CONTROL.
|
||||
|
@ -77,7 +77,7 @@ HWTEST_F(FinishTest, ShouldntAddPipeControl_If_CS_greater_than_CQ) {
|
|||
HWTEST_F(FinishTest, doesntAddAPipecontrolToCQCommandStream) {
|
||||
typedef typename FamilyType::PIPE_CONTROL PIPE_CONTROL;
|
||||
|
||||
auto retVal = pCmdQ->finish(false);
|
||||
auto retVal = pCmdQ->finish();
|
||||
ASSERT_EQ(CL_SUCCESS, retVal);
|
||||
|
||||
// Check for PIPE_CONTROL
|
||||
|
@ -89,7 +89,7 @@ HWTEST_F(FinishTest, givenFreshQueueWhenFinishIsCalledThenCommandStreamIsNotAllo
|
|||
MockContext contextWithMockCmdQ(pDevice, true);
|
||||
MockCommandQueueHw<FamilyType> cmdQ(&contextWithMockCmdQ, pDevice, 0);
|
||||
|
||||
auto retVal = cmdQ.finish(false);
|
||||
auto retVal = cmdQ.finish();
|
||||
ASSERT_EQ(CL_SUCCESS, retVal);
|
||||
|
||||
EXPECT_EQ(nullptr, cmdQ.peekCommandStream());
|
||||
|
|
|
@ -47,7 +47,7 @@ HWTEST_F(GetSizeRequiredTest, finish) {
|
|||
auto &commandStream = pCmdQ->getCS(1024);
|
||||
auto usedBeforeCS = commandStream.getUsed();
|
||||
|
||||
auto retVal = pCmdQ->finish(false);
|
||||
auto retVal = pCmdQ->finish();
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
|
||||
EXPECT_EQ(0u, commandStream.getUsed() - usedBeforeCS);
|
||||
|
|
|
@ -73,7 +73,7 @@ HWTEST_P(OOMCommandQueueTest, finish) {
|
|||
auto usedBeforeCS = commandStream.getUsed();
|
||||
auto usedBeforeISH = indirectHeap.getUsed();
|
||||
|
||||
auto retVal = pCmdQ->finish(false);
|
||||
auto retVal = pCmdQ->finish();
|
||||
|
||||
auto usedAfterCS = commandStream.getUsed();
|
||||
auto usedAfterISH = indirectHeap.getUsed();
|
||||
|
|
|
@ -112,9 +112,9 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, TrackSentTagsWhenEmptyQueue) {
|
|||
commandStreamReceiver.taskCount = taskCount;
|
||||
|
||||
EXPECT_EQ(0u, commandStreamReceiver.peekLatestSentTaskCount());
|
||||
commandQueue.finish(false);
|
||||
commandQueue.finish();
|
||||
EXPECT_EQ(0u, commandStreamReceiver.peekLatestSentTaskCount());
|
||||
commandQueue.finish(true);
|
||||
commandQueue.finish();
|
||||
//nothings sent to the HW, no need to bump tags
|
||||
EXPECT_EQ(0u, commandStreamReceiver.peekLatestSentTaskCount());
|
||||
EXPECT_EQ(0u, commandQueue.latestTaskCountWaited);
|
||||
|
@ -137,13 +137,13 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, TrackSentTagsWhenNonDcFlushWithIni
|
|||
|
||||
// finish after enqueued kernel(cmdq task count = 1)
|
||||
commandQueue.enqueueKernel(kernel, 1, nullptr, &GWS, nullptr, 0, nullptr, nullptr);
|
||||
commandQueue.finish(false);
|
||||
commandQueue.finish();
|
||||
EXPECT_EQ(1u, commandStreamReceiver.peekLatestSentTaskCount());
|
||||
EXPECT_EQ(1u, commandQueue.latestTaskCountWaited);
|
||||
EXPECT_EQ(1u, commandStreamReceiver.peekTaskCount());
|
||||
|
||||
// finish again - dont call flush task
|
||||
commandQueue.finish(false);
|
||||
commandQueue.finish();
|
||||
EXPECT_EQ(1u, commandStreamReceiver.peekLatestSentTaskCount());
|
||||
EXPECT_EQ(1u, commandQueue.latestTaskCountWaited);
|
||||
EXPECT_EQ(1u, commandStreamReceiver.peekTaskCount());
|
||||
|
@ -178,13 +178,13 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, TrackSentTagsWhenDcFlush) {
|
|||
EXPECT_EQ(1u, commandStreamReceiver.peekLatestSentTaskCount());
|
||||
|
||||
// cmdQ task count = 2, finish again
|
||||
commandQueue.finish(false);
|
||||
commandQueue.finish();
|
||||
|
||||
EXPECT_EQ(1u, commandStreamReceiver.peekLatestSentTaskCount());
|
||||
EXPECT_EQ(1u, commandQueue.latestTaskCountWaited);
|
||||
|
||||
// finish again - dont flush task again
|
||||
commandQueue.finish(false);
|
||||
commandQueue.finish();
|
||||
|
||||
EXPECT_EQ(1u, commandStreamReceiver.peekLatestSentTaskCount());
|
||||
EXPECT_EQ(1u, commandQueue.latestTaskCountWaited);
|
||||
|
@ -284,7 +284,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenNonBlockingMapWhenFinishIsCal
|
|||
|
||||
EXPECT_EQ(0u, commandStreamReceiver.peekLatestSentTaskCount());
|
||||
|
||||
commandQueue.finish(false);
|
||||
commandQueue.finish();
|
||||
|
||||
EXPECT_EQ(0u, commandStreamReceiver.peekLatestSentTaskCount());
|
||||
|
||||
|
|
|
@ -35,13 +35,11 @@ TYPED_TEST_P(D3DTests, givenSharedResourceBufferAndInteropUserSyncEnabledWhenRel
|
|||
class MockCmdQ : public CommandQueue {
|
||||
public:
|
||||
MockCmdQ(Context *context, Device *device, const cl_queue_properties *properties) : CommandQueue(context, device, properties){};
|
||||
cl_int finish(bool dcFlush) override {
|
||||
cl_int finish() override {
|
||||
finishCalled++;
|
||||
dcFlushRequested = dcFlush;
|
||||
return CL_SUCCESS;
|
||||
}
|
||||
uint32_t finishCalled = 0;
|
||||
bool dcFlushRequested = false;
|
||||
};
|
||||
|
||||
auto mockCmdQ = std::unique_ptr<MockCmdQ>(new MockCmdQ(this->context, this->context->getDevice(0), 0));
|
||||
|
@ -65,13 +63,11 @@ TYPED_TEST_P(D3DTests, givenNonSharedResourceBufferAndInteropUserSyncDisabledWhe
|
|||
class MockCmdQ : public CommandQueue {
|
||||
public:
|
||||
MockCmdQ(Context *context, Device *device, const cl_queue_properties *properties) : CommandQueue(context, device, properties){};
|
||||
cl_int finish(bool dcFlush) override {
|
||||
cl_int finish() override {
|
||||
finishCalled++;
|
||||
dcFlushRequested = dcFlush;
|
||||
return CL_SUCCESS;
|
||||
}
|
||||
uint32_t finishCalled = 0;
|
||||
bool dcFlushRequested = false;
|
||||
};
|
||||
|
||||
auto mockCmdQ = std::unique_ptr<MockCmdQ>(new MockCmdQ(this->context, this->context->getDevice(0), 0));
|
||||
|
@ -87,7 +83,6 @@ TYPED_TEST_P(D3DTests, givenNonSharedResourceBufferAndInteropUserSyncDisabledWhe
|
|||
retVal = this->enqueueReleaseD3DObjectsApi(this->mockSharingFcns, mockCmdQ.get(), 1, &bufferMem, 0, nullptr, nullptr);
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
EXPECT_EQ(2u, mockCmdQ->finishCalled);
|
||||
EXPECT_TRUE(mockCmdQ->dcFlushRequested);
|
||||
}
|
||||
|
||||
TYPED_TEST_P(D3DTests, givenSharedResourceBufferAndInteropUserSyncDisabledWhenReleaseIsCalledThenDoExplicitFinishOnce) {
|
||||
|
@ -101,13 +96,11 @@ TYPED_TEST_P(D3DTests, givenSharedResourceBufferAndInteropUserSyncDisabledWhenRe
|
|||
class MockCmdQ : public CommandQueue {
|
||||
public:
|
||||
MockCmdQ(Context *context, Device *device, const cl_queue_properties *properties) : CommandQueue(context, device, properties){};
|
||||
cl_int finish(bool dcFlush) override {
|
||||
cl_int finish() override {
|
||||
finishCalled++;
|
||||
dcFlushRequested = dcFlush;
|
||||
return CL_SUCCESS;
|
||||
}
|
||||
uint32_t finishCalled = 0;
|
||||
bool dcFlushRequested = false;
|
||||
};
|
||||
|
||||
auto mockCmdQ = std::unique_ptr<MockCmdQ>(new MockCmdQ(this->context, this->context->getDevice(0), 0));
|
||||
|
@ -123,7 +116,6 @@ TYPED_TEST_P(D3DTests, givenSharedResourceBufferAndInteropUserSyncDisabledWhenRe
|
|||
retVal = this->enqueueReleaseD3DObjectsApi(this->mockSharingFcns, mockCmdQ.get(), 1, &bufferMem, 0, nullptr, nullptr);
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
EXPECT_EQ(1u, mockCmdQ->finishCalled);
|
||||
EXPECT_TRUE(mockCmdQ->dcFlushRequested);
|
||||
}
|
||||
|
||||
TYPED_TEST_P(D3DTests, givenNonSharedResourceBufferAndInteropUserSyncEnabledWhenReleaseIsCalledThenDoExplicitFinishOnce) {
|
||||
|
@ -132,13 +124,11 @@ TYPED_TEST_P(D3DTests, givenNonSharedResourceBufferAndInteropUserSyncEnabledWhen
|
|||
class MockCmdQ : public CommandQueue {
|
||||
public:
|
||||
MockCmdQ(Context *context, Device *device, const cl_queue_properties *properties) : CommandQueue(context, device, properties){};
|
||||
cl_int finish(bool dcFlush) override {
|
||||
cl_int finish() override {
|
||||
finishCalled++;
|
||||
dcFlushRequested = dcFlush;
|
||||
return CL_SUCCESS;
|
||||
}
|
||||
uint32_t finishCalled = 0;
|
||||
bool dcFlushRequested = false;
|
||||
};
|
||||
|
||||
auto mockCmdQ = std::unique_ptr<MockCmdQ>(new MockCmdQ(this->context, this->context->getDevice(0), 0));
|
||||
|
@ -154,7 +144,6 @@ TYPED_TEST_P(D3DTests, givenNonSharedResourceBufferAndInteropUserSyncEnabledWhen
|
|||
retVal = this->enqueueReleaseD3DObjectsApi(this->mockSharingFcns, mockCmdQ.get(), 1, &bufferMem, 0, nullptr, nullptr);
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
EXPECT_EQ(1u, mockCmdQ->finishCalled);
|
||||
EXPECT_TRUE(mockCmdQ->dcFlushRequested);
|
||||
}
|
||||
|
||||
TYPED_TEST_P(D3DTests, givenSharedResourceFlagWhenCreate2dTextureThenStagingTextureEqualsPassedTexture) {
|
||||
|
@ -493,4 +482,4 @@ REGISTER_TYPED_TEST_CASE_P(D3DTests,
|
|||
givenD3DTexture3dWhenOclImageIsCreatedThenSharedImageAllocationTypeIsSet);
|
||||
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(D3DSharingTests, D3DTests, D3DTypes);
|
||||
} // namespace NEO
|
||||
} // namespace NEO
|
||||
|
|
|
@ -35,8 +35,7 @@ class MyMockCommandQueue : public CommandQueueHw<Family> {
|
|||
enqueueWriteImageCalled++;
|
||||
return CL_SUCCESS;
|
||||
}
|
||||
cl_int finish(bool dcFlush) override {
|
||||
EXPECT_TRUE(dcFlush);
|
||||
cl_int finish() override {
|
||||
finishCalled++;
|
||||
return CL_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ struct CommandQueueMock : public CommandQueue {
|
|||
passedMapFlags = mapFlags;
|
||||
return CL_SUCCESS;
|
||||
}
|
||||
cl_int finish(bool dcFlush) override {
|
||||
cl_int finish() override {
|
||||
finishCalled++;
|
||||
return CL_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -374,7 +374,7 @@ HWTEST_F(ProfilingTests, givenNonKernelEnqueueWhenNonBlockedEnqueueThenSetCpuPat
|
|||
pCmdQ->enqueueMarkerWithWaitList(0, nullptr, &event);
|
||||
auto eventObj = static_cast<Event *>(event);
|
||||
EXPECT_TRUE(eventObj->isCPUProfilingPath() == CL_TRUE);
|
||||
pCmdQ->finish(false);
|
||||
pCmdQ->finish();
|
||||
|
||||
uint64_t queued, submit, start, end;
|
||||
cl_int retVal;
|
||||
|
|
|
@ -99,7 +99,7 @@ HWTEST_F(EnqueueBufferWindowsTest, givenMisalignedHostPtrWhenEnqueueReadBufferCa
|
|||
ASSERT_NE(nullptr, hostPtrAllcoation);
|
||||
|
||||
uint64_t gpuVa = hostPtrAllcoation->getGpuAddress();
|
||||
cmdQ->finish(true);
|
||||
cmdQ->finish();
|
||||
|
||||
parseCommands<FamilyType>(*cmdQ);
|
||||
|
||||
|
|
Loading…
Reference in New Issue