CUDA producer cannot post EGL frame to EGL stream


I’m trying to create an inter-process EGL stream pipeline between CUDA producer and CUDA consumer.
I have implemented a demo producer application that packs YUV420 image into an EGL frame and posts the frame to the consumer via EGL stream.

Here are the EGL frame attributes:
width: 1920
height: 1200
depth: 1
pitch: 0
planeCount: 3
numChannels: 1
frameType: array
colorFormat: YUV420 planar
cuFormat: uint8

When trying to post the EGL frame (after connecting the consumer and producer) using cuEGLStreamProducerPresentFrame(CUeglStreamConnection &m_producerEndpoint, const CUeglFrame& frame, cuStream* = NULL)
I keep getting return value CUDA_ERROR_INVALID_VALUE which would indicate an invalid parameter for the API call.

Above API call is based on this example
cuda-samples/Samples/EGLStream_CUDA_Interop at master · NVIDIA/cuda-samples · GitHub .

In this example the cuStream* parameter is also NULL. Is this parameter necessary or not?
If not, then probably the next culprit is the EGL frame. What should be checked from EGL frame point of view? Anything else here to consider? The EGL frame packing is also based on the above sample.

Thanks for help!


Seems posting to stream works with frame type pitch.

Unclear to me still why it doesn’t work with array type, though…