mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 21:42:53 +08:00
Service read only memory passed as host_ptr
- read only memory cannot be used for allocation, Oses cannot create graphics alocation for such memory - if memory allocation fails for host_ptr passed to enqueueWrite calls, then try doing new allocation and copy host_ptr on cpu Change-Id: I415a4673ae1319ea8f77e53bd8fba7489fe85218
This commit is contained in:
@@ -336,7 +336,7 @@ bool WddmMemoryManager::validateAllocation(WddmAllocation *alloc) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool WddmMemoryManager::populateOsHandles(OsHandleStorage &handleStorage) {
|
||||
MemoryManager::AllocationStatus WddmMemoryManager::populateOsHandles(OsHandleStorage &handleStorage) {
|
||||
for (unsigned int i = 0; i < max_fragments_count; i++) {
|
||||
// If no fragment is present it means it already exists.
|
||||
if (!handleStorage.fragmentStorageData[i].osHandleStorage && handleStorage.fragmentStorageData[i].cpuPtr) {
|
||||
@@ -348,7 +348,7 @@ bool WddmMemoryManager::populateOsHandles(OsHandleStorage &handleStorage) {
|
||||
}
|
||||
}
|
||||
wddm->createAllocationsAndMapGpuVa(handleStorage);
|
||||
return true;
|
||||
return AllocationStatus::Success;
|
||||
}
|
||||
|
||||
void WddmMemoryManager::cleanOsHandles(OsHandleStorage &handleStorage) {
|
||||
|
||||
Reference in New Issue
Block a user