-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Cross-device DMA-BUF sharing for VAAPI with KMS grab #2053
base: master
Are you sure you want to change the base?
Conversation
Just tested this out and this indeed fixes #2044 for me. |
I tested it and it appears to work for me as well with the exception of the connection seemingly terminating at random. Perhaps once this is rebased on the the latest release, then I can test it again to make sure that it wasn't some other part of the code base causing the problem. |
This is interesting. I checked out the PR, but unfortunately I could note compile it:
Somehow the |
tl:dr: I manually cloned the json library to give it another go. I'd just like to leave some feedback, in case this is unexpected behavior: With an AMD dGPU (RX6650XT) as card1/renderD129 and an Intel iGPU (card0/D128) cross-encoding does not work (display/render on AMD, encode on Intel). This is on a regular desktop PC, not a highly integrated dual-GPU-notebook. Here's the log in case it's helpful:
|
I tried running this on my dual-GPU laptop and got a crash:
GDB can't seem to produce a proper stacktrace, even with debug info enabled. This is what I've got:
If I force Sunshine to use my integrated gpu with the option adapter_name = /dev/dri/renderD128, it runs, but the integrated gpu's video encoder is too weak to work smoothly and I would prefer to be able to use the nvidia GPU's encoder (through nvidia-vaapi-driver). |
Description
This introduces support for cross-device VAAPI encoding without having to copy each frame from the capture adapter through RAM to the encoding adapter. If the encoding device can successfully import the DMA-BUF directly from the capture device, we will pass FBs between the adapters.
In the event that the capture device doesn't support VAAPI encoding (which is the case for VKMS), we will try to find another device that can successfully import the FBs from the capture device for encoding. This allows VKMS streaming to work as long as the render device (if any) support VAAPI. Software encoding with VKMS with imported DMA-BUFs from a primary render GPU is still unsupported.
Screenshot
Issues Fixed or Closed
Fixes #2044 for GPU encoding only
Type of Change
.github/...
)Checklist
Branch Updates
LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.