P4 to Git Change 1426879 by cpaquot@cpaquot-ocl-lc-lnx on 2017/06/26 15:12:46

SWDEV-107819 - Offset buffer address

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocmemory.cpp#25 edit


[ROCm/clr commit: 815623b306]
This commit is contained in:
foreman
2017-06-26 15:19:59 -04:00
parent 0821063d4b
commit 25943ff03d
@@ -177,8 +177,8 @@ bool Memory::createInteropBuffer(GLenum targetType, int miplevel) {
#else
assert(owner()->isInterop() && "Object is not an interop object.");
mesa_glinterop_export_in in;
mesa_glinterop_export_out out;
mesa_glinterop_export_in in = {0};
mesa_glinterop_export_out out = {0};
in.size = sizeof(mesa_glinterop_export_in);
out.size = sizeof(mesa_glinterop_export_out);
@@ -218,6 +218,8 @@ bool Memory::createInteropBuffer(GLenum targetType, int miplevel) {
1, &agent, out.dmabuf_fd, 0, &size, &deviceMemory_, &metadata_size, (const void**)&metadata);
close(out.dmabuf_fd);
deviceMemory_ = static_cast<char*>(deviceMemory_) + out.buf_offset;
if (status != HSA_STATUS_SUCCESS) return false;
// if map_buffer wrote anything in metadata, copy it to amdImageDesc_