This is a very basic test application that uses the available OpenGL & Vulkan interop extensions to render some parts of a scene using OpenGL, and render other parts of the scene using Vulkan.
An OpenGL Framebuffer-Object and a Vulkan Framebuffer/RenderPass are using shared color- & depth-stencil texture attachments (so there is no per-frame texture-blitting or memory-copying involved)
Both APIs always render directly into the shared color- & depth-stencil textures.
Also both APIs are using the typical depth-buffer z-write/z-test provided by the GPU.
Synchronization between the OpenGL and Vulkan APIs is performed using shared device-queue semaphores.
Used extensions:
- GL_EXT_external_objects (GL_EXT_memory_object, GL_EXT_semaphore)
- VK_KHR_external_memory
- VK_KHR_external_semaphore
- NVidia
- ✔️ MSAA
OFF - ✔️ MSAA
ON
- ✔️ MSAA
- AMD
- ✔️ MSAA
OFF - ❌ MSAA
ON... driver crashes/freezes
- ✔️ MSAA
- Intel
- TBD
It looks like the AMD driver crashes/freezes in the glWaitSemaphoreEXT() or glSignalSemaphoreEXT() calls in vk-render.cpp
with MSAA enabled:
vkgl-test OR vkgl-test -msaa
with MSAA disabled:
vkgl-test -no-msaa
.\vcpkg\bootstrap-vcpkg.bat
OR
./vcpkg/bootstrap-vcpkg.sh
cmake . -Bbuild
cmake --build build
cmake --open build