mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-10 12:53:42 +08:00
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:
@ -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,
|
||||
|
Reference in New Issue
Block a user