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} the resources (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 Vulkan VR compositor could allocate the
199 left and right eye images but let other OpenGL processes to generate and
200 write their texture data.}
203 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
205 \begin{frame}[fragile]
206 \frametitle{OpenGL extensions for interoperability}
208 \center{\textbf{\color{coolblack}{OpenGL EXTENSIONS}}}
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
228 \begin{block}{\color{afblue}{\footnotesize\textbf{EXT\_external\_object
229 (EXT\_memory\_object, EXT\_semaphore)}:}}
231 \item {functions to create GL objects, textures and buffers
233 \item {functions to create GL semaphore objects that
234 correspond to Vulkan ones}
235 \item {functions for synchronization}
236 \item {extends existing GL calls that set and query properties}
241 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
242 \section[Interoperability on Mesa]{Additions to Mesa and Piglit}
243 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
245 \frametitle{Igalia's contributions}
247 \setbeamertemplate{blocks}[rounded]
249 \normalsize{\textbf{\color{coolblack}{Work on the feature}}}
256 Igalia contributed to the implementation of the interoperability
257 extensions for different {\color{deepjunglegreen}\textbf{Mesa
264 \begin{block}{Piglit (drivers testing framework)}
266 As there were \textbf{no CTS}, we've written a Vulkan framework for
267 {\color{coolblack}\textbf{Piglit}} and Vulkan/GL tests that cover the most common
268 EXT\_external\_objects(\_fd) use cases.
273 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
276 \frametitle{Additions to Mesa (the details)}
279 \normalsize{\textbf{\color{coolblack}{Contributions to Mesa
284 \begin{tabularx}{\textwidth}{|l|X|l|}
287 Driver & Igalia's Contributions & Status \\
291 iris & \textbf{\color{coolblack}implemented} EXT\_external\_objects,
292 EXT\_external\_objects\_fd & \cellcolor{babypink}{under review (MR
294 \rowcolor{whitesmoke}
295 freedreno & \textbf{\color{coolblack}implemented} EXT\_external\_objects,
296 EXT\_external\_objects\_fd & \cellcolor{green}{upstream} \\
298 radeonsi & \textbf{\color{coolblack}fixes} to the already implemented feature &
299 \cellcolor{bananamania}{work in
300 progress (WIP MR !6364)} \\
301 \rowcolor{whitesmoke}
302 i965 & helped with the \textbf{\color{coolblack}review}, patches & \cellcolor{babypink}{under review
310 \normalsize{\textbf{\color{coolblack}{Contributors, reviewers,
311 people who helped!}}}
316 \begin{tabularx}{\textwidth}{|l|X|X|}
319 Driver & Patches & Reviews, Comments, Advice\\
323 iris & Juan A. Suárez Romero, Eleni Maria Stea, Tapani Pälli, Eduardo Lima Mitev
324 & Tapani Pälli, Rohan Garg, Eric Engestrom, Kenneth Graunke,
325 Jason Ekstrand, Oscar Barenys, Daniel Stone, Matt Turner, Tomeu Vizoso \\
326 \rowcolor{whitesmoke}
327 freedreno & Eduardo Lima Mitev, Hyunjun Ko & Rob
328 Clark, Marek Olšák, Jonathan Marek, Rohan Garg\\
330 radeonsi & The feature was implemented by
331 AMD a few years ago and we are mostly working on fixes (WIP).
332 & feedback from: Bas Nieuwenhuizen, Marek Olšák \\
333 \rowcolor{whitesmoke}
334 i965 & Rohan Garg, Juan A. Suárez Romero, Tapani Pälli
335 & Tomeu Vizoso, Eleni Maria Stea, Oscar Barenys \\
343 \item {The information above was accurate at the beginning of
344 September when I pre-recorded this presentation! Apologies if
345 I've not included someone or something!}
350 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
352 \begin{frame}[fragile]
353 \frametitle{Additions to Piglit (the details) I}
356 \normalsize{\textbf{\color{coolblack}{Contributions to Piglit I }}}
360 \begin{center}\textbf{Reusing color images:}\end{center}
362 \begin{tabularx}{\textwidth}{|l|X|c|l|}
371 The test allocates images of different formats and
372 tiling modes using Vulkan and fills their pixels using OpenGL.
374 \adjustbox{valign=t, margin=1ex, padding=1ex}{\includegraphics[height=1cm]{shots/image_overwrite.png}} & \cellcolor{green}{upstream}\\
376 \rowcolor{whitesmoke}
378 The test allocates a Vulkan image and renders a
379 pattern to it using Vulkan. Then it displays it using OpenGL.
380 The test uses semaphores to synchronize the GL, Vulkan access to
381 the texture.\vspace{0.3cm} &
382 \adjustbox{valign=t, margin=1ex,
383 padding=1ex}{\includegraphics[height=1cm]{shots/image_display.png}}
384 & \cellcolor{green}{upstream}\\
387 vk-image-display-overwrite &
388 Similar to the previous ones, but the Vulkan texture data are
389 overwritten again with OpenGL and then read back from Vulkan. &
390 \adjustbox{valign=t, margin=1ex,
391 padding=1ex}{\includegraphics[height=1cm]{shots/image_display_overwrite.png}}
392 & \cellcolor{green}{upstream}\\
399 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
401 \begin{frame}[fragile]
402 \frametitle{Additions to Piglit (the details) II}
405 \normalsize{\textbf{\color{coolblack}{Contributions to Piglit II }}}
409 \begin{center}\textbf{Reusing the depth and stencil buffer:}\end{center}
411 \begin{tabularx}{\textwidth}{|l|X|c|l|}
419 vk-depth-display & A Vulkan quad is rendered at a specific depth
420 \texttt{d1}. The Vulkan depth buffer is used as a depth attachment while rendering
421 a blue quad in an OpenGL FBO with the depth test enabled in a
422 depth \texttt{d2 < d1}. We see the framebuffer color where
423 \texttt{imported\_depth > depth}.
426 \adjustbox{valign=t, margin=1ex,
427 padding=1ex}{\includegraphics[height=1cm]{shots/depth.png}}
428 & \cellcolor{babypink}{under review}\\
430 \rowcolor{whitesmoke}
431 vk-stencil-display & Similarly, a small quad is rendered with
432 Vulkan and the stencil test enabled. It is
433 then imported and used by OpenGL that renders a fullscreen quad
434 with the stencil test enabled. Pixels that pass the stencil test
435 have the quad color and the rest the framebuffer
438 \adjustbox{valign=t, margin=1ex,
439 padding=1ex}{\includegraphics[height=1cm]{shots/stencil.png}}
440 & \cellcolor{babypink}{under review}\\
447 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
449 \begin{frame}[fragile]
450 \frametitle{Additions to Piglit (the details) III}
453 \normalsize{\textbf{\color{coolblack}{Contributions to Piglit III }}}
457 \begin{center}\textbf{Reusing a pixel buffer:}\end{center}
460 \begin{tabularx}{\textwidth}{|l|X|l|l|}
469 The test renders an image and copies it to a buffer using
470 Vulkan. Then, the buffer is imported in OpenGL and is used as
471 pixel storage for an OpenGL texture. OpenGL renders the texture
472 and we validate that it contains the pattern that was rendered
473 by Vulkan. \vspace{0.3cm} &
474 \adjustbox{valign=t, margin=1ex,
475 padding=1ex}{\includegraphics[height=1cm]{shots/image_display.png}}
476 & \cellcolor{green}{upstream}\\
478 \rowcolor{whitesmoke}
479 vk-pix-buf-update-errors &
480 The test is similar to the previous one with the difference that
481 we attempt to overwrite the buffer using BufferSubData. We
482 validate that an invalid operation error is generated and the
483 contents of the buffer remain unchanged after the
484 attempt.\vspace{0.3cm} &
485 \adjustbox{valign=t, margin=1ex,
486 padding=1ex}{\includegraphics[height=1cm]{shots/image_display.png}}
487 & \cellcolor{blond}{work in progress}\\
494 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
496 \begin{frame}[fragile]
497 \frametitle{Additions to Piglit (the details) IV}
500 \normalsize{\textbf{\color{coolblack}{Contributions to Piglit IV }}}
504 \begin{center}\textbf{Reusing a vertex buffer:}\end{center}
506 \begin{tabularx}{\textwidth}{|l|X|l|l|}
514 vk-vert-buf-update-errors &
515 A Vulkan vertex buffer is allocated and filled with data so that
516 the vertices create quads that follow a chess pattern. This
517 vertex buffer is used by OpenGL that clears the screen with red
518 and paints the pixels blue.
519 We validate that the geometry is correct and that we can't
520 overwrite it using \texttt{glBufferSubdata}. \vspace{0.3cm} &
521 \adjustbox{valign=t, margin=1ex,
522 padding=1ex}{\includegraphics[height=1cm]{shots/vert_buf_update_errors.png}}
523 & \cellcolor{blond}{work in progress}\\
525 \rowcolor{whitesmoke}
527 Similar to the previous test, but the Vulkan vertex buffer is
528 used in a Vulkan renderpass afterwards to make sure Vulkan can
529 read back and reuse the vertex buffer.\vspace{0.3cm} &
530 \adjustbox{valign=t, margin=1ex,
531 padding=1ex}{\includegraphics[height=1cm]{shots/vert_buf_update_errors.png}}
533 \cellcolor{blond}{work in progress}\\
540 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
542 \begin{frame}[fragile]
543 \frametitle{Additions to Piglit (the details) V}
545 \normalsize{\textbf{\color{coolblack}{Contributions to Piglit V }}}\\
547 \scriptsize{Same as with mesa many people helped us with the work on the
553 \begin{tabularx}{\textwidth}{|l|X|}
556 Contributors & Contributions \\
560 Eleni Maria Stea & tests, Vulkan framework code \\
561 \rowcolor{whitesmoke}
562 Juan A. Suárez Romero & contributions to the framework, and
563 vk-image-overwrite, testing \\
565 Tapani Pälli (\textit{many thanks!}) & reviews, testing and patches
567 \rowcolor{whitesmoke}
568 Bas Nieuwenhuizen & framework patch to support dedicated memory \\
570 Topi Pohjolainen & we've used some old patches of him as an example
571 at the very beginning\\
578 \item Also thanks to Germán Poo Caamaño who helped tidying up the
579 initial mess of the Vulkan framework commits.
580 \item Again, this information was accurate when I prepared and
581 pre-recorded the slides. Sorry if I am missing someone or something!
585 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
587 \begin{frame}[fragile]
588 \frametitle{Piglit Results}
589 \begin{block}{\begin{center}Conclusions from running the tests:\end{center}}
592 \item The feature seems to work well for the most common use cases in
593 all mesa drivers mentioned before.\\
595 \item Depth and stencil buffer exchange is only supported on
596 proprietary Nvidia drivers, unfortunately not on Mesa yet.\\
598 \item radeonsi needs some fixes to better support buffers and
599 optimal tiling (WIP).
606 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
608 %\begin{frame}[fragile]
609 % \frametitle{vk-image-overwrite}
610 % \begin{block}{vk-image-overwrite}
611 % \lstinline[language=C++, style=CStyle]{glCreateMemoryObjectsEXT(1, gl_mem_obj); }
615 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
616 \section[Q \& A]{Questions}
617 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
620 \frametitle{Questions?}
621 {\fontsize{8}{7}\selectfont
624 \includegraphics[scale=0.04]{data/qmark.png}
627 {\large E-mail: {\color{coolblack}estea@igalia.com}}\\
628 {\large IRC/Freenode: {\color{coolblack}hikiko}}\\
633 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
634 \section[References]{References}
635 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
636 %\setbeamertemplate{bibliography entry title}{}
637 %\setbeamertemplate{bibliography entry location}{}
638 %\setbeamertemplate{bibliography entry note}{}
639 \setbeamerfont{bibliography item}{size=\footnotesize}
640 \setbeamerfont{bibliography entry author}{size=\footnotesize}
641 \setbeamerfont{bibliography entry title}{size=\footnotesize}
642 \setbeamerfont{bibliography entry year}{size=\footnotesize}
643 \setbeamerfont{bibliography entry note}{size=\footnotesize}
645 \begin{frame}[allowframebreaks]
647 \bibliographystyle{unsrt}
648 \bibliography{bib/references.bib}
652 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
655 \begin{minipage}[b][0.6\textheight]{\linewidth}
656 \begin{picture}(0, 0)
658 \pgfuseimage{igaliabglight}
660 \begin{minipage}[b][0.4\textheight]{\linewidth}
662 \includegraphics[scale=0.6]{data/mesa.png}
666 \hfill \huge{\textbf{\color{coolblack}Thank you!}}\\
672 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
674 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%