mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
Revert "Mark SVM_GPU allocation as not lockable"
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
3c9dcbb1db
commit
a552d1fd65
@@ -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);
|
||||
@@ -959,36 +957,7 @@ HWTEST_F(HwHelperTest, givenLockableAllocationWhenGettingIsBlitCopyRequiredForLo
|
||||
DebugManager.flags.ForceLocalMemoryAccessMode.set(3);
|
||||
EXPECT_TRUE(helper.isBlitCopyRequiredForLocalMemory(hwInfo, graphicsAllocation));
|
||||
hwInfo.capabilityTable.blitterOperationsSupported = false;
|
||||
EXPECT_TRUE(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, 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_TRUE(helper.isBlitCopyRequiredForLocalMemory(hwInfo, graphicsAllocation));
|
||||
|
||||
graphicsAllocation.overrideMemoryPool(MemoryPool::System64KBPages);
|
||||
EXPECT_FALSE(helper.isBlitCopyRequiredForLocalMemory(hwInfo, graphicsAllocation));
|
||||
@@ -1030,7 +999,6 @@ HWTEST2_F(HwHelperTest, givenDefaultHwHelperHwWhenGettingIsBlitCopyRequiredForLo
|
||||
auto &helper = HwHelper::get(renderCoreFamily);
|
||||
MockGraphicsAllocation graphicsAllocation;
|
||||
graphicsAllocation.overrideMemoryPool(MemoryPool::LocalMemory);
|
||||
graphicsAllocation.setAllocationType(GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY);
|
||||
|
||||
EXPECT_FALSE(helper.isBlitCopyRequiredForLocalMemory(*defaultHwInfo, graphicsAllocation));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user