mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-22 10:17:01 +08:00
refactor: debug flag to override PAT index for given memory type
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
19aba581d4
commit
06a02552ce
@@ -154,15 +154,15 @@ bool DrmAllocation::setCacheRegion(Drm *drm, CacheRegion regionIndex) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return setCacheAdvice(drm, regionSize, regionIndex);
|
||||
return setCacheAdvice(drm, regionSize, regionIndex, !isAllocatedInLocalMemoryPool());
|
||||
}
|
||||
|
||||
bool DrmAllocation::setCacheAdvice(Drm *drm, size_t regionSize, CacheRegion regionIndex) {
|
||||
bool DrmAllocation::setCacheAdvice(Drm *drm, size_t regionSize, CacheRegion regionIndex, bool isSystemMemoryPool) {
|
||||
if (!drm->getCacheInfo()->getCacheRegion(regionSize, regionIndex)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
auto patIndex = drm->getPatIndex(getDefaultGmm(), allocationType, regionIndex, CachePolicy::WriteBack, true);
|
||||
auto patIndex = drm->getPatIndex(getDefaultGmm(), allocationType, regionIndex, CachePolicy::WriteBack, true, isSystemMemoryPool);
|
||||
|
||||
if (fragmentsStorage.fragmentCount > 0) {
|
||||
for (uint32_t i = 0; i < fragmentsStorage.fragmentCount; i++) {
|
||||
|
||||
Reference in New Issue
Block a user