I allocated the buffer with vaCreateSurfaces and map to opencl with clCreateFromVA_APIMediaSurfaceINTEL. But clFlush returns -5 (out of resource) after calling clEnqueueAcquireVA_APIMediaSurfacesINTEL, even though nothing is done in the cl code.
If I remove the clEnqueueAcquireVA_APIMediaSurfacesINTEL, clFlush returns with no error.
If I remove clFlush, the clEnqueueReleaseVA_APIMediaSurfacesINTEL returns -5.
I appreciate it very much if someone give any ideas.
For now, the best examples we have for VAAPI sharing are in the Media Server Studio samples package for Linux. The sample_multi_transcode example includes OpenCL rotation. This is implemented in sample_plugins/rotate_opencl.