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
[ROCm/clr commit: 7175a76b6d]
Tento commit je obsažen v:
1 rodič
a0fa4d2b5e
revize
fd96c14e23
5 files changed
+109
-114
No files matched your search
@@ -1205,14 +1205,11 @@ bool Device::bindExternalDevice(uint flags, void* const gfxDevice[], void* gfxCo
|
||||
|
||||
mesa_glinterop_device_info info;
|
||||
info.size = sizeof(mesa_glinterop_device_info);
|
||||
MesaInterop temp;
|
||||
if (!temp.Bind(kind, display, context)) {
|
||||
assert(false && "Failed mesa interop bind.");
|
||||
if (!MesaInterop::Init(kind)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!temp.GetInfo(info)) {
|
||||
assert(false && "Failed to get mesa interop device info.");
|
||||
if (!MesaInterop::GetInfo(info, kind, display, context)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1223,8 +1220,6 @@ bool Device::bindExternalDevice(uint flags, void* const gfxDevice[], void* gfxCo
|
||||
match &= info_.vendorId_ == info.vendor_id;
|
||||
match &= deviceInfo_.pciDeviceId_ == info.device_id;
|
||||
|
||||
if (!validateOnly) mesa_ = temp;
|
||||
|
||||
return match;
|
||||
#endif
|
||||
}
|
||||
@@ -1235,7 +1230,6 @@ bool Device::unbindExternalDevice(uint flags, void* const gfxDevice[], void* gfx
|
||||
return false;
|
||||
#else
|
||||
if ((flags & amd::Context::GLDeviceKhr) == 0) return false;
|
||||
if (!validateOnly) mesa_.Unbind();
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in new issue
Zablokovat Uživatele