Skip to content

d3d11: Use adapter LUID (Locally Unique Identifier) for decoder/encoder

Seungha Yang requested to merge seungha.yang/gstreamer:d3d11-adapter-luid into main
    mediafoundation: mfvideoenc: Use DXGI adapter LUID

    Make use of new DXGI adapter LUID based device context sharing.
    Note that we were using DXGI adapter LUID to open MFT already.
    d3d11: d3d11decoder: Use DXGI adapter LUID

    ... instead of index of DXGI adapter.

    The order of IDXGIAdapter1 enumerated via IDXGIFactory1::EnumAdapters1
    can be varying even there's no rebooting in case that GPU preference order
    is updated by user (for example, it can be done by using NVIDIA Control Panel
    in case of multi-GPU laptop system) and eGPU is another possible case.

    So, for an element which requires fixed target GPU requirement,
    index based device enumeration is unreliable.
    d3d11: d3d11utils: Add support for DXGI Adapter LUID based D3D11 device context sharing
    d3d11: d3d11device: Add gst_d3d11_device_new_{for_adapter_luid,wrapped}

    * gst_d3d11_device_new_for_adapter_luid()
      Used for creating D3D11 device for a DXGI adapter (i.e., GPU)
      corresponding to a LUID (Locally Unique Identifier).
      This method can be useful for interop with other APIs such as
      Direct3D12, MediaFoundation, CUDA, etc.
    * gst_d3d11_device_new_wrapped()
      Allows creating a new GstD3D11Device object by using already
      configured ID3D11Device. This is conceptually equivalent to
      gst_gl_context_new_wrapped()
    d3d11: d3d11device: Remove "allow-tearing" property

    Plugin can query DXGI_FEATURE_PRESENT_ALLOW_TEARING without d3d11device
    help

Merge request reports