mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
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:
@@ -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();
|
||||
|
||||
@@ -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(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user