mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Use CPU pointers for TimestampPacket where appropriate.
Related-To: NEO-2872 Change-Id: Ic91a1dd6252d2970e20bb32c3d867449041cbb8a Signed-off-by: Piotr Fusik <piotr.fusik@intel.com>
This commit is contained in:
@@ -60,15 +60,12 @@ class TimestampPacket {
|
||||
}
|
||||
|
||||
void initialize() {
|
||||
for (auto index = 0u; index < data.size(); index++) {
|
||||
data[index] = 1;
|
||||
}
|
||||
std::fill(data.begin(), data.end(), 1u);
|
||||
implicitDependenciesCount.store(0);
|
||||
}
|
||||
|
||||
void incImplicitDependenciesCount() { implicitDependenciesCount++; }
|
||||
|
||||
protected:
|
||||
std::array<uint32_t, static_cast<uint32_t>(DataIndex::Max) * TimestampPacketSizeControl::preferedChunkCount> data;
|
||||
std::atomic<uint32_t> implicitDependenciesCount;
|
||||
};
|
||||
@@ -99,7 +96,7 @@ struct TimestampPacketHelper {
|
||||
static void programSemaphoreWithImplicitDependency(LinearStream &cmdStream, TagNode<TimestampPacket> ×tampPacketNode) {
|
||||
using MI_ATOMIC = typename GfxFamily::MI_ATOMIC;
|
||||
auto compareAddress = getGpuAddressForDataWrite(timestampPacketNode, TimestampPacket::DataIndex::ContextEnd);
|
||||
auto dependenciesCountAddress = getImplicitDependenciesCounGpuWriteAddress(timestampPacketNode);
|
||||
auto dependenciesCountAddress = timestampPacketNode.getGpuAddress() + offsetof(TimestampPacket, implicitDependenciesCount);
|
||||
|
||||
KernelCommandsHelper<GfxFamily>::programMiSemaphoreWait(cmdStream, compareAddress, 1);
|
||||
|
||||
@@ -115,13 +112,6 @@ struct TimestampPacketHelper {
|
||||
return timestampPacketNodes.getGpuAddress() + offset;
|
||||
}
|
||||
|
||||
static uint64_t getImplicitDependenciesCounGpuWriteAddress(TagNode<TimestampPacket> ×tampPacketNodes) {
|
||||
auto offset = static_cast<uint32_t>(TimestampPacket::DataIndex::Max) *
|
||||
TimestampPacketSizeControl::preferedChunkCount *
|
||||
sizeof(uint32_t);
|
||||
return timestampPacketNodes.getGpuAddress() + offset;
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
static void programCsrDependencies(LinearStream &cmdStream, const CsrDependencies &csrDependencies) {
|
||||
for (auto timestampPacketContainer : csrDependencies) {
|
||||
|
||||
Reference in New Issue
Block a user