Command container appends BB_END on cmd buffer allocation end

When linear stream created for command container has not enough space
for command and BB_END it will program BB_END and allocate new command
buffer allocation. Pointer returned from getSpace in this case will
return storage from new command buffer allocation.

Related-To: NEO-5707

Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
Maciej Plewka
2022-01-12 16:57:42 +00:00
committed by Compute-Runtime-Automation
parent 92316c48f2
commit 9d8ce7aace
31 changed files with 262 additions and 306 deletions

View File

@ -1449,3 +1449,13 @@ HWTEST2_F(HwHelperTest, givenHwInfoConfigWhenCheckingForceNonGpuCoherencyWAThenF
EXPECT_FALSE(hwHelper.forceNonGpuCoherencyWA(true));
EXPECT_FALSE(hwHelper.forceNonGpuCoherencyWA(false));
}
HWTEST_F(HwHelperTest, GivenHwInfoWhenGetBatchBufferEndSizeCalledThenCorrectSizeReturned) {
const auto &hwHelper = HwHelper::get(renderCoreFamily);
EXPECT_EQ(hwHelper.getBatchBufferEndSize(), sizeof(typename FamilyType::MI_BATCH_BUFFER_END));
}
HWTEST_F(HwHelperTest, GivenHwInfoWhenGetBatchBufferEndReferenceCalledThenCorrectPtrReturned) {
const auto &hwHelper = HwHelper::get(renderCoreFamily);
EXPECT_EQ(hwHelper.getBatchBufferEndReference(), reinterpret_cast<const void *>(&FamilyType::cmdInitBatchBufferEnd));
}