The CUDA-D3D9 NVCUVID sample renders cuda frames to a d3d9 texture. One can then use the underlying surface (via GetSurfaceLevel) to map this to another display surface, save it to disk, copy the bytes to memory, etc.
Since I’m only interested in the surface itself, I decided I’d create a RenderTarget instead of a texture (which is an IDirect3DSurface9). This works well, except when I make it run on my secondary GPU (an NVS 300). Then, after a while, calls to cuMapResource start to fail with CUDA_UNKNOWN_ERROR. I have made sure this is not driver related and that the card is not faulty. Is this an inherent limitation with render targets? Should I just keep using textures instead?