One important part of the implementation of the EXT_external_objects and EXT_external_objects_fd groups of extensions for iris (the Intel gallium OpenGL driver) was the semaphore synchronization (EXT_semaphore extension). We’ve seen how the GL semaphores structs and functions that are introduced by this extension should be used in previous interoperability posts. In this post, I’ll try to describe the methods we’ve used to debug the EXT_semaphore implementation itself as well as the fences backend of the iris driver without getting into many driver internals details.
More than a year ago, I had worked on the implementation of VK_EXT_sample_locations extension for anv, the Intel Vulkan driver of mesa3D, as part of my work for Igalia. The implementation had been reviewed (see acknowledgments) at the time, but as the conformance tests that were available back then had to be improved and that was work in progress, the feature was stalled, and I had forgotten about it… Until some weeks ago, when I realized that it has been merged into mesa! 🎉
As this feature is now available to the users, I’ve decided to write a short blog post to explain what this extension is about. You can read the extension’s specification if you are interested in learning how to use it and other details.
FOSSCOMM (Free and Open Source Software Communities Meeting) is a Greek conference aiming to promote the use of FOSS in Greece and to bring FOSS enthusiasts together. It is organized entirely by volunteers and universities and takes place in a different city each year. This year it was virtual as Greece is under lockdown, and although we’ve missed all the fun of the gathering, there were many interesting talks to watch.
My talk was very similar to the one I’ve given in XDC 2020 about OpenGL and Vulkan Interoperability. It was an update on the EXT_external_objects and EXT_external_objects_fd OpenGL extensions status on various mesa drivers, and Igalia‘s work on them.
Vulkan conformance tests for graphics drivers save their output images inside an XML file called
TestResults.qpa. As binary outputs aren’t allowed, these output images (that would be saved as PNG otherwise) are encoded to text using Base64 and the result is printed between
<Image></Image> XML tags. This is a problem sometimes, as external tools are required to display them. In this post I’d like to share a few simple hacks I’m using to instantly display the CTS output image when I’m running a CTS test, hoping that they might be handy to more people who work on the drivers.
This is 10th post on OpenGL and Vulkan interoperability with EXT_external_objects and EXT_external_objects_fd. We’ll see the last use case I’ve written for Piglit to test the extensions implementation on various mesa drivers as part of my work for Igalia. In this test a stencil buffer is allocated and filled with a pattern by Vulkan and then it is used in OpenGL to render something else. We validate that the pattern has been imported correctly and we repeat the process for other depth-stencil formats.
In this 9th post on OpenGL and Vulkan interoperability on Linux with EXT_external_objects and EXT_external_objects_fd we are going to see another extensions use case where a Vulkan depth buffer is used to render a pattern with OpenGL. Like every other example use case described in these posts, it was implemented for Piglit as part of my work for Igalia‘s graphics team to check the extensions implementation of various mesa drivers.
This is the 8th post on OpenGL and Vulkan Interoperability with EXT_external_objects and EXT_external_objects_fd where I explain some example use cases of the extensions I’ve implemented for Piglit as part of my work for Igalia. In this example, a Vulkan vertex buffer is created and filled with vertices and then it’s used to render the same chess board pattern once with OpenGL and once with Vulkan.
This is the 7th post on OpenGL and Vulkan Interoperability with EXT_external_objects. It’s about another EXT_external_objects use case implemented for Piglit as part of my work for Igalia‘s graphics team. In this case a vertex buffer is allocated and filled with data from Vulkan and then it’s used from OpenGL to render a pattern on screen.
This blog post (originally published on: Oct 18, 2020) has been updated in 2022 because some information was inaccurate.
I had misinterpreted a part of the spec about memory mapping and thought that we can’t really overwrite Vulkan allocated buffers. That had to do with the Intel cards memory organization where the GPU memory is RAM and we usually map it the same way we map user allocated memory. I am pretty sure that buffers should be overwritten now, and so I am planning to extend these series with buffer overwriting examples in the future.
Afaik, Tapani Pälli is working on supporting this feature on Intel and AMD might have some support already (I plan to check) so I believe that it will be soon available in most mesa drivers that support the interoperability extensions.
More blog posts about it coming (hopefully) soon!
-  EXT_external_objects specification
-  EXT_external_objects_fd specification
-  Previous posts on interoperability:
- [OpenGL and Vulkan Interoperability on Linux] Part 1: Introduction
- [OpenGL and Vulkan Interoperability on Linux] Part 2: Using OpenGL to draw on Vulkan textures.
- [OpenGL and Vulkan Interoperability on Linux] Part 3: Using OpenGL to display Vulkan allocated textures.
- [OpenGL and Vulkan Interoperability on Linux] Part 4: Using OpenGL to overwrite Vulkan allocated textures.
- [OpenGL and Vulkan Interoperability on Linux] Part 5: A Vulkan pixel buffer is reused by OpenGL