mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Add padding for ISA allocations
Related-To: NEO-5771 Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
0d05ef2a3c
commit
bb9d902899
@ -45,7 +45,8 @@ TEST(KernelInfoTest, givenKernelInfoWhenCreateKernelAllocationThenCopyWholeKerne
|
||||
EXPECT_TRUE(retVal);
|
||||
auto allocation = kernelInfo.kernelAllocation;
|
||||
EXPECT_EQ(0, memcmp(allocation->getUnderlyingBuffer(), heap, heapSize));
|
||||
EXPECT_EQ(heapSize, allocation->getUnderlyingBufferSize());
|
||||
size_t isaPadding = HwHelper::get(defaultHwInfo->platform.eRenderCoreFamily).getPaddingForISAAllocation();
|
||||
EXPECT_EQ(allocation->getUnderlyingBufferSize(), heapSize + isaPadding);
|
||||
device->getMemoryManager()->checkGpuUsageAndDestroyGraphicsAllocations(allocation);
|
||||
}
|
||||
|
||||
|
@ -579,7 +579,9 @@ TEST_F(ProgramFromBinaryTest, givenProgramWhenItIsBeingBuildThenItContainsGraphi
|
||||
auto graphicsAllocation = kernelInfo->getGraphicsAllocation();
|
||||
ASSERT_NE(nullptr, graphicsAllocation);
|
||||
EXPECT_TRUE(graphicsAllocation->is32BitAllocation());
|
||||
EXPECT_EQ(graphicsAllocation->getUnderlyingBufferSize(), kernelInfo->heapInfo.KernelHeapSize);
|
||||
auto &hwHelper = NEO::HwHelper::get(defaultHwInfo->platform.eRenderCoreFamily);
|
||||
size_t isaPadding = hwHelper.getPaddingForISAAllocation();
|
||||
EXPECT_EQ(graphicsAllocation->getUnderlyingBufferSize(), kernelInfo->heapInfo.KernelHeapSize + isaPadding);
|
||||
|
||||
auto kernelIsa = graphicsAllocation->getUnderlyingBuffer();
|
||||
EXPECT_NE(kernelInfo->heapInfo.pKernelHeap, kernelIsa);
|
||||
|
Reference in New Issue
Block a user