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

fix(capture/windows): fix capture when using the basic render driver #3531

Merged
merged 2 commits into from
Jan 12, 2025

Conversation

cgutman
Copy link
Collaborator

@cgutman cgutman commented Jan 12, 2025

Description

For the longest time, I thought DDA just didn't work on the Microsoft Basic Display Adapter. It turns out that it works fine, but we're passing a D3D11 device flag that it doesn't support so we fail to create the D3D11 device with DXGI_ERROR_UNSUPPORTED. I reviewed several DDA samples online (including the official Microsoft one) and none of them set this D3D11_CREATE_DEVICE_VIDEO_SUPPORT flag.

It's not completely clear what D3D11_CREATE_DEVICE_VIDEO_SUPPORT even does exactly, but assuming it's required for the device where we do video encoding/processing, let's just set it on the device that FFmpeg uses for encoding.

Screenshot

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Copy link

codecov bot commented Jan 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.30%. Comparing base (1b94e93) to head (544a680).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3531      +/-   ##
==========================================
+ Coverage    8.84%   10.30%   +1.45%     
==========================================
  Files          90       90              
  Lines       16159    16171      +12     
  Branches     7679     7679              
==========================================
+ Hits         1430     1666     +236     
+ Misses      14215    13938     -277     
- Partials      514      567      +53     
Flag Coverage Δ
Linux 9.67% <ø> (ø)
Windows 10.76% <ø> (+4.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/platform/windows/display.h 27.53% <ø> (+20.28%) ⬆️
src/platform/windows/display_vram.cpp 8.96% <ø> (+7.32%) ⬆️

... and 13 files with indirect coverage changes

@ReenigneArcher ReenigneArcher added this to the stable release milestone Jan 12, 2025
@cgutman cgutman merged commit c369e8e into LizardByte:master Jan 12, 2025
37 checks passed
qiin2333 pushed a commit to qiin2333/Sunshine-Foundation that referenced this pull request Jan 14, 2025
…izardByte#3531)

* fix(capture/windows): fix capture when using the basic render driver

* chore(tests): remove now unnecessary TESTS_SOFTWARE_ENCODER_UNAVAILABLE option
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants