AnsweredAssumed Answered

OpenCL interop doesn't work?

Question asked by et@et3d on Feb 7, 2016
Latest reply on Feb 9, 2016 by et@et3d

Trying surface->Convert(amf::AMF_MEMORY_OPENCL) in the SimpleDecoder sample prints the following to the console (stdout or stderr):


2016-02-07 18:11:08.764     1184 [DeviceComputeImplDX11]   Error: ..\..\..\..\impl\core\src\DeviceComputeImplDX11.cpp(68):OpenCL failed, error = -4:clEnqueueAcquireD3D11ObjectsKHR(m_clCommandQueue, 1, &clImage, 0, NULL, &clWaitEvent)


I tested it because in my own code this convert seems to take the majority of processing time, so I assumed that it goes through the CPU instead of through interop.


All I did in the sample is add context->InitOpenCL() after context->InitDX11(NULL) and add the conversion in PollingThread::Run (creating a 'surface' variable instead of just using amf::AMFSurfacePtr(data) as a parameter).


Anything I'm missing that's needed to make interop work? This happened to me both on the Radeon R9 290X I previously used and the Radeon R9 Fury I just upgraded to. I'm using Radeon drivers 15.12.