P4 to Git Change 1518569 by gandryey@gera-w8 on 2018/02/22 18:48:33

SWDEV-145750 - SSG Player drop in performance observed when using the OCL Api in 18.10
	- Keep persistent memory mapped all time for Linux and Win10

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#73 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palresource.cpp#48 edit
Этот коммит содержится в:
foreman
2018-02-22 18:54:16 -05:00
родитель a31d6b2e6d
Коммит 9018bc85cc
2 изменённых файлов: 9 добавлений и 1 удалений
+7
Просмотреть файл
@@ -1281,6 +1281,13 @@ pal::Memory* Device::createBuffer(amd::Memory& owner, bool directAccess) const {
} else if (owner.getMemFlags() & CL_MEM_USE_PERSISTENT_MEM_AMD) {
// Attempt to allocate from persistent heap
result = gpuMemory->create(Resource::Persistent);
// Disallow permanent map for Win7 only, since OS will move buffer to sysmem
if (IS_LINUX ||
// Or Win10
(properties().gpuMemoryProperties.flags.supportPerSubmitMemRefs == false)) {
void* address = gpuMemory->map(nullptr);
CondLog(address == nullptr, "PAL failed lock of persistent memory!");
}
} else if (directAccess || (type == Resource::Remote)) {
// Check for system memory allocations
if ((owner.getMemFlags() & (CL_MEM_ALLOC_HOST_PTR | CL_MEM_USE_HOST_PTR)) ||
+2 -1
Просмотреть файл
@@ -1106,7 +1106,8 @@ void Resource::free() {
}
// Sanity check for the map calls
if ((mapCount_ != 0) && (memoryType() != Remote) && (memoryType() != RemoteUSWC)) {
if ((mapCount_ != 0) && (memoryType() != Remote) &&
(memoryType() != RemoteUSWC) && (memoryType() != Persistent)) {
LogWarning("Resource wasn't unlocked, but destroyed!");
}
const bool wait =