Pass MultiGraphicsAllocation in Pipe

Related-To: NEO-4672
Change-Id: I931c3808cf84c430ce836147767fb93daa0ad4d8
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
Krzysztof Gibala
2020-07-20 11:08:15 +02:00
committed by sys_ocldev
parent ee23d7465f
commit b6c8e09ee1
3 changed files with 8 additions and 5 deletions

View File

@@ -24,7 +24,7 @@ Pipe::Pipe(Context *context,
cl_uint maxPackets,
const cl_pipe_properties *properties,
void *memoryStorage,
GraphicsAllocation *gfxAllocation)
MultiGraphicsAllocation multiGraphicsAllocation)
: MemObj(context,
CL_MEM_OBJECT_PIPE,
MemoryPropertiesHelper::createMemoryProperties(flags, 0, 0, &context->getDevice(0)->getDevice()),
@@ -33,7 +33,7 @@ Pipe::Pipe(Context *context,
static_cast<size_t>(packetSize * (maxPackets + 1) + intelPipeHeaderReservedSpace),
memoryStorage,
nullptr,
gfxAllocation,
multiGraphicsAllocation.getDefaultGraphicsAllocation(),
false,
false,
false),
@@ -71,7 +71,10 @@ Pipe *Pipe::create(Context *context,
break;
}
pPipe = new (std::nothrow) Pipe(context, flags, packetSize, maxPackets, properties, memory->getUnderlyingBuffer(), memory);
auto multiGraphicsAllocation = MultiGraphicsAllocation(rootDeviceIndex);
multiGraphicsAllocation.addAllocation(memory);
pPipe = new (std::nothrow) Pipe(context, flags, packetSize, maxPackets, properties, memory->getUnderlyingBuffer(), std::move(multiGraphicsAllocation));
if (!pPipe) {
memoryManager->freeGraphicsMemory(memory);
memory = nullptr;

View File

@@ -38,7 +38,7 @@ class Pipe : public MemObj {
cl_uint maxPackets,
const cl_pipe_properties *properties,
void *memoryStorage,
GraphicsAllocation *gfxAllocation);
MultiGraphicsAllocation multiGraphicsAllocation);
cl_uint pipePacketSize;
cl_uint pipeMaxPackets;