P4 to Git Change 1555866 by cpaquot@cpaquot-ocl-lc-lnx on 2018/05/16 16:27:00

SWDEV-145570 - [HIP] Store HIP mem flags inside amd::Buffer's flags
	Use the 16 upper bits of amd::Buffer's flags field instead of adding a new field.

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/hip/hip_memory.cpp#26 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#86 edit


[ROCm/clr commit: 1b7d26cd88]
This commit is contained in:
foreman
2018-05-16 16:35:53 -04:00
parent 7896ecd925
commit 04b0104eb1
@@ -1513,7 +1513,7 @@ void* Device::svmAlloc(amd::Context& context, size_t size, size_t alignment, cl_
if (ptr != nullptr) {
// Copy paste from ORCA code.
// create a hidden buffer, which will allocated on the device later
mem = new (context) amd::Buffer(context, CL_MEM_USE_HOST_PTR, size, ptr);
mem = new (context) amd::Buffer(context, (CL_MEM_USE_HOST_PTR | (flags & 0xFFFF0000)), size, ptr);
if (mem == nullptr) {
LogError("failed to create a svm mem object!");
return nullptr;