VdpVideoMixerRender fails returning error code 21

I’m trying to mix a UYVY VdpVideoSurface to a BGRA VdpOutputSurface and using the VdpLayer to composite a BGRA image on top of the whole scene.

If I set the VdpLayer count to zero, the VdpVideoSurface renders correctly, only when I try to composite an overlay does the function fail.

Is there some limitation as to what the VdpVideoMixerRender function can do that isn’t obvious? Is there some other API that I should be using?

Thanks!

I figured out a different way to do this (VdpOutputSurfaceRenderOutputSurface). I’ll just use this, but it would be nice to know why the VdpLayer option is part of VdpVideoMixerRender but it doesn’t work.

I finally figured out how to decode the cryptic VDPAU API (sarcasm). When creating the mixer, the VDP_VIDEO_MIXER_PARAMETER_LAYERS parameter must be provided, otherwise the compositing feature is disabled throwing the catch-all error when layer count is greater than 0. Hopefully this will help someone else…