mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +08:00
[4/n] Improve indirect allocations handling.
Add memory manager interfaces to obtain the status. Only support when VmBind is supported. Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
af7a475cb0
commit
592eb4607e
@@ -228,6 +228,10 @@ class MemoryManager {
|
||||
latestContextId = std::numeric_limits<uint32_t>::max();
|
||||
}
|
||||
|
||||
virtual bool allowIndirectAllocationsAsPack(uint32_t rootDeviceIndex) {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected:
|
||||
bool getAllocationData(AllocationData &allocationData, const AllocationProperties &properties, const void *hostPtr, const StorageInfo &storageInfo);
|
||||
static void overrideAllocationData(AllocationData &allocationData, const AllocationProperties &properties);
|
||||
|
||||
@@ -80,6 +80,9 @@ class DrmMemoryManager : public MemoryManager {
|
||||
DrmAllocation *createUSMHostAllocationFromSharedHandle(osHandle handle, const AllocationProperties &properties, bool hasMappedPtr);
|
||||
void releaseDeviceSpecificMemResources(uint32_t rootDeviceIndex) override;
|
||||
void createDeviceSpecificMemResources(uint32_t rootDeviceIndex) override;
|
||||
bool allowIndirectAllocationsAsPack(uint32_t rootDeviceIndex) override {
|
||||
return this->getDrm(rootDeviceIndex).isVmBindAvailable();
|
||||
}
|
||||
|
||||
protected:
|
||||
BufferObject *findAndReferenceSharedBufferObject(int boHandle, uint32_t rootDeviceIndex);
|
||||
|
||||
Reference in New Issue
Block a user