I have YUV420 pitch-layout NvBuffers coming in, which I need to access with CUDA to draw an overlay. I followed 02_video_dec_cuda sample from jetson_multimedia_api and first, get an EGL image from fd, which succeeds. However, cuGraphicsEGLRegisterImage reports error 999, and I’m not sure why?
The buffer is created like this:
createFmt.layout = NvBufferLayout_Pitch;
createFmt.payloadType = NvBufferPayload_SurfArray;
createFmt.colorFormat = NvBufferColorFormat_YUV420;
createFmt.nvbuf_tag = NvBufferTag_NONE;
and NvBufferMem_Read_Write
memory mapping flag.
EGL image is retrieve as (does not fail):
auto eglImage = NvEGLImageFromFd(EGL_NO_DISPLAY, dmaBufFd);
Why CUDA fails to register EGL image?
Is there a way to avoid using EGL images altogether (I’ve seen posts like this and this, but maybe there’s an update on this)?
Runtime devices:
- main – Jetson Xavier Jetpack 4.4 L4T 32.4.3 (cuda 10.2)
- also getting same error on: Jetpack 5.1.1 L4T 35.3.1 (cuda 11.4)