mirror of
https://github.com/intel/compute-runtime.git
synced 2025-11-10 05:49:51 +08:00
Pass MultiGraphicsAllocation in Buffer 3/3
Related-To: NEO-4672 Change-Id: Ic6b696b1df798fcdadcf17f9e22f1c0999361e47 Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
6224db771a
commit
d957349f76
@@ -49,7 +49,11 @@ class D3DBuffer : public D3DSharing<D3D> {
|
||||
|
||||
auto d3dBufferObj = new D3DBuffer<D3D>(context, d3dBuffer, bufferStaging, sharedResource);
|
||||
|
||||
return Buffer::createSharedBuffer(context, flags, d3dBufferObj, alloc);
|
||||
auto rootDeviceIndex = alloc->getRootDeviceIndex();
|
||||
auto multiGraphicsAllocation = MultiGraphicsAllocation(rootDeviceIndex);
|
||||
multiGraphicsAllocation.addAllocation(alloc);
|
||||
|
||||
return Buffer::createSharedBuffer(context, flags, d3dBufferObj, multiGraphicsAllocation);
|
||||
}
|
||||
~D3DBuffer() override = default;
|
||||
|
||||
|
||||
@@ -38,7 +38,11 @@ Buffer *GlBuffer::createSharedGlBuffer(Context *context, cl_mem_flags flags, uns
|
||||
}
|
||||
|
||||
auto glHandler = new GlBuffer(sharingFunctions, bufferId);
|
||||
return Buffer::createSharedBuffer(context, flags, glHandler, graphicsAllocation);
|
||||
auto rootDeviceIndex = graphicsAllocation->getRootDeviceIndex();
|
||||
auto multiGraphicsAllocation = MultiGraphicsAllocation(rootDeviceIndex);
|
||||
multiGraphicsAllocation.addAllocation(graphicsAllocation);
|
||||
|
||||
return Buffer::createSharedBuffer(context, flags, glHandler, multiGraphicsAllocation);
|
||||
}
|
||||
|
||||
void GlBuffer::synchronizeObject(UpdateData &updateData) {
|
||||
|
||||
@@ -29,5 +29,9 @@ Buffer *UnifiedBuffer::createSharedUnifiedBuffer(Context *context, cl_mem_flags
|
||||
|
||||
UnifiedSharingFunctions *sharingFunctions = context->getSharing<UnifiedSharingFunctions>();
|
||||
auto sharingHandler = new UnifiedBuffer(sharingFunctions, extMem.type);
|
||||
return Buffer::createSharedBuffer(context, flags, sharingHandler, graphicsAllocation);
|
||||
auto rootDeviceIndex = graphicsAllocation->getRootDeviceIndex();
|
||||
auto multiGraphicsAllocation = MultiGraphicsAllocation(rootDeviceIndex);
|
||||
multiGraphicsAllocation.addAllocation(graphicsAllocation);
|
||||
|
||||
return Buffer::createSharedBuffer(context, flags, sharingHandler, multiGraphicsAllocation);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user