P4 to Git Change 1515374 by skeely@skeely_HSA_linux on 2018/02/12 17:53:32

SWDEV-94389 - Get gl display and context from cl context object.

	Also report Mesa interop errors in debug log.

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_gl_amd.hpp#20 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#82 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.hpp#25 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocglinterop.cpp#5 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocglinterop.hpp#5 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocmemory.cpp#33 edit
This commit is contained in:
foreman
2018-02-12 18:02:35 -05:00
parent 94025b9c3b
commit 7175a76b6d
5 changed files with 109 additions and 114 deletions
+10 -1
View File
@@ -213,7 +213,16 @@ bool Memory::createInteropBuffer(GLenum targetType, int miplevel) {
in.out_driver_data_size = MaxMetadataSizeBytes;
in.out_driver_data = &amdImageDesc_->data[0];
if (!dev().mesa().Export(in, out)) return false;
const auto& glenv = owner()->getContext().glenv();
if (glenv->isEGL()) {
if (!MesaInterop::Export(in, out, MesaInterop::MESA_INTEROP_EGL, glenv->getEglDpy(),
glenv->getEglOrigCtx()))
return false;
} else {
if (!MesaInterop::Export(in, out, MesaInterop::MESA_INTEROP_GLX, glenv->getDpy(),
glenv->getOrigCtx()))
return false;
}
size_t size;
size_t metadata_size = 0;