performance: change buffer type for new coherency model

Related-To: NEO-11882

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
Szymon Morek
2024-07-08 18:31:02 +00:00
committed by Compute-Runtime-Automation
parent 457cb005de
commit 7d25965a78
27 changed files with 440 additions and 161 deletions

View File

@@ -448,11 +448,13 @@ bool MemObj::mappingOnCpuAllowed() const {
bool MemObj::allowCpuAccess() const {
auto graphicsAllocation = this->multiGraphicsAllocation.getDefaultGraphicsAllocation();
auto allocType = graphicsAllocation->getAllocationType();
auto isNonCoherentSystemAllocation = MemoryPoolHelper::isSystemMemoryPool(graphicsAllocation->getMemoryPool()) && (allocType == AllocationType::buffer);
if (graphicsAllocation->getDefaultGmm() == nullptr) {
return true;
return !(isNonCoherentSystemAllocation);
}
return !graphicsAllocation->getDefaultGmm()->getPreferNoCpuAccess();
return !graphicsAllocation->getDefaultGmm()->getPreferNoCpuAccess() && !(isNonCoherentSystemAllocation);
}
bool MemObj::allowCpuForMapUnmap() const {