@@ -48,7 +48,7 @@ GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemoryForImageImpl(const
4848 auto allocation = std::make_unique<WddmAllocation>(nullptr , allocationData.imgInfo ->size , nullptr , MemoryPool::SystemCpuInaccessible, false );
4949 allocation->gmm = gmm.get ();
5050 allocation->origin = allocationData.allocationOrigin ;
51- if (!WddmMemoryManager:: createWddmAllocation (allocation.get ())) {
51+ if (!createWddmAllocation (allocation.get ())) {
5252 return nullptr ;
5353 }
5454
@@ -60,11 +60,10 @@ GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemoryForImageImpl(const
6060
6161GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemory64kb (AllocationData allocationData) {
6262 size_t sizeAligned = alignUp (allocationData.size , MemoryConstants::pageSize64k);
63- Gmm *gmm = nullptr ;
6463
6564 auto wddmAllocation = std::make_unique<WddmAllocation>(nullptr , sizeAligned, nullptr , MemoryPool::System64KBPages, !!allocationData.flags .multiOsContextCapable );
6665
67- gmm = new Gmm (nullptr , sizeAligned, false , allocationData.flags .preferRenderCompressed , true , {});
66+ auto gmm = new Gmm (nullptr , sizeAligned, false , allocationData.flags .preferRenderCompressed , true , {});
6867 wddmAllocation->gmm = gmm;
6968
7069 if (!wddm->createAllocation64k (wddmAllocation.get ())) {
@@ -77,7 +76,7 @@ GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemory64kb(AllocationData
7776 // 64kb map is not needed
7877 auto status = wddm->mapGpuVirtualAddress (wddmAllocation.get (), cpuPtr);
7978 DEBUG_BREAK_IF (!status);
80- wddmAllocation->setCpuPtrAndGpuAddress (cpuPtr, ( uint64_t ) wddmAllocation->gpuPtr );
79+ wddmAllocation->setCpuPtrAndGpuAddress (cpuPtr, wddmAllocation->gpuPtr );
8180
8281 DebugManager.logAllocation (wddmAllocation.get ());
8382 return wddmAllocation.release ();
@@ -280,15 +279,15 @@ void WddmMemoryManager::removeAllocationFromHostPtrManager(GraphicsAllocation *g
280279
281280void *WddmMemoryManager::lockResourceImpl (GraphicsAllocation &graphicsAllocation) {
282281 return wddm->lockResource (static_cast <WddmAllocation &>(graphicsAllocation));
283- };
282+ }
284283void WddmMemoryManager::unlockResourceImpl (GraphicsAllocation &graphicsAllocation) {
285284 auto &wddmAllocation = static_cast <WddmAllocation &>(graphicsAllocation);
286285 wddm->unlockResource (wddmAllocation);
287286 if (wddmAllocation.needsMakeResidentBeforeLock ) {
288287 auto evictionStatus = wddm->evictTemporaryResource (wddmAllocation);
289288 DEBUG_BREAK_IF (evictionStatus == EvictionStatus::FAILED);
290289 }
291- };
290+ }
292291
293292void WddmMemoryManager::freeGraphicsMemoryImpl (GraphicsAllocation *gfxAllocation) {
294293 WddmAllocation *input = static_cast <WddmAllocation *>(gfxAllocation);
@@ -450,7 +449,7 @@ uint64_t WddmMemoryManager::getMaxApplicationAddress() {
450449}
451450
452451uint64_t WddmMemoryManager::getInternalHeapBaseAddress () {
453- return this -> wddm ->getGfxPartition ().Heap32 [static_cast <uint32_t >(internalHeapIndex)].Base ;
452+ return wddm->getGfxPartition ().Heap32 [static_cast <uint32_t >(internalHeapIndex)].Base ;
454453}
455454
456455bool WddmMemoryManager::mapAuxGpuVA (GraphicsAllocation *graphicsAllocation) {
0 commit comments