EXT_external_objects and EXT_external_objects_fd for the Intel iris driver have been merged into mesa3D! [updated]

This post is a quick status update on OpenGL and Vulkan Interoperability extensions for Linux mesa3D drivers:

Both EXT_external_objects and EXT_external_objects_fd implementations for the Intel iris driver have been finally merged into mesa3D earlier today and will be available in next release! 🎉

Parts of these extensions were already upstream (EXT_semaphore, EXT_semaphore_fd, and some drivers UUID related changes), but the feature could not be used before merging the EXT_memory_object and EXT_memory_object_fd implementations too.

You can read more about previous work on this topic, in my series of posts about OpenGL and Vulkan interoperability on Linux (all posts in sitemap) which I plan to update with one or two posts about semaphore synchronization.


I’ve been working to support these extensions on iris and other drivers for a long time now and I am really happy to finally see them upstream! I’ve also written a Vulkan framework inside Piglit (a tool we use to debug various graphics drivers) in order to add tests for the feature. You can read about these tests in my previous posts on interoperability.

Most of this work had been completed while I was a member of Igalia‘s Graphics team, as part of my work for Igalia. But some contributions that came after I joined Igalia’s WebKit team, were done in my free time, entirely for fun, because I enjoy working on mesa.

There have been many other people who helped with patches, reviews, comments and advices and I’d like to thank them one more time.


Acknowledgments:

I’ve already mentioned most contributors in my previous posts and in my slides for XDC and FOSSCOMM conferences. Below are the names of people who helped submit the EXT_memory_object and EXT_memory_object_fd implementation (that were the missing parts!):

Code contributors:
Tapani Pälli (Intel),
Juan A. Suarez Romero (Igalia),
and myself.

Reviewers:
Tapani Pälli (Intel),
Rohan Garg (Collabora),
Lionel Landwerlin (Intel),
and myself.

For every other person who helped, you can refer to the iris/mesa3d merge request and the slides, and posts I’ve mentioned above!


What’s missing/Coming soon:

[UPDATE:]
As I’ve already written in previous posts, there is no mesa OpenGL driver that can correctly import a Vulkan stencil buffer at the moment. The problem is slightly complex to explain, but it’s related to the fact that stencil buffers are always combined with the depth ones. On iris, we’ve decided to make the external objects feature available without fully supporting the stencil buffer exchange and continue working on it. Tapani Pälli has already done some important work on it (in progress), and continues it on his free time. I also plan to add some extra tests that (I hope that) could help us detect the problem.

Some days after EXT_external_objects have been merged, Tapani Pälli fixed every problem that was blocking importing external Vulkan stencil buffers into OpenGL.

And so, the Intel iris driver is now the first mesa driver that supports combined Depth/Stencil formats with this extension!

Another interesting feature that is coming soon on mesa is the implementation of the same extensions for i965 (the previous Intel driver that is still used in some machines) which is almost completed. After we’ve fixed some problems on iris, and tests, Rohan Garg (who is working on the i965 implementation) was able to continue his development too and he is very close to complete it!


Upcoming posts:

There’s one more topic I’d like to cover in these series of posts, and that’s semaphore synchronization (with EXT_semaphore, EXT_semaphore_fd). I think that it might be useful to share the debugging tricks we’ve used to check the signaling and the waiting, especially because not all the tests we’ve written and used for debugging could be added to Piglit, for reasons I am going to analyze in the follow up post! I hope to find some time to write it during my Easter break. (Easter in Greece arrives with some delay like many other things 🙃, so stay tuned!) 🖖


Links:

[1]: EXT_external_objects
[2]: EXT_external_objects_fd
[3]: Posts on how to use the extensions with examples taken from Piglit



See you next time!


Leave a Reply

Your email address will not be published. Required fields are marked *