setupTimestampPacket method cleanup

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski 2020-11-24 14:20:25 +00:00 committed by Compute-Runtime-Automation
parent 7ec69c33f9
commit bf61dcc849
5 changed files with 11 additions and 25 deletions

View File

@ -140,7 +140,6 @@ class GpgpuWalkerHelper {
LinearStream *cmdStream,
WALKER_TYPE<GfxFamily> *walkerCmd,
TagNode<TimestampPacketStorage> *timestampPacketNode,
TimestampPacketStorage::WriteOperationType writeOperationType,
const RootDeviceEnvironment &rootDeviceEnvironment);
static void dispatchScheduler(

View File

@ -185,22 +185,19 @@ void GpgpuWalkerHelper<GfxFamily>::setupTimestampPacket(
LinearStream *cmdStream,
WALKER_TYPE<GfxFamily> *walkerCmd,
TagNode<TimestampPacketStorage> *timestampPacketNode,
TimestampPacketStorage::WriteOperationType writeOperationType,
const RootDeviceEnvironment &rootDeviceEnvironment) {
if (TimestampPacketStorage::WriteOperationType::AfterWalker == writeOperationType) {
uint64_t address = TimestampPacketHelper::getContextEndGpuAddress(*timestampPacketNode);
PipeControlArgs args;
MemorySynchronizationCommands<GfxFamily>::addPipeControlAndProgramPostSyncOperation(
*cmdStream,
PIPE_CONTROL::POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA,
address,
0,
*rootDeviceEnvironment.getHardwareInfo(),
args);
uint64_t address = TimestampPacketHelper::getContextEndGpuAddress(*timestampPacketNode);
PipeControlArgs args;
MemorySynchronizationCommands<GfxFamily>::addPipeControlAndProgramPostSyncOperation(
*cmdStream,
PIPE_CONTROL::POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA,
address,
0,
*rootDeviceEnvironment.getHardwareInfo(),
args);
EncodeDispatchKernel<GfxFamily>::adjustTimestampPacket(*walkerCmd, *rootDeviceEnvironment.getHardwareInfo());
}
EncodeDispatchKernel<GfxFamily>::adjustTimestampPacket(*walkerCmd, *rootDeviceEnvironment.getHardwareInfo());
}
template <typename GfxFamily>

View File

@ -232,11 +232,6 @@ void HardwareInterface<GfxFamily>::dispatchKernelCommands(CommandQueue &commandQ
dispatchWorkarounds(&commandStream, commandQueue, kernel, true);
if (commandQueue.getGpgpuCommandStreamReceiver().peekTimestampPacketWriteEnabled()) {
auto timestampPacketNode = currentTimestampPacketNodes->peekNodes().at(currentDispatchIndex);
GpgpuWalkerHelper<GfxFamily>::setupTimestampPacket(&commandStream, nullptr, timestampPacketNode, TimestampPacketStorage::WriteOperationType::BeforeWalker, commandQueue.getDevice().getRootDeviceEnvironment());
}
programWalker(commandStream, kernel, commandQueue, currentTimestampPacketNodes, dsh, ioh, ssh, globalWorkSizes,
localWorkSizes, preemptionMode, currentDispatchIndex, interfaceDescriptorIndex, dispatchInfo,
offsetInterfaceDescriptorTable, numberOfWorkgroups, startOfWorkgroups);

View File

@ -81,7 +81,7 @@ inline void HardwareInterface<GfxFamily>::programWalker(
if (currentTimestampPacketNodes && commandQueue.getGpgpuCommandStreamReceiver().peekTimestampPacketWriteEnabled()) {
auto timestampPacketNode = currentTimestampPacketNodes->peekNodes().at(currentDispatchIndex);
GpgpuWalkerHelper<GfxFamily>::setupTimestampPacket(&commandStream, &walkerCmd, timestampPacketNode, TimestampPacketStorage::WriteOperationType::AfterWalker, commandQueue.getDevice().getRootDeviceEnvironment());
GpgpuWalkerHelper<GfxFamily>::setupTimestampPacket(&commandStream, &walkerCmd, timestampPacketNode, commandQueue.getDevice().getRootDeviceEnvironment());
}
auto isCcsUsed = EngineHelpers::isCcs(commandQueue.getGpgpuEngine().osContext->getEngineType());

View File

@ -37,11 +37,6 @@ struct TimestampPacketStorage {
uint32_t globalEnd = 1u;
};
enum class WriteOperationType : uint32_t {
BeforeWalker,
AfterWalker
};
static GraphicsAllocation::AllocationType getAllocationType() {
return GraphicsAllocation::AllocationType::TIMESTAMP_PACKET_TAG_BUFFER;
}