From fa73e0cfcc714f8f100e92af06d391d63623d426 Mon Sep 17 00:00:00 2001 From: Alex Xie Date: Wed, 27 Oct 2021 00:35:09 -0400 Subject: [PATCH] SWDEV-308726 - OCL WIN - Conformance SVM Test failing SVM mapping should not use direct mapping in Windows PAL Change-Id: I005115bdce6ef99f471bb08fa8d042fa644587a6 --- rocclr/device/pal/palmemory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rocclr/device/pal/palmemory.cpp b/rocclr/device/pal/palmemory.cpp index 29a4fe2010..8d485b720e 100644 --- a/rocclr/device/pal/palmemory.cpp +++ b/rocclr/device/pal/palmemory.cpp @@ -786,8 +786,8 @@ void* Memory::allocMapTarget(const amd::Coord3D& origin, const amd::Coord3D& reg mapAddress = reinterpret_cast
(owner()->getHostMem()); } // If resource is a persistent allocation, we can use it directly - else if ((isPersistentDirectMap(mapFlags & CL_MAP_WRITE) && (getMapCount() == 0)) || - isPersistentMapped()) { + else if (((isPersistentDirectMap(mapFlags & CL_MAP_WRITE) && (getMapCount() == 0)) || + isPersistentMapped()) && (owner()->getSvmPtr() == nullptr)) { if (nullptr == map(nullptr)) { LogError("Could not map target persistent resource"); decIndMapCount();