P4 to Git Change 1545906 by gandryey@gera-lnx-rcf on 2018/04/24 19:10:41

SWDEV-79445 - OCL generic changes and code clean-up
	- Report an error if persistent memory allocation failed. The original logic was switching to local memory, but SSG can't work with it. The logic should work properly under Linux, but in Windows OS never fails persistent allocation.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#86 edit
Этот коммит содержится в:
foreman
2018-04-24 19:17:55 -04:00
родитель 2f41f41977
Коммит 1c91644f1b
+9 -4
Просмотреть файл
@@ -1254,12 +1254,17 @@ 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 ||
if (result) {
// 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!");
void* address = gpuMemory->map(nullptr);
CondLog(address == nullptr, "PAL failed lock of persistent memory!");
}
} else {
delete gpuMemory;
return nullptr;
}
} else if (directAccess || (type == Resource::Remote)) {
// Check for system memory allocations