mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
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:
committed by
Compute-Runtime-Automation
parent
7aa053199d
commit
5236b34629
@@ -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()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user