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 |
There is an open PR I need to address a couple comments on it and update it to latest code, but I'm a bit busy with life stuff ATM so might take a few weeks until I get to it. |
Sorry, unfortunately I don't know either (I'm not driver developer / related to this project, just an occasional bug commenter). |
@Compute-Runtime-Automation, why was this closed - is it fixed? |
@SimonBrandner Hopefully that means #673 will be merged imminently 😅 |
Awesome! |
Thanks so much smunaut and kallaballa for y'alls amazing work, I've been eyeing this issue for year now, so glad to see it fixed, can't wait for to arrive in the arch repos in a few months from now! Truly thank you! |
Hi @specialworld83 @smunaut , I'm running Fedora 41 rawhide with i5-13500 iGPU, following this guide for building mesa branch 23.3-resolve, I get compilation error: ninja -C build64 install
|
@wyup Don't bother with that branch anymore, just build latest mesa release, it has everything you need in it. |
do you mean generic https://gitlab.freedesktop.org/mesa/mesa.git ? There is no resolve branch... and I already have latest 24.0.3 version on my system. I cloned it, but
with previous branch 23.2-resolve https://gitlab.freedesktop.org/246tnt/mesa.git it started building... |
Any chance to add compatibility for intel integrated GPU detection for Resolve by installing corresponding binary rpm packages? I mean, I have latest mesa-dri-drivers, mesa-va-drivers-freeworld, intel-media-driver, intel-compute-runtime, intel-opencl, intel-igc, oneVPL-intel-gpu, mesa-libGL, mesa-libOpenCL.... what else do i need not to build? |
Which distribution ? The latests release of intel-compute-runtime doesn't have the patch yet. It's been merged in master but there was no stable release since. The only distribution to have release a package including the patch is fedora and this happened like ... 12h ago or so. |
I'm on fedora rawhide 41 intel-compute-runtime-23.35.27191.9-1.fc40.x86_64 |
@wyup See https://src.fedoraproject.org/rpms/intel-compute-runtime there is now intel-compute-runtime-24.09.28717.12-1.fc41 since this morning. |
I've upgraded intel-compute-runtime, intel-opencl, intel-level-zero, intel-ocloc and intel-opencl to 24.09.28717.12-1.fc41 but Resolve does not detect iGPU. |
What does |
|
What CPU do you have ? |
i5-13500 |
Maybe you're hitting : #710 ? Are you on kernel 6.8.x ? |
I'm on 6.9.0-0.rc1.17.fc41.x86_64 |
Then you are impacted by the bug. Workaround:
|
And also add |
it works!! you're a hero :-) |
@vidalinux I assume you're on intel Arc ? |
Resolve doesn't start anymore after Fedora update:
kernel: 6.9.0-0.rc4.20240416git96fca68c4fbf7.38.fc41.x86_64 However Resolve was prone to crashes. I couldn't load any h264/aac media files, it crashes. |
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: