mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 18:37:46 +08:00
fix: set host function allocation as uncached
The usage of host function allocation is similar to tagBuffer. Ensure it's uncached and it follows tag buffer's cache policy. Host function allocation will be readable and writable by both: cpu and gpu. Related-To: NEO-14577 Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
16050126e3
commit
4133827e6f
@@ -56,12 +56,10 @@ GMM_RESOURCE_USAGE_TYPE_ENUM CacheSettingsHelper::getDefaultUsageTypeWithCaching
|
||||
}
|
||||
|
||||
if (hwInfo->capabilityTable.isIntegratedDevice) {
|
||||
if (productHelper.isResourceUncachedForCS(allocationType) || AllocationType::tagBuffer == allocationType) {
|
||||
if (productHelper.isResourceUncachedForCS(allocationType) || AllocationType::tagBuffer == allocationType || AllocationType::hostFunction == allocationType) {
|
||||
return GMM_RESOURCE_USAGE_OCL_BUFFER_CSR_UC;
|
||||
} else if (AllocationType::semaphoreBuffer == allocationType) {
|
||||
return GMM_RESOURCE_USAGE_OCL_SYSTEM_MEMORY_BUFFER;
|
||||
} else if (AllocationType::hostFunction == allocationType) {
|
||||
return GMM_RESOURCE_USAGE_OCL_BUFFER;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -773,6 +773,7 @@ TEST(GmmTest, givenAllocationTypeWhenGettingUsageTypeThenReturnCorrectValue) {
|
||||
expectedUsage = forceUncached ? uncachedGmmUsageType : GMM_RESOURCE_USAGE_OCL_SYSTEM_MEMORY_BUFFER;
|
||||
break;
|
||||
case AllocationType::tagBuffer:
|
||||
case AllocationType::hostFunction:
|
||||
expectedUsage = forceUncached ? uncachedGmmUsageType : GMM_RESOURCE_USAGE_OCL_BUFFER_CSR_UC;
|
||||
break;
|
||||
case AllocationType::semaphoreBuffer:
|
||||
@@ -875,6 +876,7 @@ TEST(GmmTest, givenAllocationTypeAndMitigatedDcFlushWhenGettingUsageTypeThenRetu
|
||||
expectedUsage = GMM_RESOURCE_USAGE_OCL_SYSTEM_MEMORY_BUFFER;
|
||||
break;
|
||||
case AllocationType::tagBuffer:
|
||||
case AllocationType::hostFunction:
|
||||
expectedUsage = GMM_RESOURCE_USAGE_OCL_BUFFER_CSR_UC;
|
||||
break;
|
||||
case AllocationType::semaphoreBuffer:
|
||||
|
||||
Reference in New Issue
Block a user