mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 14:02:58 +08:00
Choose Standard or Standard64 heap depending on 64KB suitablity of resource
Change-Id: I633b1bef1cdef2c5149909c997adc85434bcaf73 Signed-off-by: Jablonski, Mateusz <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
65d706bdc3
commit
9e7c30cb06
@@ -65,6 +65,8 @@ class GmmResourceInfo {
|
||||
|
||||
MOCKABLE_VIRTUAL uint64_t getUnifiedAuxSurfaceOffset(GMM_UNIFIED_AUX_TYPE auxType) { return resourceInfo->GetUnifiedAuxSurfaceOffset(auxType); }
|
||||
|
||||
MOCKABLE_VIRTUAL bool is64KBPageSuitable() const { return resourceInfo->Is64KBPageSuitable(); }
|
||||
|
||||
MOCKABLE_VIRTUAL GMM_RESOURCE_INFO *peekHandle() const { return resourceInfo.get(); }
|
||||
|
||||
protected:
|
||||
|
||||
@@ -388,7 +388,7 @@ HeapIndex MemoryManager::selectHeap(const GraphicsAllocation *allocation, const
|
||||
if (ptr) {
|
||||
return HeapIndex::HEAP_SVM;
|
||||
}
|
||||
if (allocation && GraphicsAllocation::isCpuAccessRequired(allocation->getAllocationType())) {
|
||||
if (allocation && allocation->gmm->gmmResourceInfo->is64KBPageSuitable()) {
|
||||
return HeapIndex::HEAP_STANDARD64Kb;
|
||||
}
|
||||
return HeapIndex::HEAP_STANDARD;
|
||||
|
||||
Reference in New Issue
Block a user