Enable support for indirect allocation access to Kernels

Change-Id: I3ded8cce3761a38aa4a4d71b4089f79c844311c5
Signed-off-by: Raiyan Latif <raiyan.latif@intel.com>
This commit is contained in:
Raiyan Latif
2020-03-12 16:33:22 -07:00
committed by sys_ocldev
parent c0131430d4
commit 43433244f9
8 changed files with 54 additions and 11 deletions

View File

@@ -91,15 +91,15 @@ void CommandContainer::addToResidencyContainer(GraphicsAllocation *alloc) {
if (alloc == nullptr) {
return;
}
auto end = this->residencyContainer.end();
bool isUnique = (end == std::find(this->residencyContainer.begin(), end, alloc));
if (isUnique == false) {
return;
}
this->residencyContainer.push_back(alloc);
}
void CommandContainer::removeDuplicatesFromResidencyContainer() {
std::sort(this->residencyContainer.begin(), this->residencyContainer.end());
this->residencyContainer.erase(std::unique(this->residencyContainer.begin(), this->residencyContainer.end()), this->residencyContainer.end());
}
void CommandContainer::reset() {
setDirtyStateForAllHeaps(true);
slmSize = std::numeric_limits<uint32_t>::max();

View File

@@ -54,6 +54,7 @@ class CommandContainer : public NonCopyableOrMovableClass {
std::vector<GraphicsAllocation *> &getDeallocationContainer() { return deallocationContainer; }
void addToResidencyContainer(GraphicsAllocation *alloc);
void removeDuplicatesFromResidencyContainer();
LinearStream *getCommandStream() { return commandStream.get(); }