From fbc91887b8dcfaa6559ceb170c01fd34ef0b6238 Mon Sep 17 00:00:00 2001 From: Zbigniew Zdanowicz Date: Fri, 23 Sep 2022 00:06:22 +0000 Subject: [PATCH] Add small performance tweak Related-To: NEO-5019 Signed-off-by: Zbigniew Zdanowicz --- level_zero/core/source/cmdqueue/cmdqueue_hw.inl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/level_zero/core/source/cmdqueue/cmdqueue_hw.inl b/level_zero/core/source/cmdqueue/cmdqueue_hw.inl index d7da5a7bfb99c..c0549b01ffc57 100644 --- a/level_zero/core/source/cmdqueue/cmdqueue_hw.inl +++ b/level_zero/core/source/cmdqueue/cmdqueue_hw.inl @@ -884,7 +884,6 @@ void CommandQueueHw::programOneCmdListBatchBufferStart(CommandLis auto &returnPoints = commandList->getReturnPoints(); uint32_t returnPointsSize = commandList->getReturnPointsSize(); - uint32_t cmdBufferProgress = 0; uint32_t returnPointIdx = 0; for (size_t iter = 0; iter < cmdBufferCount; iter++) { @@ -896,7 +895,7 @@ void CommandQueueHw::programOneCmdListBatchBufferStart(CommandLis NEO::EncodeBatchBufferStartOrEnd::programBatchBufferStart(&cmdStream, startOffset, true); if (returnPointsSize > 0) { bool cmdBufferHasRestarts = std::find_if( - std::next(returnPoints.begin(), cmdBufferProgress), + std::next(returnPoints.begin(), returnPointIdx), returnPoints.end(), [allocation](CmdListReturnPoint &retPt) { return retPt.currentCmdBuffer == allocation; @@ -914,7 +913,6 @@ void CommandQueueHw::programOneCmdListBatchBufferStart(CommandLis true); returnPointIdx++; } - cmdBufferProgress++; } } }