mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 09:58:55 +08:00
combine timestamps implementation
Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
be1f6faeb2
commit
0ecb1b804f
@@ -243,16 +243,18 @@ void GpgpuWalkerHelper<GfxFamily>::dispatchProfilingCommandsStart(
|
||||
hwInfo,
|
||||
args);
|
||||
|
||||
//MI_STORE_REGISTER_MEM for context local timestamp
|
||||
timeStampAddress = hwTimeStamps.getGpuAddress() + offsetof(HwTimeStamps, ContextStartTS);
|
||||
if (!HwHelper::get(hwInfo.platform.eRenderCoreFamily).useOnlyGlobalTimestamps()) {
|
||||
//MI_STORE_REGISTER_MEM for context local timestamp
|
||||
timeStampAddress = hwTimeStamps.getGpuAddress() + offsetof(HwTimeStamps, ContextStartTS);
|
||||
|
||||
//low part
|
||||
auto pMICmdLow = commandStream->getSpaceForCmd<MI_STORE_REGISTER_MEM>();
|
||||
MI_STORE_REGISTER_MEM cmd = GfxFamily::cmdInitStoreRegisterMem;
|
||||
adjustMiStoreRegMemMode(&cmd);
|
||||
cmd.setRegisterAddress(GP_THREAD_TIME_REG_ADDRESS_OFFSET_LOW);
|
||||
cmd.setMemoryAddress(timeStampAddress);
|
||||
*pMICmdLow = cmd;
|
||||
//low part
|
||||
auto pMICmdLow = commandStream->getSpaceForCmd<MI_STORE_REGISTER_MEM>();
|
||||
MI_STORE_REGISTER_MEM cmd = GfxFamily::cmdInitStoreRegisterMem;
|
||||
adjustMiStoreRegMemMode(&cmd);
|
||||
cmd.setRegisterAddress(GP_THREAD_TIME_REG_ADDRESS_OFFSET_LOW);
|
||||
cmd.setMemoryAddress(timeStampAddress);
|
||||
*pMICmdLow = cmd;
|
||||
}
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
@@ -263,21 +265,28 @@ void GpgpuWalkerHelper<GfxFamily>::dispatchProfilingCommandsEnd(
|
||||
using MI_STORE_REGISTER_MEM = typename GfxFamily::MI_STORE_REGISTER_MEM;
|
||||
|
||||
// PIPE_CONTROL for global timestamp
|
||||
auto pPipeControlCmd = commandStream->getSpaceForCmd<PIPE_CONTROL>();
|
||||
PIPE_CONTROL cmdPipeControl = GfxFamily::cmdInitPipeControl;
|
||||
cmdPipeControl.setCommandStreamerStallEnable(true);
|
||||
*pPipeControlCmd = cmdPipeControl;
|
||||
uint64_t timeStampAddress = hwTimeStamps.getGpuAddress() + offsetof(HwTimeStamps, GlobalEndTS);
|
||||
PipeControlArgs args;
|
||||
MemorySynchronizationCommands<GfxFamily>::addPipeControlAndProgramPostSyncOperation(
|
||||
*commandStream,
|
||||
PIPE_CONTROL::POST_SYNC_OPERATION_WRITE_TIMESTAMP,
|
||||
timeStampAddress,
|
||||
0llu,
|
||||
hwInfo,
|
||||
args);
|
||||
|
||||
//MI_STORE_REGISTER_MEM for context local timestamp
|
||||
uint64_t timeStampAddress = hwTimeStamps.getGpuAddress() + offsetof(HwTimeStamps, ContextEndTS);
|
||||
if (!HwHelper::get(hwInfo.platform.eRenderCoreFamily).useOnlyGlobalTimestamps()) {
|
||||
//MI_STORE_REGISTER_MEM for context local timestamp
|
||||
uint64_t timeStampAddress = hwTimeStamps.getGpuAddress() + offsetof(HwTimeStamps, ContextEndTS);
|
||||
|
||||
//low part
|
||||
auto pMICmdLow = commandStream->getSpaceForCmd<MI_STORE_REGISTER_MEM>();
|
||||
MI_STORE_REGISTER_MEM cmd = GfxFamily::cmdInitStoreRegisterMem;
|
||||
adjustMiStoreRegMemMode(&cmd);
|
||||
cmd.setRegisterAddress(GP_THREAD_TIME_REG_ADDRESS_OFFSET_LOW);
|
||||
cmd.setMemoryAddress(timeStampAddress);
|
||||
*pMICmdLow = cmd;
|
||||
//low part
|
||||
auto pMICmdLow = commandStream->getSpaceForCmd<MI_STORE_REGISTER_MEM>();
|
||||
MI_STORE_REGISTER_MEM cmd = GfxFamily::cmdInitStoreRegisterMem;
|
||||
adjustMiStoreRegMemMode(&cmd);
|
||||
cmd.setRegisterAddress(GP_THREAD_TIME_REG_ADDRESS_OFFSET_LOW);
|
||||
cmd.setMemoryAddress(timeStampAddress);
|
||||
*pMICmdLow = cmd;
|
||||
}
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
|
||||
Reference in New Issue
Block a user