2017-12-21 00:45:38 +01:00
|
|
|
/*
|
2021-05-16 20:51:16 +02:00
|
|
|
* Copyright (C) 2018-2021 Intel Corporation
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
2018-12-27 16:01:22 +01:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2020-02-22 22:50:57 +01:00
|
|
|
#include "opencl/source/command_queue/gpgpu_walker.h"
|
|
|
|
|
#include "opencl/source/device_queue/device_queue_hw.h"
|
2019-05-13 13:35:14 +02:00
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
namespace NEO {
|
2017-12-21 00:45:38 +01:00
|
|
|
|
|
|
|
|
template <typename GfxFamily>
|
|
|
|
|
void DeviceQueueHw<GfxFamily>::addProfilingEndCmds(uint64_t timestampAddress) {
|
|
|
|
|
|
2021-07-09 12:14:05 +00:00
|
|
|
auto pipeControlSpace = (PIPE_CONTROL *)slbCS.getSpace(sizeof(PIPE_CONTROL));
|
|
|
|
|
auto pipeControlCmd = GfxFamily::cmdInitPipeControl;
|
|
|
|
|
pipeControlCmd.setCommandStreamerStallEnable(true);
|
|
|
|
|
*pipeControlSpace = pipeControlCmd;
|
2017-12-21 00:45:38 +01:00
|
|
|
|
|
|
|
|
//low part
|
2021-07-09 12:14:05 +00:00
|
|
|
auto mICmdLowSpace = (MI_STORE_REGISTER_MEM *)slbCS.getSpace(sizeof(MI_STORE_REGISTER_MEM));
|
|
|
|
|
auto mICmdLow = GfxFamily::cmdInitStoreRegisterMem;
|
|
|
|
|
GpgpuWalkerHelper<GfxFamily>::adjustMiStoreRegMemMode(&mICmdLow);
|
|
|
|
|
mICmdLow.setRegisterAddress(GP_THREAD_TIME_REG_ADDRESS_OFFSET_LOW);
|
|
|
|
|
mICmdLow.setMemoryAddress(timestampAddress);
|
|
|
|
|
*mICmdLowSpace = mICmdLow;
|
2017-12-21 00:45:38 +01:00
|
|
|
}
|
2019-03-26 11:59:46 +01:00
|
|
|
} // namespace NEO
|