Revert "Mark SVM_GPU allocation as not lockable"

This reverts commit 5341d0663c.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2021-04-29 17:25:34 +02:00
committed by Compute-Runtime-Automation
parent 27c28d275e
commit c453e7fe8b
4 changed files with 5 additions and 35 deletions

View File

@@ -937,15 +937,13 @@ HWTEST_F(HwHelperTest, givenDefaultHwHelperHwWhenMinimalSIMDSizeIsQueriedThen8Is
EXPECT_EQ(8u, helper.getMinimalSIMDSize());
}
HWTEST_F(HwHelperTest, givenLockableAllocationWhenGettingIsBlitCopyRequiredForLocalMemoryThenCorrectValuesAreReturned) {
HWTEST_F(HwHelperTest, whenGettingIsBlitCopyRequiredForLocalMemoryThenCorrectValuesAreReturned) {
DebugManagerStateRestore restore{};
auto &helper = HwHelper::get(renderCoreFamily);
HardwareInfo hwInfo = *defaultHwInfo;
hwInfo.capabilityTable.blitterOperationsSupported = true;
MockGraphicsAllocation graphicsAllocation;
graphicsAllocation.setAllocationType(GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY);
EXPECT_TRUE(GraphicsAllocation::isLockable(graphicsAllocation.getAllocationType()));
graphicsAllocation.overrideMemoryPool(MemoryPool::LocalMemory);
auto expectedDefaultValue = (helper.getLocalMemoryAccessMode(hwInfo) == LocalMemoryAccessMode::CpuAccessDisallowed);
@@ -967,35 +965,6 @@ HWTEST_F(HwHelperTest, givenLockableAllocationWhenGettingIsBlitCopyRequiredForLo
EXPECT_FALSE(helper.isBlitCopyRequiredForLocalMemory(hwInfo, graphicsAllocation));
}
HWTEST_F(HwHelperTest, givenNotLockableAllocationWhenGettingIsBlitCopyRequiredForLocalMemoryThenCorrectValuesAreReturned) {
DebugManagerStateRestore restore{};
auto &helper = HwHelper::get(renderCoreFamily);
HardwareInfo hwInfo = *defaultHwInfo;
hwInfo.capabilityTable.blitterOperationsSupported = true;
MockGraphicsAllocation graphicsAllocation;
graphicsAllocation.setAllocationType(GraphicsAllocation::AllocationType::SVM_GPU);
EXPECT_FALSE(GraphicsAllocation::isLockable(graphicsAllocation.getAllocationType()));
graphicsAllocation.overrideMemoryPool(MemoryPool::LocalMemory);
EXPECT_TRUE(helper.isBlitCopyRequiredForLocalMemory(hwInfo, graphicsAllocation));
DebugManager.flags.ForceLocalMemoryAccessMode.set(0);
EXPECT_TRUE(helper.isBlitCopyRequiredForLocalMemory(hwInfo, graphicsAllocation));
DebugManager.flags.ForceLocalMemoryAccessMode.set(1);
EXPECT_TRUE(helper.isBlitCopyRequiredForLocalMemory(hwInfo, graphicsAllocation));
DebugManager.flags.ForceLocalMemoryAccessMode.set(3);
EXPECT_TRUE(helper.isBlitCopyRequiredForLocalMemory(hwInfo, graphicsAllocation));
hwInfo.capabilityTable.blitterOperationsSupported = false;
EXPECT_FALSE(helper.isBlitCopyRequiredForLocalMemory(hwInfo, graphicsAllocation));
graphicsAllocation.overrideMemoryPool(MemoryPool::System64KBPages);
EXPECT_FALSE(helper.isBlitCopyRequiredForLocalMemory(hwInfo, graphicsAllocation));
hwInfo.capabilityTable.blitterOperationsSupported = true;
EXPECT_FALSE(helper.isBlitCopyRequiredForLocalMemory(hwInfo, graphicsAllocation));
}
HWTEST_F(HwHelperTest, givenVariousDebugKeyValuesWhenGettingLocalMemoryAccessModeThenCorrectValueIsReturned) {
struct MockHwHelper : HwHelperHw<FamilyType> {
using HwHelper::getDefaultLocalMemoryAccessMode;