Set L1 policy globally

Related-To: NEO-7003

Add function to control l1 policy for both
stateless and surface state cache.


Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
Szymon Morek
2022-06-22 13:13:37 +00:00
committed by Compute-Runtime-Automation
parent 7aa053199d
commit 5236b34629
19 changed files with 170 additions and 33 deletions

View File

@@ -14,9 +14,13 @@ namespace NEO {
template <>
void EncodeSurfaceState<Family>::encodeExtraCacheSettings(R_SURFACE_STATE *surfaceState, const HardwareInfo &hwInfo) {
surfaceState->setL1CachePolicyL1CacheControl(R_SURFACE_STATE::L1_CACHE_POLICY_WBP);
using L1_CACHE_POLICY = typename R_SURFACE_STATE::L1_CACHE_POLICY;
auto hwInfoConfig = HwInfoConfig::get(hwInfo.platform.eProductFamily);
auto cachePolicy = static_cast<L1_CACHE_POLICY>(hwInfoConfig->getL1CachePolicy());
surfaceState->setL1CachePolicyL1CacheControl(cachePolicy);
if (DebugManager.flags.OverrideL1CacheControlInSurfaceState.get() != -1) {
surfaceState->setL1CachePolicyL1CacheControl(static_cast<R_SURFACE_STATE::L1_CACHE_POLICY>(DebugManager.flags.OverrideL1CacheControlInSurfaceState.get()));
surfaceState->setL1CachePolicyL1CacheControl(static_cast<L1_CACHE_POLICY>(DebugManager.flags.OverrideL1CacheControlInSurfaceState.get()));
}
}