Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] Refactor DXVA renderer to enumerate and use the supported conversions #23513

Merged
merged 9 commits into from
Jul 18, 2023

Commits on Jul 15, 2023

  1. Configuration menu
    Copy the full SHA
    9346eaa View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2023

  1. [Windows][dxva] Retrieve the supported conversions for a source to fe…

    …ed GetWeight
    
    Refactor of the existing logic to present GetWeight with a list of the supported conversions,
    using the ID3D11VideoProcessorEnumerator1 interface of Windows 10 and above.
    Support for SDR is assumed in the absence of the D3D11 interface (Windows 8)
    
    At least one conversion: the dxva processor supports the rendering.
    
    Keep the previous API around for now as it is used by the Configure() path.
    Removed in later commits, including the temporary adaptor functions.
    CrystalP committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    e456231 View commit details
    Browse the repository at this point in the history
  2. [Windows][dxva] Let the DXVA renderer choose and Configure() from a l…

    …ist of supported conversions
    
    Configure retrieves the same list of conversions as GetWeight, applies some rules to pick the best
    (refactor of CalcIntermediateTargetFormat) and tells CProcessorHD to use it.
    No need to check the input format in Configure() anymore, it is checked by extracting the
    supported conversion, and when setting the conversion in the processor.
    
    The Configure and GetWeight paths now execute the same logic to gather information, even though
    it's still executed twice.
    CrystalP committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    926aef9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    eecdbd3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    28c3c8a View commit details
    Browse the repository at this point in the history
  5. [Windows][dxva] Make the Renderer own directly an enumerator and shar…

    …e it with the processor
    
    It will make it easier to get the renderer react to video attributes changes during playback.
    Removed all methods that CProcessorHD was simply forwarding to CEnumeratorHD.
    Removed PreInit method of CProcessorHD since the enumerator is created externally and has
    already been created successfully by the time PreInit was called.
    CrystalP committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    cb0834d View commit details
    Browse the repository at this point in the history
  6. [Windows][dxva] Add CEnumeratorHD handling of D3D11 device creation a…

    …fter recovery from lost device
    CrystalP committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    df8485b View commit details
    Browse the repository at this point in the history
  7. [Windows][dxva] reorder steps in Configure() more logically

    First do everything enumerator related, then processor related.
    to be merged with previous commit once reviewed
    CrystalP committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    80fa78a View commit details
    Browse the repository at this point in the history
  8. [Windows][dxva] Modify Renderer DXVA to react to source changes durin…

    …g playback.
    
    Compare attributes of new frame with old frame. Differences could require a different conversion, re-enumerate conversions and choose the best one again.
    
    Similar to the replaced code, does not react to:
    - VSR setting change
    - High precision processing setting change
    - Source dimensions or input dxgi format changes - in practice doesn't seem to have an effect on D1D11 enumerator interfaces behavior , but enumerator should be reopened.
    To be added in future changes.
    CrystalP committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    852cd7f View commit details
    Browse the repository at this point in the history