Connect mem_obj with MultiGraphicsAllocation

Related-To: NEO-4672
Change-Id: I188db44b4cb0ac6245bd7c864c69b8f1c0084dc4
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
Krzysztof Gibala
2020-07-21 10:21:15 +02:00
committed by sys_ocldev
parent b457c50a56
commit e9c42e54b2
13 changed files with 59 additions and 56 deletions

View File

@@ -35,14 +35,14 @@ MemObj::MemObj(Context *context,
size_t size,
void *memoryStorage,
void *hostPtr,
GraphicsAllocation *gfxAllocation,
MultiGraphicsAllocation multiGraphicsAllocation,
bool zeroCopy,
bool isHostPtrSVM,
bool isObjectRedescribed)
: context(context), memObjectType(memObjectType), memoryProperties(memoryProperties), flags(flags), flagsIntel(flagsIntel), size(size),
memoryStorage(memoryStorage), hostPtr(hostPtr),
isZeroCopy(zeroCopy), isHostPtrSVM(isHostPtrSVM), isObjectRedescribed(isObjectRedescribed),
multiGraphicsAllocation(gfxAllocation ? gfxAllocation->getRootDeviceIndex() : 0) {
multiGraphicsAllocation(std::move(multiGraphicsAllocation)) {
if (context) {
context->incRefInternal();
@@ -50,9 +50,6 @@ MemObj::MemObj(Context *context,
auto device = context->getDevice(0);
executionEnvironment = device->getExecutionEnvironment();
}
if (gfxAllocation) {
multiGraphicsAllocation.addAllocation(gfxAllocation);
}
}
MemObj::~MemObj() {