Add support for multiple buffer objects in drm allocation

Resolves: NEO-3364

Change-Id: I05e8b9a05328298dcc578d62b2aa7b56ffbf4ddc
Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
Milczarek, Slawomir
2019-09-01 21:36:15 +02:00
parent cc8fb911a3
commit 093bc4da9c
24 changed files with 293 additions and 145 deletions

View File

@@ -159,6 +159,13 @@ TEST(DrmBufferObjectSimpleTest, givenInvalidBoWhenPinIsCalledThenErrorIsReturned
EXPECT_EQ(EFAULT, ret);
}
TEST(DrmBufferObjectSimpleTest, givenBufferObjectWhenConstructedWithASizeThenTheSizeIsInitialized) {
std::unique_ptr<DrmMockCustom> drmMock(new DrmMockCustom);
std::unique_ptr<BufferObject> bo(new BufferObject(drmMock.get(), 1, 0x1000));
EXPECT_EQ(0x1000u, bo->peekSize());
}
TEST(DrmBufferObjectSimpleTest, givenArrayOfBosWhenPinnedThenAllBosArePinned) {
std::unique_ptr<uint32_t[]> buff(new uint32_t[256]);
std::unique_ptr<DrmMockCustom> mock(new DrmMockCustom);