This is work in progress. The attached patch is a start at implementing accelerated indirect rendering. It applies to the accelerated_indirect-0-0-1 branch. There's a lot of loose end still, but with the current patch, it is possible to run glxgears in indirect rendering mode with acceleration. Moving the mouse, typing on the keyboard, running a wm or other clients crashes the server, but, well... it's work in progress. With the patch, the glx module no longer depends on the GLcore module. The visual initialization process is now in glx/glxvisual.c and glx/glxloader.c locates and dlopen()'s a DRI driver similar to how libGL works on the client side. Updated patches to come, but feedback is welcome.
Created attachment 3727 [details] [review] accelerated indirect rendering patch
While we are doing this work, I think it's about time to remove the mapping of the front buffer from the DRI. This mapping should be left up to the drivers just as it is for the depth, back and other ancilliary buffers. Obviously, this requires some driver work both in the DDX and the 3D drivers, so this is a placeholder that this work should get done.
(In reply to comment #2) > While we are doing this work, I think it's about time to remove the mapping of > the front buffer from the DRI. I'm not sure of the extent of the work you're proposing, but I would prefer to finish the accelerated indirect rendering as a separate step first. We also need to rework the visual initialization process as described by Ians 2005 DDC paper, but that too is something I think can be done after landing this feature. I'm not trying too shoot this down, I'd just like to focus on getting indirect rendering accelerated for now.
*** Bug 2994 has been marked as a duplicate of this bug. ***
Created attachment 3802 [details] [review] New version of AIR patch. Here's a new version of the accelerated indirect rendering patch. I've fixed a bug in my getDrawableInfo implementation so moving and resizing glx drawables now work and I've added the missing swapContext calls to the DRIUnlockedCallback function so this stuff doesn't crash all the time. There is still some races/crashers left to track down, if you move a glx window around enough, it will eventually crash. What happens with the i915 driver is that the drmI830IrqWait ioctl times out for the DRI driver, which causes the server to exit. My current theory is that the context swapping taking place in DRILockTree interfers with the DRIUnlockedCallback.
Created attachment 3873 [details] [review] New version of AIR patch. This patch fixes the last couple of crashers I see with this stuff. There was a couple of bugs in the getDrawableInfo() implementation and the radeon dri driver deadlocked during context destruction as it tried to grab the lock. That's fixed now, and this stuff seems pretty solid now. I'd say it's ready to commit to the accelerated indirect rendering branch now.
Mesa parts of patch split out to bug 5199.
Created attachment 4390 [details] [review] Patch against modular x server Updated version of the patch to apply to the modular x server tree. This patch has been committed to the accel_indirect_glx branch.
Closing this bug, AIGLX is merged to head. Open bugs for specific problems as needed.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.