mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
fix: Set vmbind user fence when makeMemoryResident
Related-To: NEO-11977, GSD-10293 Signed-off-by: Chandio, Bibrak Qamar <bibrak.qamar.chandio@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
18d7a22861
commit
7149743162
@@ -575,7 +575,7 @@ Buffer *Buffer::create(Context *context,
|
||||
auto device = context->getDevice(deviceNum);
|
||||
auto graphicsAllocation = pBuffer->getGraphicsAllocation(device->getRootDeviceIndex());
|
||||
auto rootDeviceEnvironment = pBuffer->executionEnvironment->rootDeviceEnvironments[device->getRootDeviceIndex()].get();
|
||||
rootDeviceEnvironment->memoryOperationsInterface->makeResident(&device->getDevice(), ArrayRef<GraphicsAllocation *>(&graphicsAllocation, 1), false);
|
||||
rootDeviceEnvironment->memoryOperationsInterface->makeResident(&device->getDevice(), ArrayRef<GraphicsAllocation *>(&graphicsAllocation, 1), false, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ struct WddmMemoryOperationsHandlerTest : public WddmTest {
|
||||
|
||||
TEST_F(WddmMemoryOperationsHandlerTest, givenRegularAllocationWhenMakingResidentAllocationThenMakeResidentIsCalledAndAllocationIsMarkedAsExplicitlyResident) {
|
||||
wddmAllocation->setExplicitlyMadeResident(false);
|
||||
EXPECT_EQ(wddmMemoryOperationsHandler->makeResident(nullptr, ArrayRef<GraphicsAllocation *>(&allocationPtr, 1), false), MemoryOperationsStatus::success);
|
||||
EXPECT_EQ(wddmMemoryOperationsHandler->makeResident(nullptr, ArrayRef<GraphicsAllocation *>(&allocationPtr, 1), false, false), MemoryOperationsStatus::success);
|
||||
EXPECT_EQ(wddmMemoryOperationsHandler->isResident(nullptr, *wddmAllocation), MemoryOperationsStatus::success);
|
||||
EXPECT_TRUE(wddmAllocation->isExplicitlyMadeResident());
|
||||
}
|
||||
@@ -67,7 +67,7 @@ TEST_F(WddmMemoryOperationsHandlerTest, givenFragmentedAllocationWhenMakingResid
|
||||
allocationPtr = wddmFragmentedAllocation.get();
|
||||
allocationPtr->setExplicitlyMadeResident(false);
|
||||
|
||||
EXPECT_EQ(wddmMemoryOperationsHandler->makeResident(nullptr, ArrayRef<GraphicsAllocation *>(&allocationPtr, 1), false), MemoryOperationsStatus::success);
|
||||
EXPECT_EQ(wddmMemoryOperationsHandler->makeResident(nullptr, ArrayRef<GraphicsAllocation *>(&allocationPtr, 1), false, false), MemoryOperationsStatus::success);
|
||||
EXPECT_EQ(wddmMemoryOperationsHandler->isResident(nullptr, *wddmFragmentedAllocation), MemoryOperationsStatus::success);
|
||||
EXPECT_TRUE(allocationPtr->isExplicitlyMadeResident());
|
||||
}
|
||||
@@ -78,7 +78,7 @@ TEST_F(WddmMemoryOperationsHandlerTest, givenVariousAllocationsWhenMakingResiden
|
||||
allocation->setExplicitlyMadeResident(false);
|
||||
}
|
||||
|
||||
EXPECT_EQ(wddmMemoryOperationsHandler->makeResident(nullptr, ArrayRef<GraphicsAllocation *>(allocationData), false), MemoryOperationsStatus::success);
|
||||
EXPECT_EQ(wddmMemoryOperationsHandler->makeResident(nullptr, ArrayRef<GraphicsAllocation *>(allocationData), false, false), MemoryOperationsStatus::success);
|
||||
EXPECT_EQ(wddmMemoryOperationsHandler->isResident(nullptr, *wddmAllocation), MemoryOperationsStatus::success);
|
||||
EXPECT_EQ(wddmMemoryOperationsHandler->isResident(nullptr, *wddmFragmentedAllocation), MemoryOperationsStatus::success);
|
||||
|
||||
@@ -91,7 +91,7 @@ TEST_F(WddmMemoryOperationsHandlerTest, givenRegularAllocationWhenEvictingReside
|
||||
wddm->callBaseEvict = true;
|
||||
allocationPtr->setExplicitlyMadeResident(false);
|
||||
|
||||
EXPECT_EQ(wddmMemoryOperationsHandler->makeResident(nullptr, ArrayRef<GraphicsAllocation *>(&allocationPtr, 1), false), MemoryOperationsStatus::success);
|
||||
EXPECT_EQ(wddmMemoryOperationsHandler->makeResident(nullptr, ArrayRef<GraphicsAllocation *>(&allocationPtr, 1), false, false), MemoryOperationsStatus::success);
|
||||
EXPECT_TRUE(allocationPtr->isExplicitlyMadeResident());
|
||||
|
||||
EXPECT_EQ(wddmMemoryOperationsHandler->evict(nullptr, *wddmAllocation), MemoryOperationsStatus::success);
|
||||
@@ -105,7 +105,7 @@ TEST_F(WddmMemoryOperationsHandlerTest, givenFragmentedAllocationWhenEvictingRes
|
||||
allocationPtr = wddmFragmentedAllocation.get();
|
||||
allocationPtr->setExplicitlyMadeResident(false);
|
||||
|
||||
EXPECT_EQ(wddmMemoryOperationsHandler->makeResident(nullptr, ArrayRef<GraphicsAllocation *>(&allocationPtr, 1), false), MemoryOperationsStatus::success);
|
||||
EXPECT_EQ(wddmMemoryOperationsHandler->makeResident(nullptr, ArrayRef<GraphicsAllocation *>(&allocationPtr, 1), false, false), MemoryOperationsStatus::success);
|
||||
EXPECT_TRUE(allocationPtr->isExplicitlyMadeResident());
|
||||
|
||||
EXPECT_EQ(wddmMemoryOperationsHandler->evict(nullptr, *wddmFragmentedAllocation), MemoryOperationsStatus::success);
|
||||
@@ -119,7 +119,7 @@ TEST_F(WddmMemoryOperationsHandlerTest, givenVariousAllocationsWhenEvictingResid
|
||||
allocation->setExplicitlyMadeResident(false);
|
||||
}
|
||||
wddm->evictResult.called = 0;
|
||||
EXPECT_EQ(wddmMemoryOperationsHandler->makeResident(nullptr, ArrayRef<GraphicsAllocation *>(allocationData), false), MemoryOperationsStatus::success);
|
||||
EXPECT_EQ(wddmMemoryOperationsHandler->makeResident(nullptr, ArrayRef<GraphicsAllocation *>(allocationData), false, false), MemoryOperationsStatus::success);
|
||||
EXPECT_TRUE(wddmAllocation->isExplicitlyMadeResident());
|
||||
EXPECT_TRUE(wddmFragmentedAllocation->isExplicitlyMadeResident());
|
||||
|
||||
@@ -143,7 +143,7 @@ TEST_F(WddmMemoryOperationsHandlerTest, givenVariousAllocationsWhenFreeResidentA
|
||||
allocation->setExplicitlyMadeResident(false);
|
||||
}
|
||||
wddm->evictResult.called = 0;
|
||||
EXPECT_EQ(wddmMemoryOperationsHandler->makeResident(nullptr, ArrayRef<GraphicsAllocation *>(allocationData), false), MemoryOperationsStatus::success);
|
||||
EXPECT_EQ(wddmMemoryOperationsHandler->makeResident(nullptr, ArrayRef<GraphicsAllocation *>(allocationData), false, false), MemoryOperationsStatus::success);
|
||||
EXPECT_TRUE(wddmAllocation->isExplicitlyMadeResident());
|
||||
EXPECT_TRUE(wddmFragmentedAllocation->isExplicitlyMadeResident());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user