1 \documentclass[usenames,dvipsnames]{beamer}
2 \usepackage[font=small,skip=-1pt]{caption}
4 \usepackage{color, colortbl}
11 \usepackage{tgpagella}
12 \usepackage[utf8]{inputenc}
14 \usepackage{tabularx, array, booktabs}
18 \usepackage{adjustbox}
20 \newcommand\topalign[1]{%
22 \raisebox{\dimexpr-\ht0+\dp0\relax}{\usebox0}}
24 \definecolor{blond}{rgb}{0.98, 0.94, 0.75}
25 \definecolor{beige}{rgb}{0.96, 0.96, 0.86}
26 \definecolor{mGreen}{rgb}{0,0.6,0}
27 \definecolor{mGray}{rgb}{0.5,0.5,0.5}
28 \definecolor{mPurple}{rgb}{0.58,0,0.82}
29 \definecolor{bgcolor}{rgb}{0.8,0.8,0.8}
30 \definecolor{afblue}{rgb}{0.46, 0.64, 0.76}
31 \definecolor{coolblack}{rgb}{0.0, 0.18, 0.39}
32 \definecolor{paleaqua}{rgb}{0.74, 0.83, 0.9}
33 \definecolor{platinum}{rgb}{0.9, 0.89, 0.89}
34 \definecolor{whitesmoke}{rgb}{0.96, 0.96, 0.96}
35 \definecolor{carolinablue}{rgb}{0.6, 0.73, 0.89}
36 \definecolor{amber}{rgb}{1.0, 0.75, 0.0}
37 \definecolor{deepjunglegreen}{rgb}{0.0, 0.29, 0.29}
38 \definecolor{mediumred-violet}{rgb}{0.73, 0.2, 0.52}
39 \definecolor{babypink}{rgb}{0.96, 0.76, 0.76}
40 \definecolor{beaublue}{rgb}{0.74, 0.83, 0.9}
41 \definecolor{bananayellow}{rgb}{1.0, 0.88, 0.21}
42 \definecolor{bananamania}{rgb}{0.98, 0.91, 0.81}
44 \lstdefinestyle{CStyle}{
45 language=C++, % choose the language of the code
46 % basicstyle=\footnotesize, % the size of the fonts that are used for the code
47 basicstyle=\tt\color{afblue},
48 breakatwhitespace=false,
50 backgroundcolor=\color{bgcolor}, % choose the background color. You must add \usepackage{color}
51 showspaces=false, % show spaces adding particular underscores
52 showstringspaces=false, % underline spaces within strings
53 showtabs=false, % show tabs within strings adding particular underscores
54 frame=single, % adds a frame around the code
55 tabsize=2, % sets default tabsize to 2 spaces
56 captionpos=b, % sets the caption-position to bottom
57 breaklines=true, % sets automatic line breaking
58 breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace
59 commentstyle=\color{mGreen},
60 keywordstyle=\color{magenta},
61 stringstyle=\color{mPurple},
62 rulesepcolor=\color{gray},
63 rulecolor=\color{black},
66 \setmainfont{Noto Sans} % substitute with any font that exists on your system
67 \setsansfont{Noto Sans} % substitute with any font that exists on your system
68 \setmonofont{Noto Sans Mono Medium} % substitute with any font that exists on your system
71 \useoutertheme{infolines}
74 \captionsetup[figure]{labelformat=empty}
76 \addtobeamertemplate{headline}{}{\vskip2pt}
77 \addtobeamertemplate{headline}{}{%
78 \begin{textblock*}{5mm}(.9\textwidth,-0.6cm)
79 \includegraphics[height=0.67cm]{data/igalia-logo.png}
82 \definecolor{links}{rgb}{0.1, 0.3, 0.6}
83 \hypersetup{colorlinks,linkcolor=,urlcolor=links}
85 \pgfdeclareimage[height=\paperheight]{igaliabglight}{data/igalia_bg_light.eps}
86 \pgfdeclareimage[height=\paperheight]{igaliabg}{data/igaliabg.eps}
88 %\setbeamertemplate{title page}{
89 % \begin{picture}(-90, 180)
91 % \pgfuseimage{igaliabg}
95 % \begin{minipage}[b][36mm][t]{240mm}
96 % \usebeamerfont{title}{\inserttitle\par}
97 % \usebeamerfont{author}{\insertauthor\par}
98 % \usebeamerfont{title}{\insertinstitute\par}
104 \setbeamertemplate{navigation symbols}{}
105 \setbeamertemplate{title page}{
108 \pgfuseimage{igaliabg}
112 \begin{minipage}[b][38mm][t]{220mm}
113 \usebeamerfont{title}{\inserttitle\par}
114 \usebeamerfont{author}{\insertauthor\par}
119 \usebeamerfont{date}{\huge{{\insertdate}}\par}
124 \setbeamertemplate{itemize items}[triangle]
125 \setbeamertemplate{itemize subitem}[circle]
126 \setbeamerfont{frametitle}{size=\small}
128 \setbeamertemplate{blocks}[default]
129 \setbeamercolor{block title}{fg=amber,bg=black}
131 \title{\textbf{OpenGL and Vulkan Interoperability}}
132 \author[Eleni Maria Stea <estea@igalia.com>]{\small{Eleni Maria Stea
133 <estea@igalia.com>}\\\\\includegraphics{data/igalia.eps}}
140 \tableofcontents[currentsection]
144 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
146 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
157 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
159 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
160 \section[Introduction]{OpenGL and Vulkan interoperability extensions}
161 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
163 \begin{frame}[fragile,c]
164 \frametitle{OpenGL and Vulkan Interoperability Concept}
167 \textbf{\color{coolblack}{INTEROPERABILITY}}
171 % The idea is to avoid unnecessary allocations and conversions when we
172 % exchange texture and buffer data across APIs.\\
179 \color{paleaqua}{EXT\_external\_objects(\_fd) extensions allow:}
184 \small{· \color{coolblack}{\textbf{Allocating} resources (like textures,
185 buffers) \textbf{once} from Vulkan.}}\\
187 \small{· \color{coolblack}{\textbf{Reusing} them \textbf{several times} from
190 \small{· \color{coolblack}{\textbf{Synchronizing} the APIs access to
198 \footnotesize{\textbf{Example:} a VR compositor where the left and right eye
199 images are allocated and displayed by Vulkan but their contents are filled by
203 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
205 \begin{frame}[fragile]
206 \frametitle{OpenGL extensions for interoperability on Linux}
208 \center{\textbf{\color{coolblack}{OpenGL Extensions (Linux)}}}
211 \setbeamertemplate{itemize/enumerate body begin}{\footnotesize}
212 \setbeamertemplate{itemize/enumerate subbody begin}{\tiny}
213 \setbeamertemplate{itemize/enumerate subsubbody begin}{\tiny}
215 \setbeamertemplate{itemize items}[triangle]
216 \setbeamertemplate{blocks}[rounded][shadow]
218 \begin{block}{\color{afblue}{\footnotesize\textbf{EXT\_external\_object\_fd
219 (EXT\_memory\_object\_fd, EXT\_semaphore\_fd)}:}}
221 \item enables an OpenGL application to import a memory object or
222 semaphore from POSIX file descriptor external handles
223 (\textbf{Linux only!})
229 \begin{block}{\color{afblue}{\footnotesize\textbf{EXT\_external\_object
230 (EXT\_memory\_object, EXT\_semaphore)}:}}
232 \item enables an OpenGL application to:
235 \setbeamertemplate{itemize/enumerate subbody begin}{\normalsize}
237 \item[--] create OpenGL objects, textures buffers and semaphores from
238 imported Vulkan memory
239 \item[--] synchronize the rendering using the GL semaphores
242 \item {extends existing GL calls that set and query properties}
247 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
248 \section[Interoperability on Mesa]{Additions to Mesa and Piglit}
249 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
251 \frametitle{Igalia's contributions}
253 \setbeamertemplate{blocks}[rounded]
255 \normalsize{\textbf{\color{coolblack}{Work on the feature}}}
262 Igalia contributed to the implementation of the interoperability
263 extensions for different {\color{deepjunglegreen}\textbf{Mesa
270 \begin{block}{Piglit (drivers testing framework)}
272 As there were \textbf{no CTS}, we've written a Vulkan framework for
273 {\color{coolblack}\textbf{Piglit}} and Vulkan/GL tests that cover
275 EXT\_external\_objects(\_fd) use cases.
280 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
283 \frametitle{Additions to Mesa (the details)}
286 \normalsize{\textbf{\color{coolblack}{Contributions to Mesa
291 \begin{tabularx}{\textwidth}{|l|X|l|}
294 Driver & Igalia's Contributions & Status \\
298 iris & \textbf{\color{coolblack}implemented} EXT\_external\_objects,
299 EXT\_external\_objects\_fd & \cellcolor{babypink}{under review (MR
301 \rowcolor{whitesmoke}
302 freedreno & \textbf{\color{coolblack}implemented} EXT\_external\_objects,
303 EXT\_external\_objects\_fd & \cellcolor{green}{upstream} \\
305 radeonsi & \textbf{\color{coolblack}fixes} to the already implemented feature &
306 \cellcolor{bananamania}{work in
307 progress (WIP MR !6364)} \\
308 \rowcolor{whitesmoke}
309 i965 & helped with the \textbf{\color{coolblack}review}, patches & \cellcolor{babypink}{under review
317 \normalsize{\textbf{\color{coolblack}{Contributors, reviewers,
318 people who helped!}}}
323 \begin{tabularx}{\textwidth}{|l|X|X|}
326 Driver & Patches & Reviews, Comments, Advice\\
330 iris & Juan A. Suárez Romero, Eleni Maria Stea, Tapani Pälli, Eduardo Lima Mitev
331 & Tapani Pälli, Rohan Garg, Eric Engestrom, Kenneth Graunke,
332 Jason Ekstrand, Oscar Barenys, Daniel Stone, Matt Turner, Tomeu Vizoso \\
333 \rowcolor{whitesmoke}
334 freedreno & Eduardo Lima Mitev, Hyunjun Ko & Rob
335 Clark, Marek Olšák, Jonathan Marek, Rohan Garg\\
337 radeonsi & The feature was implemented by
338 AMD a few years ago and we are mostly working on fixes (WIP).
339 & feedback from: Bas Nieuwenhuizen, Marek Olšák \\
340 \rowcolor{whitesmoke}
341 i965 & Rohan Garg, Juan A. Suárez Romero, Tapani Pälli
342 & Tomeu Vizoso, Eleni Maria Stea, Oscar Barenys \\
350 \item {The information above was accurate at the beginning of
351 September when I pre-recorded this presentation! Apologies if
352 I've not included someone or something!}
357 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
359 \begin{frame}[fragile]
360 \frametitle{Additions to Piglit (the details) I}
363 \normalsize{\textbf{\color{coolblack}{Contributions to Piglit I }}}
367 \begin{center}\textbf{Reusing color images:}\end{center}
369 \begin{tabularx}{\textwidth}{|l|X|c|l|}
372 Test name & Description
378 The test allocates images of different formats and
379 tiling modes using Vulkan and fills their pixels using OpenGL.
381 \adjustbox{valign=t, margin=1ex, padding=1ex}{\includegraphics[height=1cm]{shots/image_overwrite.png}} & \cellcolor{green}{upstream}\\
383 \rowcolor{whitesmoke}
385 The test allocates a Vulkan image and renders a
386 pattern to it using Vulkan. Then it displays it using OpenGL.
387 The test uses semaphores to synchronize the GL, Vulkan access to
388 the texture.\vspace{0.3cm} &
389 \adjustbox{valign=t, margin=1ex,
390 padding=1ex}{\includegraphics[height=1cm]{shots/image_display.png}}
391 & \cellcolor{green}{upstream}\\
394 vk-image-display-overwrite &
395 Similar to the previous ones, but the Vulkan texture data are
396 overwritten again with OpenGL and then read back from Vulkan. &
397 \adjustbox{valign=t, margin=1ex,
398 padding=1ex}{\includegraphics[height=1cm]{shots/image_display_overwrite.png}}
399 & \cellcolor{green}{upstream}\\
406 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
408 \begin{frame}[fragile]
409 \frametitle{Additions to Piglit (the details) II}
412 \normalsize{\textbf{\color{coolblack}{Contributions to Piglit II }}}
416 \begin{center}\textbf{Reusing the depth and stencil buffer:}\end{center}
418 \begin{tabularx}{\textwidth}{|l|X|c|l|}
421 Test name & Description
426 vk-depth-display & On the Vulkan side we draw a quad at a
427 specific depth to fill the z buffer with a recognizable pattern.
428 Then we use the Vulkan z buffer from OpenGL, where we clear the
429 framebuffer to green and render a
430 blue fullscreen quad positioned on the z-axis further away than
431 the depth of the original quad. If the z buffer has been imported
432 correctly the blue quad should be partially obscured due to the
433 depth test failing in the middle.
436 \adjustbox{valign=t, margin=1ex,
437 padding=1ex}{\includegraphics[height=1cm]{shots/depth.png}}
438 & \cellcolor{babypink}{under review}\\
440 \rowcolor{whitesmoke}
441 vk-stencil-display & Similarly, a small quad is rendered with
442 Vulkan and the stencil test enabled. It is
443 then imported and used by OpenGL that renders a fullscreen quad
444 with the stencil test enabled. Pixels that pass the stencil test
445 have the quad color and the rest the framebuffer
448 \adjustbox{valign=t, margin=1ex,
449 padding=1ex}{\includegraphics[height=1cm]{shots/stencil.png}}
450 & \cellcolor{babypink}{under review}\\
457 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
459 \begin{frame}[fragile]
460 \frametitle{Additions to Piglit (the details) III}
463 \normalsize{\textbf{\color{coolblack}{Contributions to Piglit III }}}
467 \begin{center}\textbf{Reusing a pixel buffer:}\end{center}
470 \begin{tabularx}{\textwidth}{|l|X|l|l|}
473 Test name & Description
479 The test renders an image and copies it to a buffer using
480 Vulkan. Then, the buffer is imported in OpenGL and is used as
481 pixel storage for an OpenGL texture. OpenGL renders the texture
482 and we validate that it contains the pattern that was rendered
483 by Vulkan. \vspace{0.3cm} &
484 \adjustbox{valign=t, margin=1ex,
485 padding=1ex}{\includegraphics[height=1cm]{shots/image_display.png}}
486 & \cellcolor{green}{upstream}\\
488 \rowcolor{whitesmoke}
489 vk-pix-buf-update-errors &
490 The test is similar to the previous one with the difference that
491 we attempt to overwrite the buffer using BufferSubData. We
492 validate that an invalid operation error is generated and the
493 contents of the buffer remain unchanged after the
494 attempt.\vspace{0.3cm} &
495 \adjustbox{valign=t, margin=1ex,
496 padding=1ex}{\includegraphics[height=1cm]{shots/image_display.png}}
497 & \cellcolor{blond}{work in progress}\\
504 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
506 \begin{frame}[fragile]
507 \frametitle{Additions to Piglit (the details) IV}
510 \normalsize{\textbf{\color{coolblack}{Contributions to Piglit IV }}}
514 \begin{center}\textbf{Reusing a vertex buffer:}\end{center}
516 \begin{tabularx}{\textwidth}{|l|X|l|l|}
519 Test name & Description
524 vk-vert-buf-update-errors &
525 A Vulkan vertex buffer is allocated and filled with data so that
526 the vertices create quads that follow a chess pattern. This
527 vertex buffer is used by OpenGL that clears the screen with red
528 and paints the pixels blue.
529 We validate that the geometry is correct and that we can't
530 overwrite it using \texttt{glBufferSubdata}. \vspace{0.3cm} &
531 \adjustbox{valign=t, margin=1ex,
532 padding=1ex}{\includegraphics[height=1cm]{shots/vert_buf_update_errors.png}}
533 & \cellcolor{blond}{work in progress}\\
535 \rowcolor{whitesmoke}
537 Similar to the previous test, but the Vulkan vertex buffer is
538 used in a Vulkan renderpass afterwards to make sure Vulkan can
539 read back and reuse the vertex buffer.\vspace{0.3cm} &
540 \adjustbox{valign=t, margin=1ex,
541 padding=1ex}{\includegraphics[height=1cm]{shots/vert_buf_update_errors.png}}
543 \cellcolor{blond}{work in progress}\\
550 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
552 \begin{frame}[fragile]
553 \frametitle{Additions to Piglit (the details) V}
555 \normalsize{\textbf{\color{coolblack}{Contributions to Piglit V }}}\\
557 \scriptsize{Same as with mesa many people helped us with the work on the
563 \begin{tabularx}{\textwidth}{|l|X|}
566 Contributors & Contributions \\
570 Eleni Maria Stea & tests, Vulkan framework code \\
571 \rowcolor{whitesmoke}
572 Juan A. Suárez Romero & contributions to the framework, and
573 vk-image-overwrite, testing \\
575 Tapani Pälli (\textit{\color{coolblack}{many thanks!}}) & reviews, testing and patches
577 \rowcolor{whitesmoke}
578 Bas Nieuwenhuizen & framework patch to support dedicated memory \\
580 Topi Pohjolainen & we've used some old patches of him as an example
581 at the very beginning\\
588 \item Also thanks to Germán Poo Caamaño who helped tidying up the
589 initial mess of the Vulkan framework commits.
590 \item Again, this information was accurate when I prepared and
591 pre-recorded the slides. Sorry if I am missing someone or something!
595 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
597 \begin{frame}[fragile]
598 \frametitle{Piglit Results}
599 \begin{block}{\begin{center}Conclusions from running the tests:\end{center}}
602 \item The feature seems to work well for the most use cases tested in
603 all mesa drivers mentioned before.\\
605 \item Depth and stencil buffer exchange is only supported on
606 proprietary Nvidia driver, unfortunately not on Mesa yet.\\
608 \item radeonsi needs some fixes to better support buffers and
609 optimal tiling (WIP).
616 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
618 %\begin{frame}[fragile]
619 % \frametitle{vk-image-overwrite}
620 % \begin{block}{vk-image-overwrite}
621 % \lstinline[language=C++, style=CStyle]{glCreateMemoryObjectsEXT(1, gl_mem_obj); }
625 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
626 \section[Q \& A]{Questions}
627 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
630 \frametitle{Questions?}
631 {\fontsize{8}{7}\selectfont
634 \includegraphics[scale=0.04]{data/qmark.png}
637 {\large E-mail: {\color{coolblack}estea@igalia.com}}\\
638 {\large IRC/Freenode: {\color{coolblack}hikiko}}\\
643 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
644 \section[References]{References}
645 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
646 %\setbeamertemplate{bibliography entry title}{}
647 %\setbeamertemplate{bibliography entry location}{}
648 %\setbeamertemplate{bibliography entry note}{}
649 \setbeamerfont{bibliography item}{size=\footnotesize}
650 \setbeamerfont{bibliography entry author}{size=\footnotesize}
651 \setbeamerfont{bibliography entry title}{size=\footnotesize}
652 \setbeamerfont{bibliography entry year}{size=\footnotesize}
653 \setbeamerfont{bibliography entry note}{size=\footnotesize}
655 \begin{frame}[allowframebreaks]
657 \bibliographystyle{unsrt}
658 \bibliography{bib/references.bib}
662 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
665 \begin{minipage}[b][0.6\textheight]{\linewidth}
666 \begin{picture}(0, 0)
668 \pgfuseimage{igaliabglight}
670 \begin{minipage}[b][0.4\textheight]{\linewidth}
672 \includegraphics[scale=0.6]{data/mesa.png}
676 \hfill \huge{\textbf{\color{coolblack}Thank you!}}\\
682 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
684 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%