mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 06:23:01 +08:00
Fix indexing of allocated bos in populateOsHandles
- when fragment is already allocated, allcoating is skipped and index is incremented, separate index must be used for allocated bos array Change-Id: I856a99ba4ebdad5375829a43d721c7e1490b18d3
This commit is contained in:
@@ -58,7 +58,7 @@ class BufferObject {
|
||||
|
||||
bool setTiling(uint32_t mode, uint32_t stride);
|
||||
|
||||
int pin(BufferObject *boToPin[], size_t numberOfBos);
|
||||
MOCKABLE_VIRTUAL int pin(BufferObject *boToPin[], size_t numberOfBos);
|
||||
|
||||
int exec(uint32_t used, size_t startOffset, unsigned int flags, bool requiresCoherency = false, bool lowPriority = false);
|
||||
|
||||
|
||||
@@ -492,7 +492,7 @@ MemoryManager::AllocationStatus DrmMemoryManager::populateOsHandles(OsHandleStor
|
||||
return AllocationStatus::Error;
|
||||
}
|
||||
|
||||
allocatedBos[i] = handleStorage.fragmentStorageData[i].osHandleStorage->bo;
|
||||
allocatedBos[numberOfBosAllocated] = handleStorage.fragmentStorageData[i].osHandleStorage->bo;
|
||||
numberOfBosAllocated++;
|
||||
|
||||
hostPtrManager.storeFragment(handleStorage.fragmentStorageData[i]);
|
||||
|
||||
Reference in New Issue
Block a user