mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Refactor waitOnCompletionFence method in DrmMemoryManager
get completion address and value from command stream receiver Related-To: NEO-6643 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
e32f624bf4
commit
9d502dea25
@@ -316,4 +316,16 @@ inline bool DrmCommandStreamReceiver<GfxFamily>::isUserFenceWaitActive() {
|
||||
return (this->drm->isVmBindAvailable() && useUserFenceWait);
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
uint64_t DrmCommandStreamReceiver<GfxFamily>::getCompletionAddress() {
|
||||
uint64_t completionFenceAddress = castToUint64(const_cast<uint32_t *>(getTagAddress()));
|
||||
completionFenceAddress += Drm::completionFenceOffset;
|
||||
return completionFenceAddress;
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
uint32_t DrmCommandStreamReceiver<GfxFamily>::getCompletionValue(const GraphicsAllocation &gfxAllocation) {
|
||||
auto osContextId = osContext->getContextId();
|
||||
return gfxAllocation.getTaskCount(osContextId);
|
||||
}
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user