Fix issue in events

alloc was previously potentially never used

Change-Id: I9da9aeb51dcf7881d51bb62ef35c9427c8cc3ef0
Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@intel.com>
This commit is contained in:
Aravind Gopalakrishnan
2020-03-26 10:06:07 -07:00
committed by sys_ocldev
parent 1e074545db
commit 6c4621f2ec

View File

@@ -199,9 +199,9 @@ ze_result_t Event::destroy() {
void EventImp::makeAllocationResident() {
auto deviceImp = static_cast<DeviceImp *>(this->device);
NEO::MemoryOperationsHandler *memoryOperationsIface = deviceImp->neoDevice->getRootDeviceEnvironment().memoryOperationsInterface.get();
auto alloc = &(this->eventPool->getAllocation());
if (memoryOperationsIface) {
auto alloc = &(this->eventPool->getAllocation());
memoryOperationsIface->makeResident(ArrayRef<NEO::GraphicsAllocation *>(&alloc, 1));
}
}