mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
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:
committed by
sys_ocldev
parent
ee23d7465f
commit
b6c8e09ee1
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user