Codec SDK / DXGI conflict?

Trying to create a Windows screen capture app that uses DXGI to grab the screen and Codec SDK V9.0 to encode as H264. Problem I am seeing is that if I even link CUDA LIB into my app without even making any calls then DXGI setup fails. Specifically I get error 0x887a0004 from

hr = DxgiOutput1->DuplicateOutput(m_Device, &m_DeskDupl);

Anybody have any idea whats going on and if there is a workaround?

Hi,

Could you answer the following questions?

  1. Which SDK header version you are using, you mentioned 9.0 which doesn’t seem correct.
  2. Which driver version you are using?
  3. Please provide a sample application which reproduces the issue.

Thanks,
Ryan Park

Sorry - Version 8.2.15 of the codec SDK.
My adaptor is a Quadro K1100M
My CUDA libraries are 9.0
Window 10
VS2015
Driver version shows 23.21.13.9174 dated 6/4/18
I have a ZIP file containing source and project file for a standalone sample app that shows the problem but its not clear how I can upload that on this forum. (Sorry - I’m new here).

Hi,

You can send your zip file to this email address:

video-sdk-feedback@nvidia.com

Thanks,
Ryan Park

0x887A0004 == DXGI_ERROR_UNSUPPORTED, on laptop with two GPU cards ?
Try this [url]Does Desktop Duplication API work only on Default Graphics Adapter?.

Ryan, I just emailed the ZIP file.

mcervny, thanks for the suggestion but that particular topic did not seem directly related to my problem. I do have a machine with 2 adaptors (intel and NVIDIA Quadro) but my DXGI code normally has no problems talking to either one of those adaptors. However if I link to CUDA.LIB even without making any calls then both adaptors fail with DXGI. Something is presumably happening in DllMain() in one of the CUDA dlls to cause this. Hopefully Ryan can sort it out.

For further reference a sample showing the interaction between DXGI Output Duplication and NvENC is available here:

This is likely your issue: directx - Desktop Duplication API & switchable graphics - Stack Overflow

The short of it is: “This issue occurs because the DDA does not support being run against the discrete GPU on a Microsoft Hybrid system. By design, the call fails together with error code DXGI_ERROR_UNSUPPORTED in such a scenario.”