GPUDirect to GPU with no Output Crashes

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

klandfors

  • Posts: 5
  • Joined: Wed Jan 17, 2024 4:04 pm
  • Real Name: Kurt Landfors

GPUDirect to GPU with no Output Crashes

PostMon Jan 29, 2024 10:17 pm

We have a scenario where we want to copy frames from the framegrabber to the GPU for some on-GPU image processing. We leveraged GPUDirect code from the sample LoopThroughWithDX11Compositing to do a proof of concept, using only the portions of the sample code to transfer frames FROM the Decklink board TO the GPU. We omitted the output portions of the sample code. It works great if the primary display is connected to the first port on the destination nVidia GPU. However if the display is instead connected to the integrated motherboard graphics adapter, and no display is connected to the nVidia GPU, it crashes at: DVP_CHECK(dvpCreateGPUD3D11Resource((ID3D11Resource *)captureTexture, &mDvpCaptureTextureHandle));

The basic setup sequence follows the sample code very closely:
1) Get the IDeckLinkInput
2) Use DXGIFactory to get the IDXGIAdapter. (However, we specifically get the IDXGIAdapter interface for the nvidia GPU, not the default adapter provided by the DXGI factory.)
3) Create the D3D11 device using D3D11CreateDeviceAndSwapChain (or using D3D11CreateDeviceAndContext)
4) Create the target buffer or texture on the GPU using device->CreateTexture2D or using device->CreateBuffer, setting D3D11_USAGE_DEFAULT
5) Register the device with dvp using dvpInitD3D11Device
6) Register the buffer or texture using dvpCreateGPUD3D11Resource

The last call ( dvpCreateGPUD3D11Resource ) succeeds if the primary display is attached to the first port of the nVidia GPU and fails if the display is connected to the motherboard display adapter.

Do you have any thoughts on what we may be doing wrong?
Offline

klandfors

  • Posts: 5
  • Joined: Wed Jan 17, 2024 4:04 pm
  • Real Name: Kurt Landfors

Re: GPUDirect to GPU with no Output Crashes

PostWed Feb 07, 2024 3:29 pm

I am hoping a BlackMagic dev could chime in. Is there any way to bypass the apparent requirement that the display adapter is primary and/or must have an output (display) attached?

Thank you.
Offline

klandfors

  • Posts: 5
  • Joined: Wed Jan 17, 2024 4:04 pm
  • Real Name: Kurt Landfors

Re: GPUDirect to GPU with no Output Crashes

PostTue Feb 13, 2024 7:40 pm

Just a quick bump to keep this alive...

Would it be possible for a Blackmagic dev to comment if it is necessary for a gpu to have a display connected in order for GpuDirect data transfer from Decklink to GPU to work?

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 20 guests