diff --git a/level_zero/core/source/cmdlist/cmdlist_hw_base.inl b/level_zero/core/source/cmdlist/cmdlist_hw_base.inl index 366d38ba0a..d2948942b7 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw_base.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw_base.inl @@ -95,10 +95,10 @@ void CommandListCoreFamily::appendEventForProfiling(ze_event_hand commandContainer.addToResidencyContainer(&event->getAllocation()); if (beforeWalker) { timeStampAddress = event->getGpuAddress() + event->getOffsetOfEventTimestampRegister(Event::GLOBAL_START); - NEO::EncodeStoreMMIO::encode(commandContainer, REG_GLOBAL_TIMESTAMP_LDW, timeStampAddress); + NEO::EncodeStoreMMIO::encode(*commandContainer.getCommandStream(), REG_GLOBAL_TIMESTAMP_LDW, timeStampAddress); timeStampAddress = event->getGpuAddress() + event->getOffsetOfEventTimestampRegister(Event::CONTEXT_START); - NEO::EncodeStoreMMIO::encode(commandContainer, GP_THREAD_TIME_REG_ADDRESS_OFFSET_LOW, timeStampAddress); + NEO::EncodeStoreMMIO::encode(*commandContainer.getCommandStream(), GP_THREAD_TIME_REG_ADDRESS_OFFSET_LOW, timeStampAddress); } else { timeStampAddress = event->getGpuAddress() + event->getOffsetOfEventTimestampRegister(Event::GLOBAL_END); @@ -116,7 +116,7 @@ void CommandListCoreFamily::appendEventForProfiling(ze_event_hand args); timeStampAddress = event->getGpuAddress() + event->getOffsetOfEventTimestampRegister(Event::CONTEXT_END); - NEO::EncodeStoreMMIO::encode(commandContainer, GP_THREAD_TIME_REG_ADDRESS_OFFSET_LOW, timeStampAddress); + NEO::EncodeStoreMMIO::encode(*commandContainer.getCommandStream(), GP_THREAD_TIME_REG_ADDRESS_OFFSET_LOW, timeStampAddress); if (args.dcFlushEnable) { NEO::MemorySynchronizationCommands::addPipeControl(*commandContainer.getCommandStream(), args); diff --git a/shared/source/command_container/command_encoder.h b/shared/source/command_container/command_encoder.h index 447fb16f29..3a06c5edb4 100644 --- a/shared/source/command_container/command_encoder.h +++ b/shared/source/command_container/command_encoder.h @@ -145,7 +145,7 @@ struct EncodeStoreMMIO { using MI_STORE_REGISTER_MEM = typename GfxFamily::MI_STORE_REGISTER_MEM; static const size_t size = sizeof(MI_STORE_REGISTER_MEM); - static void encode(CommandContainer &container, uint32_t offset, uint64_t address); + static void encode(LinearStream &csr, uint32_t offset, uint64_t address); }; template diff --git a/shared/source/command_container/command_encoder.inl b/shared/source/command_container/command_encoder.inl index 993de63508..d410487c08 100644 --- a/shared/source/command_container/command_encoder.inl +++ b/shared/source/command_container/command_encoder.inl @@ -78,7 +78,7 @@ void EncodeMathMMIO::encodeMulRegVal(CommandContainer &container, uint32 EncodeSetMMIO::encodeREG(container, CS_GPR_R0, CS_GPR_R2); i++; } - EncodeStoreMMIO::encode(container, CS_GPR_R1, dstAddress); + EncodeStoreMMIO::encode(*container.getCommandStream(), CS_GPR_R1, dstAddress); } /* @@ -213,7 +213,7 @@ void EncodeIndirectParams::setGroupCountIndirect(CommandContainer &conta if (NEO::isUndefinedOffset(offsets[i])) { continue; } - EncodeStoreMMIO::encode(container, GPUGPU_DISPATCHDIM[i], ptrOffset(reinterpret_cast(crossThreadAddress), offsets[i])); + EncodeStoreMMIO::encode(*container.getCommandStream(), GPUGPU_DISPATCHDIM[i], ptrOffset(reinterpret_cast(crossThreadAddress), offsets[i])); } } @@ -255,11 +255,11 @@ void EncodeSetMMIO::encodeREG(CommandContainer &container, uint32_t dstO } template -void EncodeStoreMMIO::encode(CommandContainer &container, uint32_t offset, uint64_t address) { +void EncodeStoreMMIO::encode(LinearStream &csr, uint32_t offset, uint64_t address) { MI_STORE_REGISTER_MEM cmd = Family::cmdInitStoreRegisterMem; cmd.setRegisterAddress(offset); cmd.setMemoryAddress(address); - auto buffer = container.getCommandStream()->getSpaceForCmd(); + auto buffer = csr.getSpaceForCmd(); *buffer = cmd; }