mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Access GmmHelper and GmmClientContext via RootDeviceEnvironment
Related-To: NEO-3857 Change-Id: Ie9d719c9884fd89580ce3592a0d4d4cd42862f47 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:

committed by
sys_ocldev

parent
4a41c9741c
commit
74072d4916
@ -586,6 +586,7 @@ Buffer *Buffer::createBufferHwFromDevice(const Device *device,
|
||||
zeroCopy, isHostPtrSVM, isImageRedescribed);
|
||||
pBuffer->offset = offset;
|
||||
pBuffer->executionEnvironment = device->getExecutionEnvironment();
|
||||
pBuffer->rootDeviceEnvironment = pBuffer->executionEnvironment->rootDeviceEnvironments[device->getRootDeviceIndex()].get();
|
||||
return pBuffer;
|
||||
}
|
||||
|
||||
@ -605,7 +606,7 @@ uint32_t Buffer::getMocsValue(bool disableL3Cache, bool isReadOnlyArgument) cons
|
||||
bool alignedMemObj = isAligned<MemoryConstants::cacheLineSize>(bufferAddress) &&
|
||||
isAligned<MemoryConstants::cacheLineSize>(bufferSize);
|
||||
|
||||
auto gmmHelper = executionEnvironment->getGmmHelper();
|
||||
auto gmmHelper = rootDeviceEnvironment->getGmmHelper();
|
||||
if (!disableL3Cache && !isMemObjUncacheableForSurfaceState() && (alignedMemObj || readOnlyMemObj || !isMemObjZeroCopy())) {
|
||||
return gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user