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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user