mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-26 15:03:02 +08:00
fix: dont reset cpu ptr in tbx mode during virtual map
Related-To: HSD-18038484849 Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
8a7923c6ee
commit
18c4f0b54f
@@ -82,6 +82,9 @@ class GraphicsAllocation : public IDNode<GraphicsAllocation> {
|
||||
this->cpuPtr = cpuPtr;
|
||||
this->gpuAddress = canonizedGpuAddress;
|
||||
}
|
||||
void setGpuPtr(uint64_t canonizedGpuAddress) {
|
||||
this->gpuAddress = canonizedGpuAddress;
|
||||
}
|
||||
size_t getUnderlyingBufferSize() const { return size; }
|
||||
void setSize(size_t size) { this->size = size; }
|
||||
|
||||
|
||||
@@ -417,12 +417,12 @@ void OsAgnosticMemoryManager::cleanOsHandles(OsHandleStorage &handleStorage, uin
|
||||
}
|
||||
|
||||
void OsAgnosticMemoryManager::unMapPhysicalToVirtualMemory(GraphicsAllocation *physicalAllocation, uint64_t gpuRange, size_t bufferSize, OsContext *osContext, uint32_t rootDeviceIndex) {
|
||||
physicalAllocation->setCpuPtrAndGpuAddress(nullptr, 0u);
|
||||
physicalAllocation->setGpuPtr(0u);
|
||||
physicalAllocation->setReservedAddressRange(nullptr, 0u);
|
||||
}
|
||||
|
||||
bool OsAgnosticMemoryManager::mapPhysicalToVirtualMemory(GraphicsAllocation *physicalAllocation, uint64_t gpuRange, size_t bufferSize) {
|
||||
physicalAllocation->setCpuPtrAndGpuAddress(nullptr, gpuRange);
|
||||
physicalAllocation->setGpuPtr(gpuRange);
|
||||
physicalAllocation->setReservedAddressRange(reinterpret_cast<void *>(gpuRange), bufferSize);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user