mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 14:02:58 +08:00
Revert "fix: propagate error createInternalHandle wddm"
This reverts commit eeddd779f0.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
05dbbcab6c
commit
0a096f1d50
@@ -16,12 +16,12 @@ int WddmAllocation::createInternalHandle(MemoryManager *memoryManager, uint32_t
|
||||
WddmMemoryManager *wddmMemoryManager = reinterpret_cast<WddmMemoryManager *>(memoryManager);
|
||||
auto status = wddmMemoryManager->createInternalNTHandle(&resourceHandle, &ntSharedHandle, this->getRootDeviceIndex());
|
||||
if (status != STATUS_SUCCESS) {
|
||||
return -1;
|
||||
return handle == 0;
|
||||
}
|
||||
ntSecureHandle = castToUint64(ntSharedHandle);
|
||||
handle = ntSecureHandle;
|
||||
}
|
||||
return handle == 0 ? -1 : 0;
|
||||
return handle == 0;
|
||||
}
|
||||
void WddmAllocation::clearInternalHandle(uint32_t handleId) {
|
||||
ntSecureHandle = 0u;
|
||||
|
||||
@@ -247,7 +247,7 @@ TEST(GraphicsAllocationTest, givenDefaultGraphicsAllocationWhenInternalHandleIsB
|
||||
TEST(GraphicsAllocationTest, givenDefaultGraphicsAllocationWhenInternalHandleIsBeingObtainedOrCreatedThenZeroIsReturned) {
|
||||
MockGraphicsAllocation graphicsAllocation;
|
||||
uint64_t handle = 0;
|
||||
EXPECT_EQ(0, graphicsAllocation.createInternalHandle(nullptr, 0u, handle));
|
||||
graphicsAllocation.createInternalHandle(nullptr, 0u, handle);
|
||||
EXPECT_EQ(0ull, handle);
|
||||
graphicsAllocation.clearInternalHandle(0u);
|
||||
}
|
||||
|
||||
@@ -734,7 +734,7 @@ TEST_F(WddmLinuxTest, givenAllocatedMemoryAndCloseInternalHandleWithoutAllocatio
|
||||
memoryManager.freeGraphicsMemoryImpl(alloc);
|
||||
}
|
||||
|
||||
TEST_F(WddmLinuxTest, givenAllocatedMemoryAndCreateInternalHandleFailedThenEmptyHandleReturned) {
|
||||
TEST_F(WddmLinuxTest, givenAllocatedMemoryAndCreateInternalHandleFailedThenEmpyHandleReturned) {
|
||||
osEnvironment->gdi->reserveGpuVirtualAddress = reserveDeviceAddressSpaceMock;
|
||||
osEnvironment->gdi->createAllocation2 = createAllocation2Mock;
|
||||
osEnvironment->gdi->mapGpuVirtualAddress = mapGpuVirtualAddressMock;
|
||||
@@ -756,7 +756,7 @@ TEST_F(WddmLinuxTest, givenAllocatedMemoryAndCreateInternalHandleFailedThenEmpty
|
||||
memoryManager.closeInternalHandle(handle, 0u, alloc);
|
||||
|
||||
memoryManager.failCreateInternalNTHandle = true;
|
||||
EXPECT_EQ(-1, alloc->createInternalHandle(&memoryManager, 0u, handle));
|
||||
EXPECT_EQ(1, alloc->createInternalHandle(&memoryManager, 0u, handle));
|
||||
|
||||
memoryManager.freeGraphicsMemoryImpl(alloc);
|
||||
}
|
||||
|
||||
@@ -397,7 +397,7 @@ TEST_F(WddmMemoryManagerAllocPathTests, GivenValidAllocationWithFailingCreateInt
|
||||
memoryManager->closeInternalHandle(handle, 0u, graphicsAllocation);
|
||||
|
||||
memoryManager->failCreateInternalNTHandle = true;
|
||||
EXPECT_EQ(-1, graphicsAllocation->createInternalHandle(memoryManager, 0u, handle));
|
||||
EXPECT_EQ(1, graphicsAllocation->createInternalHandle(memoryManager, 0u, handle));
|
||||
|
||||
memoryManager->freeGraphicsMemory(graphicsAllocation);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user