Pass root device index to MemObj::getGraphicsAllocation method

leave parameterless method in Buffer and Image classes

add method to remove graphics allocation from MultiGraphicsAllocation

Related-To: NEO-4672
Change-Id: I3020eecfabe9a16af7f36d68a74b32d3f4fc2276
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2020-06-02 13:38:13 +02:00
parent 78d07b9b37
commit 57d0967a2c
52 changed files with 228 additions and 159 deletions

View File

@ -428,7 +428,7 @@ TYPED_TEST_P(D3DTests, GivenForced32BitAddressingWhenCreatingBufferThenBufferHas
auto buffer = std::unique_ptr<Buffer>(D3DBuffer<TypeParam>::create(this->context, (D3DBufferObj *)&this->dummyD3DBuffer, CL_MEM_READ_WRITE, nullptr));
ASSERT_NE(nullptr, buffer.get());
auto *allocation = buffer->getGraphicsAllocation();
auto *allocation = buffer->getGraphicsAllocation(rootDeviceIndex);
EXPECT_NE(nullptr, allocation);
EXPECT_TRUE(allocation->is32BitAllocation());
@ -442,8 +442,8 @@ TYPED_TEST_P(D3DTests, givenD3DTexture2dWhenOclImageIsCreatedThenSharedImageAllo
auto image = std::unique_ptr<Image>(D3DTexture<TypeParam>::create2d(this->context, reinterpret_cast<D3DTexture2d *>(&this->dummyD3DTexture), CL_MEM_READ_WRITE, 7, nullptr));
ASSERT_NE(nullptr, image.get());
ASSERT_NE(nullptr, image->getGraphicsAllocation());
EXPECT_EQ(GraphicsAllocation::AllocationType::SHARED_IMAGE, image->getGraphicsAllocation()->getAllocationType());
ASSERT_NE(nullptr, image->getGraphicsAllocation(rootDeviceIndex));
EXPECT_EQ(GraphicsAllocation::AllocationType::SHARED_IMAGE, image->getGraphicsAllocation(rootDeviceIndex)->getAllocationType());
}
TYPED_TEST_P(D3DTests, givenD3DTexture3dWhenOclImageIsCreatedThenSharedImageAllocationTypeIsSet) {
@ -458,8 +458,8 @@ TYPED_TEST_P(D3DTests, givenD3DTexture3dWhenOclImageIsCreatedThenSharedImageAllo
auto image = std::unique_ptr<Image>(D3DTexture<TypeParam>::create3d(this->context, reinterpret_cast<D3DTexture3d *>(&this->dummyD3DTexture), CL_MEM_READ_WRITE, 1, nullptr));
ASSERT_NE(nullptr, image.get());
ASSERT_NE(nullptr, image->getGraphicsAllocation());
EXPECT_EQ(GraphicsAllocation::AllocationType::SHARED_IMAGE, image->getGraphicsAllocation()->getAllocationType());
ASSERT_NE(nullptr, image->getGraphicsAllocation(rootDeviceIndex));
EXPECT_EQ(GraphicsAllocation::AllocationType::SHARED_IMAGE, image->getGraphicsAllocation(rootDeviceIndex)->getAllocationType());
}
REGISTER_TYPED_TEST_CASE_P(D3DTests,