Enable L1 cache for Tigerlake

Change-Id: I33513ed084f9d06ceca11315cac03f1b682db535
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
Related-To: NEO-4832
This commit is contained in:
Maciej Dziuban
2020-10-01 12:22:54 +02:00
committed by sys_ocldev
parent ec054a87da
commit 138f04bdcd
19 changed files with 352 additions and 12 deletions

View File

@@ -47,6 +47,24 @@ void EncodeWA<Family>::encodeAdditionalPipelineSelect(Device &device, LinearStre
}
}
template <>
void EncodeSurfaceState<Family>::encodeExtraBufferParams(R_SURFACE_STATE *surfaceState, GraphicsAllocation *allocation, GmmHelper *gmmHelper,
bool isReadOnly, uint32_t numAvailableDevices) {
const bool isL3Allowed = surfaceState->getMemoryObjectControlState() == gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER);
if (isL3Allowed) {
const bool isConstantSurface = allocation && allocation->getAllocationType() == GraphicsAllocation::AllocationType::CONSTANT_SURFACE;
bool useL1 = isReadOnly || isConstantSurface;
if (DebugManager.flags.ForceL1Caching.get() != -1) {
useL1 = !!DebugManager.flags.ForceL1Caching.get();
}
if (useL1) {
surfaceState->setMemoryObjectControlState(gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER_CONST));
}
}
}
template struct EncodeDispatchKernel<Family>;
template struct EncodeStates<Family>;
template struct EncodeMath<Family>;