mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-10 12:53:42 +08:00
Revert "Fail when handle cannot be obtain for an allocation"
This reverts commit 4391ad21bb
.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
4391ad21bb
commit
565d44e59c
@ -481,9 +481,7 @@ TEST_F(WddmTestWithMockGdiDll, givenShareableAllocationWhenCreateThenSharedHandl
|
||||
allocation.setDefaultGmm(gmm.get());
|
||||
auto status = memoryManager.createGpuAllocationsWithRetry(&allocation);
|
||||
EXPECT_TRUE(status);
|
||||
uint64_t handle = 0;
|
||||
allocation.peekInternalHandle(&memoryManager, handle);
|
||||
EXPECT_NE(0u, handle);
|
||||
EXPECT_NE(0u, allocation.peekInternalHandle(&memoryManager));
|
||||
}
|
||||
|
||||
TEST(WddmAllocationTest, whenAllocationIsShareableThenSharedHandleToModifyIsSharedHandleOfAllocation) {
|
||||
@ -491,10 +489,7 @@ TEST(WddmAllocationTest, whenAllocationIsShareableThenSharedHandleToModifyIsShar
|
||||
auto sharedHandleToModify = allocation.getSharedHandleToModify();
|
||||
EXPECT_NE(nullptr, sharedHandleToModify);
|
||||
*sharedHandleToModify = 1234u;
|
||||
uint64_t handle = 0;
|
||||
int ret = allocation.peekInternalHandle(nullptr, handle);
|
||||
EXPECT_EQ(ret, 0);
|
||||
EXPECT_EQ(*sharedHandleToModify, handle);
|
||||
EXPECT_EQ(*sharedHandleToModify, allocation.peekInternalHandle(nullptr));
|
||||
}
|
||||
|
||||
TEST(WddmAllocationTest, whenAllocationIsNotShareableThenItDoesntReturnSharedHandleToModify) {
|
||||
|
@ -75,9 +75,7 @@ TEST_F(WddmMemoryManagerSimpleTest, givenShareableAllocationWhenAllocateInDevice
|
||||
EXPECT_EQ(MemoryManager::AllocationStatus::Success, status);
|
||||
EXPECT_EQ(MemoryPool::LocalMemory, allocation->getMemoryPool());
|
||||
EXPECT_EQ(0u, allocation->getDefaultGmm()->resourceParams.Flags.Info.NonLocalOnly);
|
||||
uint64_t handle = 0;
|
||||
allocation->peekInternalHandle(memoryManager.get(), handle);
|
||||
EXPECT_NE(handle, 0u);
|
||||
EXPECT_NE(allocation->peekInternalHandle(memoryManager.get()), 0u);
|
||||
|
||||
EXPECT_EQ(1u, allocation->getDefaultGmm()->resourceParams.Flags.Info.LocalOnly);
|
||||
EXPECT_EQ(1u, allocation->getDefaultGmm()->resourceParams.Flags.Info.NotLockable);
|
||||
@ -104,9 +102,7 @@ TEST_F(WddmMemoryManagerSimpleTest, givenShareableAllocationWhenAllocateGraphics
|
||||
EXPECT_NE(nullptr, allocation);
|
||||
EXPECT_EQ(MemoryPool::LocalMemory, allocation->getMemoryPool());
|
||||
EXPECT_EQ(0u, allocation->getDefaultGmm()->resourceParams.Flags.Info.NonLocalOnly);
|
||||
uint64_t handle = 0;
|
||||
allocation->peekInternalHandle(memoryManager.get(), handle);
|
||||
EXPECT_NE(handle, 0u);
|
||||
EXPECT_NE(allocation->peekInternalHandle(memoryManager.get()), 0u);
|
||||
|
||||
EXPECT_EQ(1u, allocation->getDefaultGmm()->resourceParams.Flags.Info.LocalOnly);
|
||||
EXPECT_EQ(1u, allocation->getDefaultGmm()->resourceParams.Flags.Info.NotLockable);
|
||||
|
Reference in New Issue
Block a user