2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2018-12-27 23:01:22 +08:00
|
|
|
* Copyright (C) 2017-2019 Intel Corporation
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
2018-12-27 23:01:22 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2019-05-13 19:35:14 +08:00
|
|
|
#include "runtime/command_queue/gpgpu_walker.h"
|
|
|
|
#include "runtime/device_queue/device_queue_hw.h"
|
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
template <typename GfxFamily>
|
|
|
|
void DeviceQueueHw<GfxFamily>::addProfilingEndCmds(uint64_t timestampAddress) {
|
|
|
|
|
|
|
|
auto pPipeControlCmd = (PIPE_CONTROL *)slbCS.getSpace(sizeof(PIPE_CONTROL));
|
2019-01-18 00:10:12 +08:00
|
|
|
*pPipeControlCmd = GfxFamily::cmdInitPipeControl;
|
2017-12-21 07:45:38 +08:00
|
|
|
pPipeControlCmd->setCommandStreamerStallEnable(true);
|
|
|
|
|
|
|
|
//low part
|
|
|
|
auto pMICmdLow = (MI_STORE_REGISTER_MEM *)slbCS.getSpace(sizeof(MI_STORE_REGISTER_MEM));
|
2019-01-18 00:10:12 +08:00
|
|
|
*pMICmdLow = GfxFamily::cmdInitStoreRegisterMem;
|
2018-12-27 23:01:22 +08:00
|
|
|
GpgpuWalkerHelper<GfxFamily>::adjustMiStoreRegMemMode(pMICmdLow);
|
2017-12-21 07:45:38 +08:00
|
|
|
pMICmdLow->setRegisterAddress(GP_THREAD_TIME_REG_ADDRESS_OFFSET_LOW);
|
|
|
|
pMICmdLow->setMemoryAddress(timestampAddress);
|
|
|
|
}
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|