mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
performance: cache MOCS values
This change caches the most used MOCS values: * getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER_CONST); * getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER); * getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER_CACHELINE_MISALIGNED); inside gmmHelper class during initialization to avoid repeated calls of virtual functions, branches and/or gmm lib access. and adds more readably corresponding getters: * getL1EnabledMOCS * getL3EnabledMOCS * getUncachedMOCS If force all resources uncached is called, these 3 cached mocs values are reinitialized It also changes the order of gmmHelper members, to avoid not needed padding after addressWidth and simplifies logic in getMocsIndex function for xehp and later products. Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
5a545073f6
commit
dd3d294f87
@@ -243,7 +243,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::initialize(Device *device, NEO
|
||||
this->signalAllEventPackets = L0GfxCoreHelper::useSignalAllEventPackets(hwInfo);
|
||||
this->dynamicHeapRequired = NEO::EncodeDispatchKernel<GfxFamily>::isDshNeeded(device->getDeviceInfo());
|
||||
this->doubleSbaWa = productHelper.isAdditionalStateBaseAddressWARequired(hwInfo);
|
||||
this->defaultMocsIndex = (gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER) >> 1);
|
||||
this->defaultMocsIndex = (gmmHelper->getL3EnabledMOCS() >> 1);
|
||||
this->l1CachePolicyData.init(productHelper);
|
||||
this->cmdListHeapAddressModel = L0GfxCoreHelper::getHeapAddressModel(rootDeviceEnvironment);
|
||||
this->dummyBlitWa.rootDeviceEnvironment = &(neoDevice->getRootDeviceEnvironmentRef());
|
||||
|
||||
Reference in New Issue
Block a user