Setting the right handle value in fragment

Change-Id: Idcbdce5fc686360f252c8db0423ae77d9155702e
This commit is contained in:
Koska, Andrzej
2018-06-15 15:44:28 +02:00
committed by sys_ocldev
parent eb1b5ded9c
commit e15c2b899f
2 changed files with 2 additions and 2 deletions

View File

@ -257,7 +257,7 @@ void WddmMemoryManager::addAllocationToHostPtrManager(GraphicsAllocation *gfxAll
fragment.osInternalStorage = new OsHandle();
fragment.osInternalStorage->gpuPtr = gfxAllocation->getGpuAddress();
fragment.osInternalStorage->handle = gfxAllocation->peekSharedHandle();
fragment.osInternalStorage->handle = wddmMemory->handle;
fragment.osInternalStorage->gmm = gfxAllocation->gmm;
fragment.residency = &wddmMemory->getResidencyData();
hostPtrManager.storeFragment(fragment);

View File

@ -96,7 +96,7 @@ TEST_F(WddmMemoryManagerTest, GivenGraphicsAllocationWhenAddAndRemoveAllocationT
EXPECT_NE(fragment->osInternalStorage, nullptr);
EXPECT_EQ(fragment->osInternalStorage->gmm, gfxAllocation.gmm);
EXPECT_NE(fragment->osInternalStorage->gpuPtr, 0ULL);
EXPECT_EQ(fragment->osInternalStorage->handle, gfxAllocation.peekSharedHandle());
EXPECT_EQ(fragment->osInternalStorage->handle, gfxAllocation.handle);
EXPECT_NE(fragment->residency, nullptr);
FragmentStorage fragmentStorage = {};