diff --git a/shared/source/command_stream/command_stream_receiver.h b/shared/source/command_stream/command_stream_receiver.h index 1b9ff5275b..e0647800d1 100644 --- a/shared/source/command_stream/command_stream_receiver.h +++ b/shared/source/command_stream/command_stream_receiver.h @@ -673,6 +673,7 @@ class CommandStreamReceiver : NEO::NonCopyableAndNonMovableClass { bool isPreambleSent = false; bool isStateSipSent = false; bool isEnginePrologueSent = false; + bool areExceptionsSent = false; bool isPerDssBackedBufferSent = false; bool gsbaFor32BitProgrammed = false; bool gsbaStateDirty = true; diff --git a/shared/source/command_stream/command_stream_receiver_hw.h b/shared/source/command_stream/command_stream_receiver_hw.h index 0b696e23cd..fe47883b46 100644 --- a/shared/source/command_stream/command_stream_receiver_hw.h +++ b/shared/source/command_stream/command_stream_receiver_hw.h @@ -224,6 +224,8 @@ class CommandStreamReceiverHw : public CommandStreamReceiver { void programEnginePrologue(LinearStream &csr); size_t getCmdSizeForPrologue() const; + void programExceptions(LinearStream &csr, Device &device); + size_t getCmdSizeForExceptions() const; size_t getCmdSizeForHeaplessPrologue(Device &device) const; void handleAllocationsResidencyForHeaplessProlog(LinearStream &linearStream, Device &device); 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 327c9bdbbc..460df7de1a 100644 --- a/shared/source/command_stream/command_stream_receiver_hw_base.inl +++ b/shared/source/command_stream/command_stream_receiver_hw_base.inl @@ -1382,6 +1382,15 @@ inline size_t CommandStreamReceiverHw::getCmdSizeForPrologue() const return 0u; } +template +void CommandStreamReceiverHw::programExceptions(LinearStream &csr, Device &device) { +} + +template +size_t CommandStreamReceiverHw::getCmdSizeForExceptions() const { + return 0u; +} + template inline void CommandStreamReceiverHw::stopDirectSubmission(bool blocking, bool needsLock) { if (this->isAnyDirectSubmissionEnabled()) { @@ -2105,6 +2114,7 @@ void CommandStreamReceiverHw::handleImmediateFlushOneTimeContextInitS flushData.contextOneTimeInit = true; flushData.estimatedSize += PreemptionHelper::getRequiredPreambleSize(device); } + flushData.estimatedSize += this->getCmdSizeForExceptions(); } else if (this->getPreemptionMode() == PreemptionMode::Initial) { flushData.contextOneTimeInit = true; flushData.estimatedSize += PreemptionHelper::getRequiredCmdStreamSize(device.getPreemptionMode(), this->getPreemptionMode()); @@ -2137,6 +2147,7 @@ void CommandStreamReceiverHw::dispatchImmediateFlushOneTimeContextIni device, device.getDebugSurface()); this->setCsrSurfaceProgrammed(true); + this->programExceptions(csrStream, device); } else if (this->getPreemptionMode() == PreemptionMode::Initial) { PreemptionHelper::programCmdStream(csrStream, device.getPreemptionMode(), this->getPreemptionMode(), this->getPreemptionAllocation()); PreemptionHelper::programCsrBaseAddress(csrStream, diff --git a/shared/test/common/libult/ult_command_stream_receiver.h b/shared/test/common/libult/ult_command_stream_receiver.h index 263d02e3db..6b6f9d42a7 100644 --- a/shared/test/common/libult/ult_command_stream_receiver.h +++ b/shared/test/common/libult/ult_command_stream_receiver.h @@ -61,6 +61,7 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw { using BaseClass::dcFlushSupport; using BaseClass::directSubmission; using BaseClass::dshState; + using BaseClass::getCmdSizeForExceptions; using BaseClass::getCmdSizeForHeaplessPrologue; using BaseClass::getCmdSizeForPrologue; using BaseClass::getScratchPatchAddress; @@ -84,6 +85,7 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw { using BaseClass::primaryCsr; using BaseClass::programActivePartitionConfig; using BaseClass::programEnginePrologue; + using BaseClass::programExceptions; using BaseClass::programPerDssBackedBuffer; using BaseClass::programPreamble; using BaseClass::programStallingCommandsForBarrier; @@ -99,6 +101,7 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw { using BaseClass::wasSubmittedToSingleSubdevice; using BaseClass::CommandStreamReceiver::activePartitions; using BaseClass::CommandStreamReceiver::activePartitionsConfig; + using BaseClass::CommandStreamReceiver::areExceptionsSent; using BaseClass::CommandStreamReceiver::baseWaitFunction; using BaseClass::CommandStreamReceiver::bindingTableBaseAddressRequired; using BaseClass::CommandStreamReceiver::checkForNewResources;