Pass compression and cachable params to CachePolicyGetPATIndex query

Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2022-09-21 12:49:45 +00:00
committed by Compute-Runtime-Automation
parent 910bffb752
commit 34eabf2960
8 changed files with 69 additions and 21 deletions

View File

@@ -1313,13 +1313,17 @@ uint64_t Drm::getPatIndex(Gmm *gmm, AllocationType allocationType, CacheRegion c
GMM_RESOURCE_INFO *resourceInfo = nullptr;
GMM_RESOURCE_USAGE_TYPE usageType = CacheSettingsHelper::getGmmUsageType(allocationType, false, *hwInfo);
bool cachable = !CacheSettingsHelper::isUncachedType(usageType);
bool compressed = false;
if (gmm) {
resourceInfo = gmm->gmmResourceInfo->peekGmmResourceInfo();
usageType = gmm->resourceParams.Usage;
compressed = gmm->isCompressionEnabled;
cachable = gmm->gmmResourceInfo->getResourceFlags()->Info.Cacheable;
}
uint64_t patIndex = rootDeviceEnvironment.getGmmClientContext()->cachePolicyGetPATIndex(resourceInfo, usageType);
uint64_t patIndex = rootDeviceEnvironment.getGmmClientContext()->cachePolicyGetPATIndex(resourceInfo, usageType, compressed, cachable);
if (DebugManager.flags.ClosEnabled.get() != -1) {
closEnabled = !!DebugManager.flags.ClosEnabled.get();