mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 05:56:36 +08:00
Pass root device index to MemObj::getGraphicsAllocation method
leave parameterless method in Buffer and Image classes add method to remove graphics allocation from MultiGraphicsAllocation Related-To: NEO-4672 Change-Id: I3020eecfabe9a16af7f36d68a74b32d3f4fc2276 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
@@ -193,7 +193,7 @@ void gtpinNotifyMakeResident(void *pKernel, void *pCSR) {
|
||||
CommandStreamReceiver *pCommandStreamReceiver = reinterpret_cast<CommandStreamReceiver *>(pCSR);
|
||||
cl_mem gtpinBuffer = kernelExecQueue[n].gtpinResource;
|
||||
auto pBuffer = castToObjectOrAbort<Buffer>(gtpinBuffer);
|
||||
GraphicsAllocation *pGfxAlloc = pBuffer->getGraphicsAllocation();
|
||||
GraphicsAllocation *pGfxAlloc = pBuffer->getGraphicsAllocation(pCommandStreamReceiver->getRootDeviceIndex());
|
||||
pCommandStreamReceiver->makeResident(*pGfxAlloc);
|
||||
kernelExecQueue[n].isResourceResident = true;
|
||||
break;
|
||||
@@ -212,7 +212,8 @@ void gtpinNotifyUpdateResidencyList(void *pKernel, void *pResVec) {
|
||||
std::vector<Surface *> *pResidencyVector = (std::vector<Surface *> *)pResVec;
|
||||
cl_mem gtpinBuffer = kernelExecQueue[n].gtpinResource;
|
||||
auto pBuffer = castToObjectOrAbort<Buffer>(gtpinBuffer);
|
||||
GraphicsAllocation *pGfxAlloc = pBuffer->getGraphicsAllocation();
|
||||
auto rootDeviceIndex = kernelExecQueue[n].pCommandQueue->getDevice().getRootDeviceIndex();
|
||||
GraphicsAllocation *pGfxAlloc = pBuffer->getGraphicsAllocation(rootDeviceIndex);
|
||||
GeneralSurface *pSurface = new GeneralSurface(pGfxAlloc);
|
||||
pResidencyVector->push_back(pSurface);
|
||||
kernelExecQueue[n].isResourceResident = true;
|
||||
|
||||
Reference in New Issue
Block a user