mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 05:24:02 +08:00
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:
committed by
Compute-Runtime-Automation
parent
457cb005de
commit
7d25965a78
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user