refactor: remove not needed patch preamble function

Related-To: NEO-16434

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2025-10-22 16:08:53 +00:00
committed by Compute-Runtime-Automation
parent a84629c8b3
commit 9474d455b1
6 changed files with 35 additions and 35 deletions

View File

@@ -407,9 +407,4 @@ void CommandQueueImp::makeResidentForResidencyContainer(const NEO::ResidencyCont
}
}
bool CommandQueueImp::checkNeededPatchPreambleWait(CommandList *commandList) {
uint64_t tagGpuAddress = commandList->getLatestTagGpuAddress();
return this->saveWaitForPreamble && (tagGpuAddress != 0) && (getCsr()->getTagAllocation()->getGpuAddress() != tagGpuAddress);
}
} // namespace L0

View File

@@ -119,6 +119,7 @@ struct CommandQueueHw : public CommandQueueImp {
bool lockScratchController = false;
bool cmdListScratchAddressPatchingEnabled = false;
bool containsParentImmediateStream = false;
bool patchPreambleWaitSyncNeeded = false;
};
inline void processMemAdviseOperations(CommandList *commandList);
@@ -160,7 +161,7 @@ struct CommandQueueHw : public CommandQueueImp {
inline size_t estimateCommandListPatchPreamble(CommandListExecutionContext &ctx, uint32_t numCommandLists);
inline size_t estimateCommandListPatchPreambleFrontEndCmd(CommandListExecutionContext &ctx, CommandList *commandList);
inline void getCommandListPatchPreambleData(CommandListExecutionContext &ctx, CommandList *commandList);
inline size_t estimateCommandListPatchPreambleWaitSync(CommandListExecutionContext &ctx, CommandList *commandList);
size_t estimateCommandListPatchPreambleWaitSync(CommandListExecutionContext &ctx, CommandList *commandList);
inline size_t estimateTotalPatchPreambleData(CommandListExecutionContext &ctx);
inline void retrivePatchPreambleSpace(CommandListExecutionContext &ctx, NEO::LinearStream &commandStream);
inline void dispatchPatchPreambleEnding(CommandListExecutionContext &ctx);

View File

@@ -934,9 +934,10 @@ template <GFXCORE_FAMILY gfxCoreFamily>
size_t CommandQueueHw<gfxCoreFamily>::estimateCommandListPatchPreambleWaitSync(CommandListExecutionContext &ctx, CommandList *commandList) {
using MI_LOAD_REGISTER_IMM = typename GfxFamily::MI_LOAD_REGISTER_IMM;
size_t waitSize = 0;
if (this->patchingPreamble) {
bool needWait = this->checkNeededPatchPreambleWait(commandList);
if (needWait) {
if (this->patchingPreamble && this->saveWaitForPreamble) {
uint64_t tagGpuAddress = commandList->getLatestTagGpuAddress();
ctx.patchPreambleWaitSyncNeeded = (tagGpuAddress != 0) && (getCsr()->getTagAllocation()->getGpuAddress() != tagGpuAddress);
if (ctx.patchPreambleWaitSyncNeeded) {
waitSize = NEO::EncodeSemaphore<GfxFamily>::getSizeMiSemaphoreWait();
waitSize += (2 * sizeof(MI_LOAD_REGISTER_IMM));
}
@@ -1042,7 +1043,7 @@ void CommandQueueHw<gfxCoreFamily>::dispatchPatchPreambleCommandListWaitSync(Com
using MI_LOAD_REGISTER_IMM = typename GfxFamily::MI_LOAD_REGISTER_IMM;
if (this->patchingPreamble) {
if (this->checkNeededPatchPreambleWait(commandList)) {
if (ctx.patchPreambleWaitSyncNeeded) {
constexpr uint32_t firstRegister = RegisterOffsets::csGprR0;
constexpr uint32_t secondRegister = RegisterOffsets::csGprR0 + 4;

View File

@@ -120,8 +120,6 @@ struct CommandQueueImp : public CommandQueue {
}
void makeResidentForResidencyContainer(const NEO::ResidencyContainer &residencyContainer);
bool checkNeededPatchPreambleWait(CommandList *commandList);
protected:
MOCKABLE_VIRTUAL NEO::SubmissionStatus submitBatchBuffer(size_t offset, NEO::ResidencyContainer &residencyContainer, void *endingCmdPtr,
bool isCooperative);