Skip to content

Vulkan-OpenGL interoperability tests

Eleni Maria Stea requested to merge (removed):review/ext_external_objects into master

We've started working on some tests for Vulkan-OpenGL interoperability as described in EXT_external_objects EXT_external_objects_fd extensions. In this branch we included our first tests. We would like to extend them and write more of them after we receive some feedback on our approach.

Some info about the branch and the commits:

  • First we've groupped some existing tests about api-errors into EXT_external_objects and EXT_external_objects_fd groups in directories tests/spec/ext_external_objects and tests/spec/ext_external_objects_fd respectively.
  • Then we've written a small Vulkan "framework" in vk.h/vk.c in tests/spec/ext_external_objects directory that consists of Vulkan rendering and allocation helper functions and some interoperability helper functions in interop.h/.c.
  • We've then started working on different tests that involve interoperability. We've added the two that we thought that cover the most common cases of interoperability, but we are planning to continue working on more of them:
    • The first test is the vk-image-override. It allocates different format images using Vulkan. Then it creates a memory object and a texture from each image using OpenGL and it uses OpenGL and FBO/RBO rendering to clear the texture. Then an OpenGL shader program is used to compare the sampled color with an expected color and when there is a match the output is green when not red. At the end we probe for green. The reason we have used the comparison with the expected_color was that we wanted the test to work for uint and int textures and formats too and we couldn't use the output color for rendering without conversions take place.
    • The second test (vk-image-display) allocates and fills an image using Vulkan. OpenGL creates a memory object and a texture from the image and displays it and probes the color of different pixels. If all of them match the expected colors it passes otherwise it fails. We use semaphores to synchronize the two APIs' access to texture.

Merge request reports