GPUDirect to GPU with no Output Crashes
Posted: Mon 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?
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?