Fix OCL MOCS index with UNCACHED flag

Related-To: NEO-5742

Signed-off-by: Konstanty Misiak <konstanty.misiak@intel.com>
This commit is contained in:
Konstanty Misiak
2021-04-28 11:51:38 +00:00
committed by Compute-Runtime-Automation
parent 75e427f2e8
commit c4502ccf66
3 changed files with 34 additions and 0 deletions

View File

@@ -907,6 +907,10 @@ cl_int Kernel::setArgSvmAlloc(uint32_t argIndex, void *svmPtr, GraphicsAllocatio
forceNonAuxMode = true;
}
bool argWasUncacheable = kernelArguments[argIndex].isStatelessUncacheable;
bool argIsUncacheable = svmAlloc ? svmAlloc->isUncacheable() : false;
statelessUncacheableArgsCount += (argIsUncacheable ? 1 : 0) - (argWasUncacheable ? 1 : 0);
void *ptrToPatch = patchBufferOffset(argAsPtr, svmPtr, svmAlloc);
if (isValidOffset(argAsPtr.bindful)) {
auto surfaceState = ptrOffset(getSurfaceStateHeap(), argAsPtr.bindful);