Add debug variable to disable host ptr tracking.

Change-Id: Ifc866e06a4519e7590d40d8ad136147ecc80225d
This commit is contained in:
Piotr Fusik
2019-01-10 11:10:58 +01:00
committed by sys_ocldev
parent 936af1b5a8
commit 30dd15144c
10 changed files with 54 additions and 16 deletions

View File

@@ -416,7 +416,7 @@ void WddmMemoryManager::cleanOsHandles(OsHandleStorage &handleStorage) {
}
}
void WddmMemoryManager::obtainGpuAddresFromFragments(WddmAllocation *allocation, OsHandleStorage &handleStorage) {
void WddmMemoryManager::obtainGpuAddressFromFragments(WddmAllocation *allocation, OsHandleStorage &handleStorage) {
if (this->force32bitAllocations && (handleStorage.fragmentCount > 0)) {
auto hostPtr = allocation->getUnderlyingBuffer();
auto fragment = hostPtrManager->getFragment(hostPtr);
@@ -436,7 +436,7 @@ void WddmMemoryManager::obtainGpuAddresFromFragments(WddmAllocation *allocation,
GraphicsAllocation *WddmMemoryManager::createGraphicsAllocation(OsHandleStorage &handleStorage, size_t hostPtrSize, const void *hostPtr) {
auto allocation = new WddmAllocation(const_cast<void *>(hostPtr), hostPtrSize, nullptr, MemoryPool::System4KBPages, getOsContextCount(), false);
allocation->fragmentsStorage = handleStorage;
obtainGpuAddresFromFragments(allocation, handleStorage);
obtainGpuAddressFromFragments(allocation, handleStorage);
return allocation;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017-2018 Intel Corporation
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -52,7 +52,7 @@ class WddmMemoryManager : public MemoryManager {
OsContext *getRegisteredOsContext(uint32_t osContextId) { return registeredOsContexts[osContextId]; }
void obtainGpuAddresFromFragments(WddmAllocation *allocation, OsHandleStorage &handleStorage);
void obtainGpuAddressFromFragments(WddmAllocation *allocation, OsHandleStorage &handleStorage);
GraphicsAllocation *createGraphicsAllocation(OsHandleStorage &handleStorage, size_t hostPtrSize, const void *hostPtr) override;