mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 23:03:02 +08:00
feat(zebin): Add support for ELF section type SHT_NOBITS
This commit adds support for parsing SHT_NOBITS zebin's ELF sections (containing global/constant zero-initialized data). Related-To: NEO-7196 Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
31154dc20b
commit
fa03aa9a40
@@ -2755,13 +2755,13 @@ TEST(MemoryManagerTest, whenMemoryManagerReturnsNullptrThenAllocateGlobalsSurfac
|
||||
linkerInput.traits.exportsGlobalConstants = true;
|
||||
linkerInput.traits.exportsGlobalVariables = true;
|
||||
memoryManager->recentlyPassedDeviceBitfield = {};
|
||||
GraphicsAllocation *allocation = allocateGlobalsSurface(nullptr, device.getDevice(), 1024, false, &linkerInput, nullptr);
|
||||
GraphicsAllocation *allocation = allocateGlobalsSurface(nullptr, device.getDevice(), 1024, 0u, false, &linkerInput, nullptr);
|
||||
EXPECT_EQ(nullptr, allocation);
|
||||
EXPECT_EQ(deviceBitfield, memoryManager->recentlyPassedDeviceBitfield);
|
||||
|
||||
auto svmAllocsManager = std::make_unique<SVMAllocsManager>(device.getMemoryManager(), false);
|
||||
memoryManager->recentlyPassedDeviceBitfield = {};
|
||||
allocation = allocateGlobalsSurface(svmAllocsManager.get(), device.getDevice(), 1024, false, &linkerInput, nullptr);
|
||||
allocation = allocateGlobalsSurface(svmAllocsManager.get(), device.getDevice(), 1024, 0u, false, &linkerInput, nullptr);
|
||||
EXPECT_EQ(nullptr, allocation);
|
||||
EXPECT_EQ(deviceBitfield, memoryManager->recentlyPassedDeviceBitfield);
|
||||
}
|
||||
@@ -2798,7 +2798,7 @@ TEST_F(MemoryManagerMultiRootDeviceTests, WhenAllocatingGlobalSurfaceThenItHasCo
|
||||
WhiteBox<NEO::LinkerInput> linkerInput;
|
||||
linkerInput.traits.exportsGlobalConstants = true;
|
||||
linkerInput.traits.exportsGlobalVariables = true;
|
||||
GraphicsAllocation *allocation = allocateGlobalsSurface(context->svmAllocsManager, device1->getDevice(), initData.size(), false, &linkerInput, initData.data());
|
||||
GraphicsAllocation *allocation = allocateGlobalsSurface(context->svmAllocsManager, device1->getDevice(), initData.size(), 0u, false, &linkerInput, initData.data());
|
||||
|
||||
ASSERT_NE(nullptr, allocation);
|
||||
EXPECT_EQ(expectedRootDeviceIndex, allocation->getRootDeviceIndex());
|
||||
|
||||
Reference in New Issue
Block a user