SlideShare a Scribd company logo
OpenGL and Vulkan Interoperability
Eleni Maria Stea <estea@igalia.com>
XDC 2020
Outline
1 OpenGL interoperability extensions
2 Additions to Mesa and Piglit
3 Questions
4 References
Eleni Maria Stea <estea@igalia.com> OpenGL and Vulkan Interoperability XDC 2020 2 / 19
Introduction
Outline
1 OpenGL interoperability extensions
2 Additions to Mesa and Piglit
3 Questions
4 References
Eleni Maria Stea <estea@igalia.com> OpenGL and Vulkan Interoperability XDC 2020 3 / 19
Introduction
Interoperability Concept
INTEROPERABILITY
EXT_external_objects(_fd) extensions enable:
· Allocation of resources (textures, buffers) from Vulkan and sharing
of those resources from both APIs
· Synchronization of the access to shared resources between APIs.
Example: a VR compositor where the left and right eye images are allocated and
displayed by Vulkan but their contents are filled by OpenGL processes.
Eleni Maria Stea <estea@igalia.com> OpenGL and Vulkan Interoperability XDC 2020 4 / 19
Introduction
OpenGL extensions for interoperability on Linux
OpenGL Extensions (Linux)
EXT_external_objects_fd (EXT_memory_object_fd, EXT_semaphore_fd):
▶ enables an OpenGL application to import a memory object or semaphore
from POSIX file descriptor external handles
EXT_external_objects (EXT_memory_object, EXT_semaphore):
▶ enables an OpenGL application to create OpenGL objects corresponding to
Vulkan objects (textures, buffers, semaphores) and synchronize access to
shared objects across APIs
▶ extends existing GL calls that set and query properties
Eleni Maria Stea <estea@igalia.com> OpenGL and Vulkan Interoperability XDC 2020 5 / 19
Interoperability on Mesa
Outline
1 OpenGL interoperability extensions
2 Additions to Mesa and Piglit
3 Questions
4 References
Eleni Maria Stea <estea@igalia.com> OpenGL and Vulkan Interoperability XDC 2020 6 / 19
Interoperability on Mesa
Igalia’s contributions
Work on the feature
Mesa
Igalia contributed to the implementation of the interoperability extensions for
different Mesa drivers.
Piglit (drivers testing framework)
As there were no conformance tests available for the extensions, we’ve written
a Vulkan framework for Piglit and Vulkan/GL tests that cover some common
EXT_external_objects(_fd) use cases.
Eleni Maria Stea <estea@igalia.com> OpenGL and Vulkan Interoperability XDC 2020 7 / 19
Interoperability on Mesa
Additions to Mesa (the details)
Contributions to Mesa drivers
Driver Igalia’s Contributions Status
iris implemented EXT_external_objects, EXT_external_objects_fd under review (MR !4337)
freedreno implemented EXT_external_objects, EXT_external_objects_fd upstream
radeonsi fixes to the already implemented feature work in progress (WIP MR !6364)
i965 helped with the review, patches under review (Draft MR !5594)
Contributors, reviewers, people who helped!
Driver Patches Reviews, Comments, Advice
iris Juan A. Suárez Romero, Eleni Maria Stea, Tapani
Pälli, Eduardo Lima Mitev
Tapani Pälli, Rohan Garg, Eric Engestrom, Kenneth
Graunke, Jason Ekstrand, Oscar Barenys, Daniel
Stone, Matt Turner, Tomeu Vizoso
freedreno Eduardo Lima Mitev, Hyunjun Ko Rob Clark, Marek Olšák, Jonathan Marek, Rohan
Garg
radeonsi The feature was implemented by AMD a few years
ago and we are mostly working on fixes (WIP).
feedback from: Bas Nieuwenhuizen, Marek Olšák
i965 Rohan Garg, Juan A. Suárez Romero, Tapani Pälli Tomeu Vizoso, Eleni Maria Stea, Oscar Barenys
▶ The information above was accurate at the beginning of September when I pre-recorded this presentation!
Apologies if I’ve not included someone or something!
Eleni Maria Stea <estea@igalia.com> OpenGL and Vulkan Interoperability XDC 2020 8 / 19
Interoperability on Mesa
Additions to Piglit (the details) I
Contributions to Piglit I
Reusing color images:
Test name Description Output Status
vk-image-overwrite • Vulkan: allocates images of different
formats and tiling modes
• OpenGL: fills them with green
• Expectation: green screen
upstream
vk-image-display • Vulkan: creates an image and fills it with
colored bars
• OpenGL: draws the image on screen using
semaphores to synchronize access
• Expectation: a stripped image on screen
upstream
vk-image-display-overwrite • Vulkan: creates an image and fills it
• OpenGL: overwrites that image with
another stripped pattern
• Vulkan: reads back the contents of the
image
• Expectation: the modified contents to be
read back
upstream
Eleni Maria Stea <estea@igalia.com> OpenGL and Vulkan Interoperability XDC 2020 9 / 19
Interoperability on Mesa
Additions to Piglit (the details) II
Contributions to Piglit II
Reusing the depth and stencil buffer:
Test name Description Output Status
vk-depth-display • Vulkan: creates a depth buffer pattern
• OpenGL: draws a fullscreen quad at a greater
depth
• Expectation: quad partially obscured
under review
vk-stencil-display • Vulkan: creates a pattern in the stencil buffer
• OpenGL: draws a blue fullscreen quad with stencil
testing
• Expectation: quad masked by stencil pattern
under review
Eleni Maria Stea <estea@igalia.com> OpenGL and Vulkan Interoperability XDC 2020 10 / 19
Interoperability on Mesa
Additions to Piglit (the details) III
Contributions to Piglit III
Reusing a pixel buffer:
Test name Description Output Status
vk-buf-exchange • Vulkan: creates and fills an image with
color bars and copies its content to a
buffer
• OpenGL: uses the buffer as pixel
storage for a texture and displays it
• Expectation: colored bars on screen
upstream
vk-pix-buf-update-errors Same as above and:
• OpenGL: attempts to overwrite the
buffer
• Expectation: error is generated, the
buffer remains unchanged
work in progress
Eleni Maria Stea <estea@igalia.com> OpenGL and Vulkan Interoperability XDC 2020 11 / 19
Interoperability on Mesa
Additions to Piglit (the details) IV
Contributions to Piglit IV
Reusing a vertex buffer:
Test name Description Output Status
vk-vert-buf-update-errors • Vulkan: creates a vertex buffer and
fills it with only the odd quads of a
chess board pattern
• OpenGL: clears the screen to red and
draws the vertex buffer in blue
• OpenGL: attempts to overwrite the
VBO
• Expectation: a red-blue chess board
pattern on screen and an invalid
operation error is generated
work in progress
vk-vert-buf-reuse • Vulkan: same as above
• OpenGL: same as above minus the
invalid overwrite test
• Vulkan: reuses the VBO in a
renderpass to draw the chess board
• Expectation: chessboard on screen
work in progress
Eleni Maria Stea <estea@igalia.com> OpenGL and Vulkan Interoperability XDC 2020 12 / 19
Interoperability on Mesa
Additions to Piglit (the details) V
Contributions to Piglit V
Many people helped us with the work on the tests:
Contributors Contributions
Eleni Maria Stea tests, Vulkan framework code
Juan A. Suárez Romero contributions to the framework, and vk-image-overwrite, testing
Tapani Pälli (many thanks!) reviews, testing and patches for the framework
Bas Nieuwenhuizen framework patch to support dedicated memory
Topi Pohjolainen we’ve used some old patches of him as an example at the very beginning
▶ Also thanks to Eduardo Lima Mitev and to Hyunjun Ko for the reviews and to Germán Poo Caamaño who helped
tidying up the initial mess of the Vulkan framework commits.
▶ Again, this information was accurate when I prepared and pre-recorded the slides. Sorry if I am missing someone
or something!
Eleni Maria Stea <estea@igalia.com> OpenGL and Vulkan Interoperability XDC 2020 13 / 19
Interoperability on Mesa
Piglit Results
Conclusions from running the tests:
▶ Most of the new Piglit tests are passing in the mesa drivers
mentioned before (iris, freedreno, radeonsi, i965).
▶ Unfortunately Mesa does not yet support the depth and stencil
buffer exchange. The only implementation I ’ve found that
currently supports this feature is the Nvidia proprietary driver.
▶ radeonsi needs some fixes to better support buffers and
optimal tiling (WIP).
Eleni Maria Stea <estea@igalia.com> OpenGL and Vulkan Interoperability XDC 2020 14 / 19
Q & A
Outline
1 OpenGL interoperability extensions
2 Additions to Mesa and Piglit
3 Questions
4 References
Eleni Maria Stea <estea@igalia.com> OpenGL and Vulkan Interoperability XDC 2020 15 / 19
Q & A
Questions?
E-mail: estea@igalia.com
IRC/Freenode: hikiko
Eleni Maria Stea <estea@igalia.com> OpenGL and Vulkan Interoperability XDC 2020 16 / 19
References
Outline
1 OpenGL interoperability extensions
2 Additions to Mesa and Piglit
3 Questions
4 References
Eleni Maria Stea <estea@igalia.com> OpenGL and Vulkan Interoperability XDC 2020 17 / 19
References
Links I
OpenGL and Vulkan Interoperability on Linux (Blog posts on the Piglit tests use
cases).
https://eleni.mutantstargoat.com/hikiko/category/igalia/
graphics_drivers/opengl-and-vulkan-interoperability/.
Carsten Rohde, Dave Airlie, James Jones, Jan-Harald Fredriksen, Jeff Juliano,
and Michael Worcester.
EXT_external_objects (GL_EXT_memory_object, GL_EXT_semaphore), July 18, 2018.
https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_
external_objects.txt.
Carsten Rhode, James Jones, Jan Harald Fredriksen, and Jeff Juliano.
EXT_external_objects_fd (GL_EXT_memory_object_fd, GL_EXT_semaphore_fd), June
2, 2017.
https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_
external_objects_fd.txt.
Eleni Maria Stea <estea@igalia.com> OpenGL and Vulkan Interoperability XDC 2020 18 / 19
Thank you!

More Related Content

What's hot (20)

PDF
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
Igalia
 
PDF
Kiosk-mode browser using Chromium Embedded Framework (CEF)
Igalia
 
PDF
Multimedia in WebKitGtk+, past/present/future
philn2
 
PDF
Petri Niemi Qt Web Kit
NokiaAppForum
 
PPT
Gnome on wayland at a glance
gnomekr
 
PDF
WebKit, HTML5 media and GStreamer on multiple platforms
philn2
 
PDF
Efficient multimedia support in QtWebKit on Raspberry Pi (GStreamer Conferenc...
Igalia
 
PDF
Lessons learned from the charts repo
Victor Iglesias
 
PDF
Ewebkit basic (Web rendering enging of EFL)
ryuan choi
 
PDF
WPE WebKit for Android
Igalia
 
PPTX
Exploring Next Generation Buildpacks - Anand Rao & Scott Deeg
VMware Tanzu
 
PDF
A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...
Igalia
 
PDF
Environment management in a continuous delivery world (3)
Victor Iglesias
 
PDF
Introduction to QtWebKit
Ariya Hidayat
 
PDF
Testing cloud and kubernetes applications - ElasTest
Micael Gallego
 
PDF
WebKit and GStreamer
calvaris
 
PDF
Fantastic Buildpacks and Where to Find Them
Joe Kutner
 
PDF
WebKit2 And You (GUADEC 2013)
Igalia
 
PDF
Headless Drupal: A modern approach to (micro)services and APIs
sparkfabrik
 
PDF
Integration of the Chromium Browser in the GENIVI Platform (16th GENIVI AMM)
Igalia
 
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
Igalia
 
Kiosk-mode browser using Chromium Embedded Framework (CEF)
Igalia
 
Multimedia in WebKitGtk+, past/present/future
philn2
 
Petri Niemi Qt Web Kit
NokiaAppForum
 
Gnome on wayland at a glance
gnomekr
 
WebKit, HTML5 media and GStreamer on multiple platforms
philn2
 
Efficient multimedia support in QtWebKit on Raspberry Pi (GStreamer Conferenc...
Igalia
 
Lessons learned from the charts repo
Victor Iglesias
 
Ewebkit basic (Web rendering enging of EFL)
ryuan choi
 
WPE WebKit for Android
Igalia
 
Exploring Next Generation Buildpacks - Anand Rao & Scott Deeg
VMware Tanzu
 
A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...
Igalia
 
Environment management in a continuous delivery world (3)
Victor Iglesias
 
Introduction to QtWebKit
Ariya Hidayat
 
Testing cloud and kubernetes applications - ElasTest
Micael Gallego
 
WebKit and GStreamer
calvaris
 
Fantastic Buildpacks and Where to Find Them
Joe Kutner
 
WebKit2 And You (GUADEC 2013)
Igalia
 
Headless Drupal: A modern approach to (micro)services and APIs
sparkfabrik
 
Integration of the Chromium Browser in the GENIVI Platform (16th GENIVI AMM)
Igalia
 

Similar to About OpenGL and Vulkan interoperability (XDC 2020) (20)

PDF
Webgl 기술동향 2011.8
Seung Joon Choi
 
PDF
[E-Dev-Day 2014][14/16] Adding vector graphics support to EFL
EnlightenmentProject
 
PDF
State of GeoServer 2.10
Jody Garnett
 
PPT
PDE2011 pythonOCC project status and plans
Thomas Paviot
 
PPTX
Migrating from OpenGL to Vulkan
Mark Kilgard
 
PPTX
13th kandroid OpenGL and EGL
Jungsoo Nam
 
PDF
SDVIs and In-Situ Visualization on TACC's Stampede
Intel® Software
 
PDF
Android native gl
Miguel Angel Alcalde Velado
 
PDF
Guides To Analyzing WebKit Performance
National Cheng Kung University
 
PDF
Deep Learning for Java Developer - Getting Started
Suyash Joshi
 
PDF
Duel of Two Libraries: Cairo & Skia
Samsung Open Source Group
 
PPT
Advanced Graphics Workshop - GFX2011
Prabindh Sundareson
 
PDF
14 Years of Developing nCine - An Open Source 2D Game Framework
Angelo Theodorou
 
PDF
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware
 
PDF
EclipseCon 2016 - OCCIware : one Cloud API to rule them all
Marc Dutoo
 
PDF
The Next Generation Eclipse Graphical Editing Framework
Alexander Nyßen
 
PPT
SWT - Technical Deep Dive
Eclipse Day India
 
PDF
DCEU 18: App-in-a-Box with Docker Application Packages
Docker, Inc.
 
PDF
Angular 12 brought several new features to the table
Moon Technolabs Pvt. Ltd.
 
PDF
Discovering Your AI Super Powers - Tips and Tricks to Jumpstart your AI Projects
Wee Hyong Tok
 
Webgl 기술동향 2011.8
Seung Joon Choi
 
[E-Dev-Day 2014][14/16] Adding vector graphics support to EFL
EnlightenmentProject
 
State of GeoServer 2.10
Jody Garnett
 
PDE2011 pythonOCC project status and plans
Thomas Paviot
 
Migrating from OpenGL to Vulkan
Mark Kilgard
 
13th kandroid OpenGL and EGL
Jungsoo Nam
 
SDVIs and In-Situ Visualization on TACC's Stampede
Intel® Software
 
Android native gl
Miguel Angel Alcalde Velado
 
Guides To Analyzing WebKit Performance
National Cheng Kung University
 
Deep Learning for Java Developer - Getting Started
Suyash Joshi
 
Duel of Two Libraries: Cairo & Skia
Samsung Open Source Group
 
Advanced Graphics Workshop - GFX2011
Prabindh Sundareson
 
14 Years of Developing nCine - An Open Source 2D Game Framework
Angelo Theodorou
 
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware
 
EclipseCon 2016 - OCCIware : one Cloud API to rule them all
Marc Dutoo
 
The Next Generation Eclipse Graphical Editing Framework
Alexander Nyßen
 
SWT - Technical Deep Dive
Eclipse Day India
 
DCEU 18: App-in-a-Box with Docker Application Packages
Docker, Inc.
 
Angular 12 brought several new features to the table
Moon Technolabs Pvt. Ltd.
 
Discovering Your AI Super Powers - Tips and Tricks to Jumpstart your AI Projects
Wee Hyong Tok
 
Ad

More from Igalia (20)

PDF
Life of a Kernel Bug Fix
Igalia
 
PDF
Unlocking the Full Potential of WPE to Build a Successful Embedded Product
Igalia
 
PDF
Advancing WebDriver BiDi support in WebKit
Igalia
 
PDF
Jumping Over the Garden Wall - WPE WebKit on Android
Igalia
 
PDF
Collective Funding, Governance and Prioritiation of Browser Engine Projects
Igalia
 
PDF
Don't let your motivation go, save time with kworkflow
Igalia
 
PDF
Solving the world’s (localization) problems
Igalia
 
PDF
The Whippet Embeddable Garbage Collection Library
Igalia
 
PDF
Nobody asks "How is JavaScript?"
Igalia
 
PDF
Getting more juice out from your Raspberry Pi GPU
Igalia
 
PDF
WebRTC support in WebKitGTK and WPEWebKit with GStreamer: Status update
Igalia
 
PDF
Demystifying Temporal: A Deep Dive into JavaScript New Temporal API
Igalia
 
PDF
CSS :has() Unlimited Power
Igalia
 
PDF
Device-Generated Commands in Vulkan
Igalia
 
PDF
Current state of Lavapipe: Mesa's software renderer for Vulkan
Igalia
 
PDF
Vulkan Video is Open: Application showcase
Igalia
 
PDF
Scheme on WebAssembly: It is happening!
Igalia
 
PDF
EBC - A new backend compiler for etnaviv
Igalia
 
PDF
RISC-V LLVM State of the Union
Igalia
 
PDF
Device-Generated Commands in Vulkan
Igalia
 
Life of a Kernel Bug Fix
Igalia
 
Unlocking the Full Potential of WPE to Build a Successful Embedded Product
Igalia
 
Advancing WebDriver BiDi support in WebKit
Igalia
 
Jumping Over the Garden Wall - WPE WebKit on Android
Igalia
 
Collective Funding, Governance and Prioritiation of Browser Engine Projects
Igalia
 
Don't let your motivation go, save time with kworkflow
Igalia
 
Solving the world’s (localization) problems
Igalia
 
The Whippet Embeddable Garbage Collection Library
Igalia
 
Nobody asks "How is JavaScript?"
Igalia
 
Getting more juice out from your Raspberry Pi GPU
Igalia
 
WebRTC support in WebKitGTK and WPEWebKit with GStreamer: Status update
Igalia
 
Demystifying Temporal: A Deep Dive into JavaScript New Temporal API
Igalia
 
CSS :has() Unlimited Power
Igalia
 
Device-Generated Commands in Vulkan
Igalia
 
Current state of Lavapipe: Mesa's software renderer for Vulkan
Igalia
 
Vulkan Video is Open: Application showcase
Igalia
 
Scheme on WebAssembly: It is happening!
Igalia
 
EBC - A new backend compiler for etnaviv
Igalia
 
RISC-V LLVM State of the Union
Igalia
 
Device-Generated Commands in Vulkan
Igalia
 
Ad

Recently uploaded (20)

PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PPT
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
PDF
Python basic programing language for automation
DanialHabibi2
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
July Patch Tuesday
Ivanti
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
Python basic programing language for automation
DanialHabibi2
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
July Patch Tuesday
Ivanti
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 

About OpenGL and Vulkan interoperability (XDC 2020)

  • 1. OpenGL and Vulkan Interoperability Eleni Maria Stea <[email protected]> XDC 2020
  • 2. Outline 1 OpenGL interoperability extensions 2 Additions to Mesa and Piglit 3 Questions 4 References Eleni Maria Stea <[email protected]> OpenGL and Vulkan Interoperability XDC 2020 2 / 19
  • 3. Introduction Outline 1 OpenGL interoperability extensions 2 Additions to Mesa and Piglit 3 Questions 4 References Eleni Maria Stea <[email protected]> OpenGL and Vulkan Interoperability XDC 2020 3 / 19
  • 4. Introduction Interoperability Concept INTEROPERABILITY EXT_external_objects(_fd) extensions enable: · Allocation of resources (textures, buffers) from Vulkan and sharing of those resources from both APIs · Synchronization of the access to shared resources between APIs. Example: a VR compositor where the left and right eye images are allocated and displayed by Vulkan but their contents are filled by OpenGL processes. Eleni Maria Stea <[email protected]> OpenGL and Vulkan Interoperability XDC 2020 4 / 19
  • 5. Introduction OpenGL extensions for interoperability on Linux OpenGL Extensions (Linux) EXT_external_objects_fd (EXT_memory_object_fd, EXT_semaphore_fd): ▶ enables an OpenGL application to import a memory object or semaphore from POSIX file descriptor external handles EXT_external_objects (EXT_memory_object, EXT_semaphore): ▶ enables an OpenGL application to create OpenGL objects corresponding to Vulkan objects (textures, buffers, semaphores) and synchronize access to shared objects across APIs ▶ extends existing GL calls that set and query properties Eleni Maria Stea <[email protected]> OpenGL and Vulkan Interoperability XDC 2020 5 / 19
  • 6. Interoperability on Mesa Outline 1 OpenGL interoperability extensions 2 Additions to Mesa and Piglit 3 Questions 4 References Eleni Maria Stea <[email protected]> OpenGL and Vulkan Interoperability XDC 2020 6 / 19
  • 7. Interoperability on Mesa Igalia’s contributions Work on the feature Mesa Igalia contributed to the implementation of the interoperability extensions for different Mesa drivers. Piglit (drivers testing framework) As there were no conformance tests available for the extensions, we’ve written a Vulkan framework for Piglit and Vulkan/GL tests that cover some common EXT_external_objects(_fd) use cases. Eleni Maria Stea <[email protected]> OpenGL and Vulkan Interoperability XDC 2020 7 / 19
  • 8. Interoperability on Mesa Additions to Mesa (the details) Contributions to Mesa drivers Driver Igalia’s Contributions Status iris implemented EXT_external_objects, EXT_external_objects_fd under review (MR !4337) freedreno implemented EXT_external_objects, EXT_external_objects_fd upstream radeonsi fixes to the already implemented feature work in progress (WIP MR !6364) i965 helped with the review, patches under review (Draft MR !5594) Contributors, reviewers, people who helped! Driver Patches Reviews, Comments, Advice iris Juan A. Suárez Romero, Eleni Maria Stea, Tapani Pälli, Eduardo Lima Mitev Tapani Pälli, Rohan Garg, Eric Engestrom, Kenneth Graunke, Jason Ekstrand, Oscar Barenys, Daniel Stone, Matt Turner, Tomeu Vizoso freedreno Eduardo Lima Mitev, Hyunjun Ko Rob Clark, Marek Olšák, Jonathan Marek, Rohan Garg radeonsi The feature was implemented by AMD a few years ago and we are mostly working on fixes (WIP). feedback from: Bas Nieuwenhuizen, Marek Olšák i965 Rohan Garg, Juan A. Suárez Romero, Tapani Pälli Tomeu Vizoso, Eleni Maria Stea, Oscar Barenys ▶ The information above was accurate at the beginning of September when I pre-recorded this presentation! Apologies if I’ve not included someone or something! Eleni Maria Stea <[email protected]> OpenGL and Vulkan Interoperability XDC 2020 8 / 19
  • 9. Interoperability on Mesa Additions to Piglit (the details) I Contributions to Piglit I Reusing color images: Test name Description Output Status vk-image-overwrite • Vulkan: allocates images of different formats and tiling modes • OpenGL: fills them with green • Expectation: green screen upstream vk-image-display • Vulkan: creates an image and fills it with colored bars • OpenGL: draws the image on screen using semaphores to synchronize access • Expectation: a stripped image on screen upstream vk-image-display-overwrite • Vulkan: creates an image and fills it • OpenGL: overwrites that image with another stripped pattern • Vulkan: reads back the contents of the image • Expectation: the modified contents to be read back upstream Eleni Maria Stea <[email protected]> OpenGL and Vulkan Interoperability XDC 2020 9 / 19
  • 10. Interoperability on Mesa Additions to Piglit (the details) II Contributions to Piglit II Reusing the depth and stencil buffer: Test name Description Output Status vk-depth-display • Vulkan: creates a depth buffer pattern • OpenGL: draws a fullscreen quad at a greater depth • Expectation: quad partially obscured under review vk-stencil-display • Vulkan: creates a pattern in the stencil buffer • OpenGL: draws a blue fullscreen quad with stencil testing • Expectation: quad masked by stencil pattern under review Eleni Maria Stea <[email protected]> OpenGL and Vulkan Interoperability XDC 2020 10 / 19
  • 11. Interoperability on Mesa Additions to Piglit (the details) III Contributions to Piglit III Reusing a pixel buffer: Test name Description Output Status vk-buf-exchange • Vulkan: creates and fills an image with color bars and copies its content to a buffer • OpenGL: uses the buffer as pixel storage for a texture and displays it • Expectation: colored bars on screen upstream vk-pix-buf-update-errors Same as above and: • OpenGL: attempts to overwrite the buffer • Expectation: error is generated, the buffer remains unchanged work in progress Eleni Maria Stea <[email protected]> OpenGL and Vulkan Interoperability XDC 2020 11 / 19
  • 12. Interoperability on Mesa Additions to Piglit (the details) IV Contributions to Piglit IV Reusing a vertex buffer: Test name Description Output Status vk-vert-buf-update-errors • Vulkan: creates a vertex buffer and fills it with only the odd quads of a chess board pattern • OpenGL: clears the screen to red and draws the vertex buffer in blue • OpenGL: attempts to overwrite the VBO • Expectation: a red-blue chess board pattern on screen and an invalid operation error is generated work in progress vk-vert-buf-reuse • Vulkan: same as above • OpenGL: same as above minus the invalid overwrite test • Vulkan: reuses the VBO in a renderpass to draw the chess board • Expectation: chessboard on screen work in progress Eleni Maria Stea <[email protected]> OpenGL and Vulkan Interoperability XDC 2020 12 / 19
  • 13. Interoperability on Mesa Additions to Piglit (the details) V Contributions to Piglit V Many people helped us with the work on the tests: Contributors Contributions Eleni Maria Stea tests, Vulkan framework code Juan A. Suárez Romero contributions to the framework, and vk-image-overwrite, testing Tapani Pälli (many thanks!) reviews, testing and patches for the framework Bas Nieuwenhuizen framework patch to support dedicated memory Topi Pohjolainen we’ve used some old patches of him as an example at the very beginning ▶ Also thanks to Eduardo Lima Mitev and to Hyunjun Ko for the reviews and to Germán Poo Caamaño who helped tidying up the initial mess of the Vulkan framework commits. ▶ Again, this information was accurate when I prepared and pre-recorded the slides. Sorry if I am missing someone or something! Eleni Maria Stea <[email protected]> OpenGL and Vulkan Interoperability XDC 2020 13 / 19
  • 14. Interoperability on Mesa Piglit Results Conclusions from running the tests: ▶ Most of the new Piglit tests are passing in the mesa drivers mentioned before (iris, freedreno, radeonsi, i965). ▶ Unfortunately Mesa does not yet support the depth and stencil buffer exchange. The only implementation I ’ve found that currently supports this feature is the Nvidia proprietary driver. ▶ radeonsi needs some fixes to better support buffers and optimal tiling (WIP). Eleni Maria Stea <[email protected]> OpenGL and Vulkan Interoperability XDC 2020 14 / 19
  • 15. Q & A Outline 1 OpenGL interoperability extensions 2 Additions to Mesa and Piglit 3 Questions 4 References Eleni Maria Stea <[email protected]> OpenGL and Vulkan Interoperability XDC 2020 15 / 19
  • 16. Q & A Questions? E-mail: [email protected] IRC/Freenode: hikiko Eleni Maria Stea <[email protected]> OpenGL and Vulkan Interoperability XDC 2020 16 / 19
  • 17. References Outline 1 OpenGL interoperability extensions 2 Additions to Mesa and Piglit 3 Questions 4 References Eleni Maria Stea <[email protected]> OpenGL and Vulkan Interoperability XDC 2020 17 / 19
  • 18. References Links I OpenGL and Vulkan Interoperability on Linux (Blog posts on the Piglit tests use cases). https://eleni.mutantstargoat.com/hikiko/category/igalia/ graphics_drivers/opengl-and-vulkan-interoperability/. Carsten Rohde, Dave Airlie, James Jones, Jan-Harald Fredriksen, Jeff Juliano, and Michael Worcester. EXT_external_objects (GL_EXT_memory_object, GL_EXT_semaphore), July 18, 2018. https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_ external_objects.txt. Carsten Rhode, James Jones, Jan Harald Fredriksen, and Jeff Juliano. EXT_external_objects_fd (GL_EXT_memory_object_fd, GL_EXT_semaphore_fd), June 2, 2017. https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_ external_objects_fd.txt. Eleni Maria Stea <[email protected]> OpenGL and Vulkan Interoperability XDC 2020 18 / 19