mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00

- Dont call makeResident in enqueueHandler for blocked path - Fill csrDeps for blit enqueue only in unblocked path - Call makeResident on all dependencies during blocked command flush Change-Id: I6658e4695483bee63eca205f85687ea5f951b099 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
46 lines
1.6 KiB
C++
46 lines
1.6 KiB
C++
/*
|
|
* Copyright (C) 2019 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "runtime/helpers/csr_deps.h"
|
|
|
|
#include "runtime/command_queue/command_queue.h"
|
|
#include "runtime/event/event.h"
|
|
#include "runtime/helpers/properties_helper.h"
|
|
#include "runtime/helpers/timestamp_packet.h"
|
|
|
|
namespace NEO {
|
|
void CsrDependencies::fillFromEventsRequest(const EventsRequest &eventsRequest, CommandStreamReceiver ¤tCsr,
|
|
DependenciesType depsType) {
|
|
for (cl_uint i = 0; i < eventsRequest.numEventsInWaitList; i++) {
|
|
auto event = castToObjectOrAbort<Event>(eventsRequest.eventWaitList[i]);
|
|
if (event->isUserEvent()) {
|
|
continue;
|
|
}
|
|
|
|
auto timestampPacketContainer = event->getTimestampPacketNodes();
|
|
if (!timestampPacketContainer || timestampPacketContainer->peekNodes().empty()) {
|
|
continue;
|
|
}
|
|
|
|
auto sameCsr = (&event->getCommandQueue()->getGpgpuCommandStreamReceiver() == ¤tCsr);
|
|
bool pushDependency = (DependenciesType::OnCsr == depsType && sameCsr) ||
|
|
(DependenciesType::OutOfCsr == depsType && !sameCsr) ||
|
|
(DependenciesType::All == depsType);
|
|
|
|
if (pushDependency) {
|
|
this->push_back(timestampPacketContainer);
|
|
}
|
|
}
|
|
}
|
|
|
|
void CsrDependencies::makeResident(CommandStreamReceiver &commandStreamReceiver) const {
|
|
for (auto ×tampPacketContainer : *this) {
|
|
timestampPacketContainer->makeResident(commandStreamReceiver);
|
|
}
|
|
}
|
|
} // namespace NEO
|