P4 to Git Change 1481252 by gandryey@gera-lnx-rcf on 2017/11/10 12:11:16

SWDEV-133810 - PAL support for Linux Pro w/OpenCL 1.2 support
	- Fix a crash in offline compilation. Increase the alignment for sysmem allocation.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#48 edit
This commit is contained in:
foreman
2017-11-10 12:38:37 -05:00
szülő 0cf1fd6eae
commit d779c69dfa
@@ -971,8 +971,10 @@ void* PALHSALoaderContext::SegmentAlloc(amdgpu_hsa_elf_segment_t segment, hsa_ag
assert(size);
assert(align);
if (program_->isNull()) {
// Note: In Linux ::posix_memalign() requires at least 16 bytes for the alignment.
align = amd::alignUp(align, 16);
void* ptr = amd::Os::alignedMalloc(size, align);
if (zero) {
if ((ptr != nullptr) && zero) {
memset(ptr, 0, size);
}
return ptr;