diff --git a/shared/source/command_stream/command_stream_receiver_hw.h b/shared/source/command_stream/command_stream_receiver_hw.h index 3f499bd8d9..02b5aab2c2 100644 --- a/shared/source/command_stream/command_stream_receiver_hw.h +++ b/shared/source/command_stream/command_stream_receiver_hw.h @@ -241,6 +241,7 @@ class CommandStreamReceiverHw : public CommandStreamReceiver { bool areMultipleSubDevicesInContext, bool setGeneralStateBaseAddress); + inline CompletionStamp updateTaskCountAndGetCompletionStamp(bool levelClosed); inline void programSamplerCacheFlushBetweenRedescribedSurfaceReads(LinearStream &commandStreamCSR); bool bcsRelaxedOrderingAllowed(const BlitPropertiesContainer &blitPropertiesContainer, bool hasStallingCmds) const; inline void handleImmediateFlushPipelineSelectState(ImmediateDispatchFlags &dispatchFlags, ImmediateFlushData &flushData); diff --git a/shared/source/command_stream/command_stream_receiver_hw_base.inl b/shared/source/command_stream/command_stream_receiver_hw_base.inl index a84fe0cc71..372d06e2c2 100644 --- a/shared/source/command_stream/command_stream_receiver_hw_base.inl +++ b/shared/source/command_stream/command_stream_receiver_hw_base.inl @@ -702,20 +702,7 @@ CompletionStamp CommandStreamReceiverHw::flushTask( handleBatchedDispatchImplicitFlush(device.getDeviceInfo().globalMemSize, implicitFlush); } - ++taskCount; - DBG_LOG(LogTaskCounts, __FUNCTION__, "Line: ", __LINE__, "taskCount", peekTaskCount()); - DBG_LOG(LogTaskCounts, __FUNCTION__, "Line: ", __LINE__, "Current taskCount:", tagAddress ? *tagAddress : 0); - - CompletionStamp completionStamp = { - taskCount, - this->taskLevel, - flushStamp->peekStamp()}; - - if (levelClosed) { - this->taskLevel++; - } - - return completionStamp; + return updateTaskCountAndGetCompletionStamp(levelClosed); } template @@ -1895,6 +1882,26 @@ inline void CommandStreamReceiverHw::programStateBaseAddressCommon( } } +template +inline CompletionStamp CommandStreamReceiverHw::updateTaskCountAndGetCompletionStamp(bool levelClosed) { + + ++taskCount; + + DBG_LOG(LogTaskCounts, __FUNCTION__, "Line: ", __LINE__, "taskCount", peekTaskCount()); + DBG_LOG(LogTaskCounts, __FUNCTION__, "Line: ", __LINE__, "Current taskCount:", tagAddress ? *tagAddress : 0); + + CompletionStamp completionStamp = { + taskCount, + this->taskLevel, + flushStamp->peekStamp()}; + + if (levelClosed) { + this->taskLevel++; + } + + return completionStamp; +} + template inline void CommandStreamReceiverHw::programSamplerCacheFlushBetweenRedescribedSurfaceReads(LinearStream &commandStreamCSR) { if (this->samplerCacheFlushRequired != SamplerCacheFlushState::samplerCacheFlushNotRequired) {