Use std::move in Buffer at MultiGraphicsAllocation objects

Related-To: NEO-4672
Change-Id: I489df05a6ad48678c9aca7a36898dd8a2ae6b484
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
Krzysztof Gibala
2020-07-16 23:56:26 +02:00
committed by sys_ocldev
parent 47df60c067
commit a77b5458e5
7 changed files with 12 additions and 16 deletions

View File

@@ -122,9 +122,6 @@ HWTEST_F(AUBReadBuffer, reserveCanonicalGpuAddress) {
0xFFFF800400001000,
sizeof(srcMemory),
MemoryPool::MemoryNull);
auto multiGraphicsAllocation = MultiGraphicsAllocation(context.getDevice(0)->getRootDeviceIndex());
multiGraphicsAllocation.addAllocation(srcAllocation);
std::unique_ptr<Buffer> srcBuffer(Buffer::createBufferHw(
&context,
MemoryPropertiesHelper::createMemoryProperties(CL_MEM_USE_HOST_PTR, 0, 0, &context.getDevice(0)->getDevice()),
@@ -133,7 +130,7 @@ HWTEST_F(AUBReadBuffer, reserveCanonicalGpuAddress) {
sizeof(srcMemory),
srcAllocation->getUnderlyingBuffer(),
srcMemory,
multiGraphicsAllocation,
GraphicsAllocationHelper::toMultiGraphicsAllocation(srcAllocation),
false,
false,
false));

View File

@@ -92,11 +92,9 @@ struct MultipleMapBufferTest : public ClDeviceFixture, public ::testing::Test {
std::unique_ptr<MockBuffer<FamilyType>> createMockBuffer(bool mapOnGpu) {
MemoryProperties memoryProperties;
auto mockAlloc = pDevice->getMemoryManager()->allocateGraphicsMemoryWithProperties(MockAllocationProperties{pDevice->getRootDeviceIndex(), MemoryConstants::pageSize});
auto multiGraphicsAllocation = MultiGraphicsAllocation(context->getDevice(0)->getRootDeviceIndex());
multiGraphicsAllocation.addAllocation(mockAlloc);
auto buffer = new MockBuffer<FamilyType>(context, memoryProperties, 0, 0, 1024, mockAlloc->getUnderlyingBuffer(), mockAlloc->getUnderlyingBuffer(),
multiGraphicsAllocation, false, false, false);
GraphicsAllocationHelper::toMultiGraphicsAllocation(mockAlloc), false, false, false);
if (mapOnGpu) {
buffer->setSharingHandler(new SharingHandler());
}