-
Notifications
You must be signed in to change notification settings - Fork 238
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
cl_khr_gl_sharing GLX support #659
Comments
One of the applications being Davinci Resolve |
I'm interested in this too, because currently there's no way to use Davinci Resolve on Linux, even though EGL support (which took 4 years to develop) is merged. Waiting for any information on this! |
We are open to include this feature in the driver. We are not able to devote engineering effort to implementation at this time, but would welcome contributions from the community. I'd also like to note that we recently added support for cl_khr_external_memory, which should show up in the August release. |
So when I had a quick look at this, one the main issue was the API used to implement the sharing with EGL But when trying to work my way through #667 and talking with some mesa devs, they pointed out it shouldn't be using Now obviously this is still EGL specific, but it has a direct GLX equivalent |
FWIW in the branch I pushed in #667 , I have now added GLX support as well. |
So the good new is that Resolve starts and you see something in the viewers now : https://i.imgur.com/qyfOARh.png |
Found a workaround ... I had to remove the RTLD_DEEPBIND option used in intel-compute to load OsLibraries and then it starts. But now I can start resolve and see stuff in the viewers. It's a bit glitchy and I get some weird errors :
But heh, progress ! Interestingly the BRAW standalone player works fine and also use CL/GL sharing (I can see the API calls). ... |
(just wanted to say thank you! - awesome to see someone trying to get Resolve working!) |
@SimonBrandner Testers welcome 😁 |
@smunaut hey, I'm on Arch and have a UHD620. what should I do to test? |
/me is on Nix; might be interesting trying to figure out how to test this :D |
So you need to build :
(make sure to checkout the correct branch as pointed in those links) You can install in a temporary prefix like /tmp/test_root or something.
Then just try to start resolve. |
btw, I'm on the unofficial blackmagic discord and on the freedesktop one, so you can ping me there username |
@smunaut I will dm you as |
For anyone following, here's a preview of the current state : https://youtu.be/-PW1J2Y42x0 That video actually shows a bug in the color parade, I know what the bug is and already have a workaround, just talking right now with the mesa guys to see what the best fix would be. |
Ah will do. But gimme some time, I haven't actually pushed the latest stuff 😅 |
Ok pushed. You need the |
I tested it on Fedora 38 and I can say that it works perfectly. https://www.codelinsoft.it/sito/images/2023/davinci_resolve.png |
@specialworld83 Thanks for testing ! |
Unfortunately, the preview video in Davinci Resolve is not rendering correctly for me. Screenshot (this is supposed to show a flat gradient from black to white): That said, it doesn't crash or anything, and when I export my Davinci Resolve project, it is all correct again. I'm using a fully updated Arch Linux with an Intel Arc 750. I manually compiled How can I help to fix this? |
Do you use IRC or discord ? Would be easier to do this in a "live" session :) |
@smunaut Discord? Can you send me the right Link? |
We can probably create a thread in #resolve on the BMD discord : https://discord.com/invite/blackmagic-design-community-479297254528647188 |
So just to update the issue here. There were 2 bugs identified :
Note however that theses are not regression, it doesn't work any better in the current cl_khr_gl_sharing support that's currently merged in, so theses patches are still an improvement. |
@JablonskiMateusz @eero-t Maybe one of you knows : How can I specify which tiling mode to use ? I know which one is used by mesa, but now I need to tell the compute stack about it ... I found a |
🤔 Huh what option were you using that didn't work and what did you change to make it work ? |
I have commented this in
and this is the full working cmake:
Previously, I was missing all the |
Works for me also, applied the patch on top of 24.13 and resolve artifacts disappeared. Fedora 40 on Iris Xe Gen12. Thanks! |
@jonassvatos Interesting that you had artefacts with an Iris Xe Gen12. That's the iGPU in a 12th gen CPU right ? It worked without it for me. |
Yes, Intel Xe on Intel(R) Core(TM) Ultra 7 155U. Well I did see the artifacts when using stock 24.09 from f40. At first, I tried applying the patch to that version but there were some merge conflicts I wasn't confortable resolving myself, therefore I went with the next stable version. Will try it with 24.13 w/o your patch. |
@jonassvatos What's your exact CPU model ? |
I did see it both on Intel Xe on Intel(R) Core(TM) Ultra 7 155U and also on Intel Core i7-1165G7, to which I do not have access anymore. The artifacts did not occur on f39 and custom build of 23.35.27191.9 with the original CL-GL sharing patchset and new mesa. After upgrade to f40, resolve with 23.35 and new mesa obviously didn't run, but ran with stock 24.09/mesa albeit with artifacts. |
ok, now I can confirm that running 24.13 w/o tiling mode patch results in artifacts for me. compiling again with this patch results in clear image in resolve. |
Yeah, with the "Intel(R) Core(TM) Ultra 7 155U", I would expect it. It's more a Gen 12.5 GPU. But for the Intel Core i7-1165G7, it's weird. Might be another issue ... or I'm reading things wrong, it's sometime hard to figure out exactly what feature is supported in each chip with all the variations and different naming ... |
Aha, understood. The case of 1165G7 was just for reference, as that problem doesn't itch me anymore, so no need for a scratch (for now).. |
Hello I can confirm ARC770 is working with latest patches! anyone using archlinux can download my modified pkg for intel-compute-runtime, https://github.com/vidalinux/AUR/tree/main/intel-compute-runtime |
Hello again, today we're doing more testing with Davinci Resolve and ARC770; navigating through sections of the program, anything we select is taking long to load without any video loaded, the program crash with the following error: Abort was called at 840 line in file: |
@smunaut Running Davinci Resolve with intel-compute-runtime-24.26.30049.6 without your latest patches applied have the same issue navigating through sections of the program anything is taking long to load, any ideas? |
Could you file a separate issue about that? |
Could some kind soul please instruct me how to apply latest smunaut patches and build / install them? I'm on Intel 155H iGPU (Arc Xe-LPG) running Ubuntu 24.04. Absolutely not an expert in cmake, tried to build Stucked and need some help) |
Found issue #718 , but don't know what should i do further, |
Finally succedeed in building intel-compute-runtime on Ubuntu! Well, at least one time) |
@smunaut after your patch applied, Davinci preview window works flawlessly! my config: |
@mikamiel What desktop / windowing server / compositor you're using? AFAIK mouse pointer is handled by the windowing system server, i.e. depending what your desktop is, either by X server, or Wayland compositor. It might not be blending layers (cursor / application) with different attributes correctly... |
Yeah, this doesn't look related to the CL compute runtime in any way, so you'll have to figure that one out. |
Wayland (default in Ubuntu24.04) and Davinci running with |
DaVinci output is running through Xwayland (X server), in addition to Gnome Mutter (Wayland server)? You could start by filing bug against Ubuntu 24.04, with all the details (kernel, compute, desktop etc).
But I'd suggest that you try to get that Wayland crash fixed first in DaVinci upstream, and see whether the problem is there also when Xwayland (X server) is out of the picture (I know bare-metal X server support for render buffer attributes to be flaky, and it's possible that's the case also with Xwayland). Is there already DaVinci upstream bug about that crash? |
Yep
Should test with other DE/WM first to narrow down the case
I didn't find one, but BlackMagics do not really welcome bug reports on unsupported systems |
The new version interrupts the correct functioning of Davinci with Intel processor and Intel Iris Xe Graphics. I attach images and debug I had to downgrade to archlinux and it worked properly again `0x7c82c2800000 | GPU.SingleBoardMgr | ERROR | 2024-09-05 20:27:07,241 | DVIP exception caught:
0x7c82c2800000 | GPU.SingleBoardMgr | INFO | 2024-09-05 20:27:07,241 | Flushing GPU memory...
|
I'm getting the same "The GPU failed to perform image processing because of an error. Error code -1" issue but with this setup: OS: EndeavourOS x86_64 What exactly do you mean by "downgrade to archlinux"? |
I did the following procedure: I downloaded the intel-compute-runtime package at the link https://gitlab.archlinux.org/archlinux/packaging/packages/intel-compute-runtime/-/tree/e64ba3b2d9cddb31b61b9242edc62a2c6356effa I compiled the package with makepkg Installed the package with sudo pacman -S ./intel-compute-runtime.... I edited the pacman.conf file in /etc by inserting the following code: IgnorePkg = intel-compute-runtime Started davinci resolve and it works correctly |
Arc needs the git master. There are no releases yet with the appropriate patches for it to work. |
Is this still the case @smunaut ? There was a recent release after your message on Oct 21. |
The 24.39 series contains the fixes I was talking about. |
As discussed in #166 , although the extension has been added recently, only EGL context are supported and having GLX support is required for some applications.
The text was updated successfully, but these errors were encountered: