language=C++, % choose the language of the code
% basicstyle=\footnotesize, % the size of the fonts that are used for the code
basicstyle=\tt\color{afblue},
- breakatwhitespace=false,
- breaklines=true,
+ breakatwhitespace=false,
+ breaklines=true,
backgroundcolor=\color{bgcolor}, % choose the background color. You must add \usepackage{color}
showspaces=false, % show spaces adding particular underscores
showstringspaces=false, % underline spaces within strings
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section[Introduction]{OpenGL and Vulkan interoperability extensions}
+\section[Introduction]{OpenGL interoperability extensions}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile,c]
- \frametitle{OpenGL and Vulkan Interoperability Concept}
+ \frametitle{Interoperability Concept}
\begin{center}
\textbf{\color{coolblack}{INTEROPERABILITY}}
%
\vspace{0.5cm}
- \begin{tabular}{l}
+ \begin{tabularx}{\textwidth}{X}
\rowcolor{coolblack}
\multicolumn{1}{c}{
- \color{paleaqua}{EXT\_external\_objects(\_fd) extensions allow:}
+ \color{paleaqua}{EXT\_external\_objects(\_fd) extensions enable:}
}\\
\rowcolor{platinum}
\\
\rowcolor{platinum}
- \small{· \color{coolblack}{\textbf{Allocating} the resources (textures,
- buffers) \textbf{once} from Vulkan.}}\\
+ \small{· \color{coolblack}{\textbf{Allocation} of resources (textures,
+ buffers) from Vulkan and {\textbf{sharing}} of those resources from both APIs}
+ }
+ \\
\rowcolor{platinum}
- \small{· \color{coolblack}{\textbf{Reusing} them \textbf{several times} from
- both APIs.}}\\
+ \\
\rowcolor{platinum}
- \small{· \color{coolblack}{\textbf{Synchronizing} the APIs access to
- the resources.}}\\
+ \small{· \color{coolblack}{\textbf{Synchronization} of the access to
+ shared resources between APIs.}}\\
\rowcolor{platinum}
\\
- \end{tabular}
+ \end{tabularx}
\vspace{0.5cm}
\end{center}
- \footnotesize{\textbf{Example:} a Vulkan VR compositor could allocate the
- left and right eye images but let other OpenGL processes to generate and
- write their texture data.}
+ \footnotesize{\textbf{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.}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]
- \frametitle{OpenGL extensions for interoperability}
+ \frametitle{OpenGL extensions for interoperability on Linux}
- \center{\textbf{\color{coolblack}{OpenGL EXTENSIONS}}}
+ \center{\textbf{\color{coolblack}{OpenGL Extensions (Linux)}}}
\vspace{0.2cm}
\setbeamertemplate{itemize/enumerate body begin}{\footnotesize}
\setbeamertemplate{itemize items}[triangle]
\setbeamertemplate{blocks}[rounded][shadow]
- \begin{block}{\color{afblue}{\footnotesize\textbf{EXT\_external\_object\_fd
+ \begin{block}{\color{afblue}{\footnotesize\textbf{EXT\_external\_objects\_fd
(EXT\_memory\_object\_fd, EXT\_semaphore\_fd)}:}}
\begin{itemize}
\item enables an OpenGL application to import a memory object or
\vspace{0.2cm}
- \begin{block}{\color{afblue}{\footnotesize\textbf{EXT\_external\_object
+ \begin{block}{\color{afblue}{\footnotesize\textbf{EXT\_external\_objects
(EXT\_memory\_object, EXT\_semaphore)}:}}
\begin{itemize}
- \item {functions to create GL objects, textures and buffers
- from Vulkan memory}
- \item {functions to create GL semaphore objects that
- correspond to Vulkan ones}
- \item {functions for synchronization}
+ \item enables an OpenGL application to
+ create OpenGL objects corresponding to Vulkan objects (textures,
+ buffers, semaphores) and synchronize access to shared objects
+ across APIs
\item {extends existing GL calls that set and query properties}
\end{itemize}
\end{block}
}
\end{block}
- \vspace{0.5cm}
+ \vspace{0.3cm}
\begin{block}{Piglit (drivers testing framework)}
\footnotesize{
- As there were \textbf{no CTS}, we've written a Vulkan framework for
- {\color{coolblack}\textbf{Piglit}} and Vulkan/GL tests that cover the most common
+ As there were \textbf{no conformance tests} available for the
+ extensions, we've written a Vulkan framework for
+ {\color{coolblack}\textbf{Piglit}} and Vulkan/GL tests that cover
+ some common
EXT\_external\_objects(\_fd) use cases.
}
\end{block}
\tiny{
\begin{table}[t]
\begin{tabularx}{\textwidth}{|l|X|l|}
- \hline
+ \hline
\rowcolor{paleaqua}
Driver & Igalia's Contributions & Status \\
- \hline
- \hline
+ \hline
+ \hline
\rowcolor{platinum}
iris & \textbf{\color{coolblack}implemented} EXT\_external\_objects,
EXT\_external\_objects\_fd & \cellcolor{babypink}{under review (MR
\rowcolor{whitesmoke}
i965 & helped with the \textbf{\color{coolblack}review}, patches & \cellcolor{babypink}{under review
(Draft MR !5594)}\\
- \hline
+ \hline
\end{tabularx}
\end{table}
}
\tiny{
\begin{table}[ht]
\begin{tabularx}{\textwidth}{|l|X|X|}
- \hline
+ \hline
\rowcolor{paleaqua}
Driver & Patches & Reviews, Comments, Advice\\
- \hline
- \hline
+ \hline
+ \hline
\rowcolor{platinum}
iris & Juan A. Suárez Romero, Eleni Maria Stea, Tapani Pälli, Eduardo Lima Mitev
& Tapani Pälli, Rohan Garg, Eric Engestrom, Kenneth Graunke,
AMD a few years ago and we are mostly working on fixes (WIP).
& feedback from: Bas Nieuwenhuizen, Marek Olšák \\
\rowcolor{whitesmoke}
- i965 & Rohan Garg, Juan A. Suárez Romero, Tapani Pälli
+ i965 & Rohan Garg, Juan A. Suárez Romero, Tapani Pälli
& Tomeu Vizoso, Eleni Maria Stea, Oscar Barenys \\
- \hline
+ \hline
\end{tabularx}
\end{table}
}
\tiny{
\begin{center}\textbf{Reusing color images:}\end{center}
+ \vspace{-0.3cm}
\begin{table}[t]
\begin{tabularx}{\textwidth}{|l|X|c|l|}
- \hline
+ \hline
\rowcolor{paleaqua}
- Test name & Use case
+ Test name & Description
& Output & Status\\
- \hline
- \hline
+ \hline
+ \hline
\rowcolor{platinum}
vk-image-overwrite &
- The test allocates images of different formats and
- tiling modes using Vulkan and fills their pixels using OpenGL.
+ \begin{itemize}
+ \vspace{-0.3cm}
+ \itemsep0cm
+ \item[\textbullet] \textbf{\color{coolblack}Vulkan:} allocates images of
+ different formats and tiling modes
+ \item[\textbullet] \textbf{\color{coolblack}{OpenGL:}} fills them with
+ green
+ \item[\textbullet] \textbf{\color{coolblack}{Expectation:}} green screen
+ \end{itemize}
&
\adjustbox{valign=t, margin=1ex, padding=1ex}{\includegraphics[height=1cm]{shots/image_overwrite.png}} & \cellcolor{green}{upstream}\\
- \hline
+ \hline
\rowcolor{whitesmoke}
- vk-image-display &
- The test allocates a Vulkan image and renders a
- pattern to it using Vulkan. Then it displays it using OpenGL.
- The test uses semaphores to synchronize the GL, Vulkan access to
- the texture.\vspace{0.3cm} &
+ vk-image-display &
+ \begin{itemize}
+ \vspace{-0.3cm}
+ \itemsep0cm
+ \item[\textbullet] \textbf{\color{coolblack}Vulkan:} creates
+ an image and fills it with colored bars
+ \item[\textbullet] \textbf{\color{coolblack}{OpenGL:}} draws
+ the image on screen using semaphores to synchronize
+ access
+ \item[\textbullet] \textbf{\color{coolblack}{Expectation:}}
+ a stripped image on screen
+ \end{itemize}
+ &
\adjustbox{valign=t, margin=1ex,
padding=1ex}{\includegraphics[height=1cm]{shots/image_display.png}}
& \cellcolor{green}{upstream}\\
- \hline
+ \hline
\rowcolor{platinum}
- vk-image-display-overwrite &
- Similar to the previous ones, but the Vulkan texture data are
- overwritten again with OpenGL and then read back from Vulkan. &
+ vk-image-display-overwrite &
+ \begin{itemize}
+ \vspace{-0.3cm}
+ \itemsep0cm
+ \item[\textbullet] \textbf{\color{coolblack}Vulkan:} creates
+ an image and fills it
+ \item[\textbullet] \textbf{\color{coolblack}{OpenGL:}}
+ overwrites that image with another stripped pattern
+ \item[\textbullet] \textbf{\color{coolblack}Vulkan:}
+ reads back the contents of the image
+ \item[\textbullet] \textbf{\color{coolblack}{Expectation:}}
+ the modified contents to be read back
+ \end{itemize}
+ &
\adjustbox{valign=t, margin=1ex,
padding=1ex}{\includegraphics[height=1cm]{shots/image_display_overwrite.png}}
& \cellcolor{green}{upstream}\\
- \hline
+ \hline
\end{tabularx}
\end{table}
}
\begin{center}\textbf{Reusing the depth and stencil buffer:}\end{center}
\begin{table}[t]
\begin{tabularx}{\textwidth}{|l|X|c|l|}
- \hline
+ \hline
\rowcolor{paleaqua}
- Test name & Use case
+ Test name & Description
& Output & Status\\
- \hline
- \hline
+ \hline
+ \hline
\rowcolor{platinum}
- vk-depth-display & A Vulkan quad is rendered at a specific depth
- \texttt{d1}. The Vulkan depth buffer is used as a depth attachment while rendering
- a blue quad in an OpenGL FBO with the depth test enabled in a
- depth \texttt{d2 < d1}. We see the framebuffer color where
- \texttt{imported\_depth > depth}.
- \vspace{0.3cm}
+ vk-depth-display &
+ \begin{itemize}
+ \vspace{-0.3cm}
+ \itemsep0cm
+ \item[\textbullet] \textbf{\color{coolblack}Vulkan:}
+ creates a depth buffer pattern
+ \item[\textbullet] \textbf{\color{coolblack}{OpenGL:}}
+ draws a fullscreen quad at a greater depth
+ \item[\textbullet] \textbf{\color{coolblack}{Expectation:}}
+ quad partially obscured
+ \end{itemize}
&
\adjustbox{valign=t, margin=1ex,
padding=1ex}{\includegraphics[height=1cm]{shots/depth.png}}
& \cellcolor{babypink}{under review}\\
- \hline
+ \hline
\rowcolor{whitesmoke}
- vk-stencil-display & Similarly, a small quad is rendered with
- Vulkan and the stencil test enabled. It is
- then imported and used by OpenGL that renders a fullscreen quad
- with the stencil test enabled. Pixels that pass the stencil test
- have the quad color and the rest the framebuffer
- color.
- \vspace{0.3cm} &
+ vk-stencil-display &
+ \begin{itemize}
+ \vspace{-0.3cm}
+ \itemsep0cm
+ \item[\textbullet] \textbf{\color{coolblack}Vulkan:}
+ creates a pattern in the stencil buffer
+ \item[\textbullet] \textbf{\color{coolblack}{OpenGL:}}
+ draws a blue fullscreen quad with stencil testing
+ \item[\textbullet] \textbf{\color{coolblack}{Expectation:}}
+ quad masked by stencil pattern
+ \end{itemize}
+ &
\adjustbox{valign=t, margin=1ex,
padding=1ex}{\includegraphics[height=1cm]{shots/stencil.png}}
& \cellcolor{babypink}{under review}\\
- \hline
+ \hline
\end{tabularx}
\end{table}
}
\tiny{
\begin{center}\textbf{Reusing a pixel buffer:}\end{center}
- \begin{table}[t]
- \begin{tabularx}{\textwidth}{|l|X|l|l|}
- \hline
+ \begin{table}[tc]
+ \begin{tabularx}{\textwidth}{|l|X|c|l|}
+ \hline
\rowcolor{paleaqua}
- Test name & Use case
+ Test name & Description
& Output & Status\\
- \hline
- \hline
+ \hline
+ \hline
\rowcolor{platinum}
vk-buf-exchange &
- The test renders an image and copies it to a buffer using
- Vulkan. Then, the buffer is imported in OpenGL and is used as
- pixel storage for an OpenGL texture. OpenGL renders the texture
- and we validate that it contains the pattern that was rendered
- by Vulkan. \vspace{0.3cm} &
+ \begin{itemize}
+ \vspace{-0.3cm}
+ \itemsep0cm
+ \item[\textbullet] \textbf{\color{coolblack}Vulkan:}
+ creates and fills an image with color bars and copies
+ its content to a buffer
+ \item[\textbullet] \textbf{\color{coolblack}{OpenGL:}}
+ uses the buffer as pixel storage for a texture and
+ displays it
+ \item[\textbullet] \textbf{\color{coolblack}{Expectation:}}
+ colored bars on screen
+ \end{itemize}
+ &
\adjustbox{valign=t, margin=1ex,
padding=1ex}{\includegraphics[height=1cm]{shots/image_display.png}}
& \cellcolor{green}{upstream}\\
\hline
\rowcolor{whitesmoke}
vk-pix-buf-update-errors &
- The test is similar to the previous one with the difference that
- we attempt to overwrite the buffer using BufferSubData. We
- validate that an invalid operation error is generated and the
- contents of the buffer remain unchanged after the
- attempt.\vspace{0.3cm} &
+ Same as above and:
+ \begin{itemize}
+ \itemsep0cm
+ \item[\textbullet] \textbf{\color{coolblack}{OpenGL:}}
+ attempts to overwrite the buffer
+ \item[\textbullet] \textbf{\color{coolblack}{Expectation:}}
+ error is generated, the buffer remains unchanged
+ \end{itemize}
+ &
\adjustbox{valign=t, margin=1ex,
padding=1ex}{\includegraphics[height=1cm]{shots/image_display.png}}
& \cellcolor{blond}{work in progress}\\
\begin{center}\textbf{Reusing a vertex buffer:}\end{center}
\begin{table}[t]
\begin{tabularx}{\textwidth}{|l|X|l|l|}
- \hline
+ \hline
\rowcolor{paleaqua}
- Test name & Use case
+ Test name & Description
& Output & Status\\
- \hline
- \hline
+ \hline
+ \hline
\rowcolor{platinum}
- vk-vert-buf-update-errors &
- A Vulkan vertex buffer is allocated and filled with data so that
- the vertices create quads that follow a chess pattern. This
- vertex buffer is used by OpenGL that clears the screen with red
- and paints the pixels blue.
- We validate that the geometry is correct and that we can't
- overwrite it using \texttt{glBufferSubdata}. \vspace{0.3cm} &
+ vk-vert-buf-update-errors &
+ \begin{itemize}
+ \vspace{-0.3cm}
+ \itemsep0cm
+ \item[\textbullet] \textbf{\color{coolblack}Vulkan:}
+ creates a vertex buffer and fills it with only the odd
+ quads of a chess board pattern
+ \item[\textbullet] \textbf{\color{coolblack}{OpenGL:}}
+ clears the screen to red and draws the vertex buffer in
+ blue
+ \item[\textbullet] \textbf{\color{coolblack}OpenGL:}
+ attempts to overwrite the VBO
+ \item[\textbullet] \textbf{\color{coolblack}{Expectation:}}
+ a red-blue chess board pattern on screen and an invalid
+ operation error is generated
+ \end{itemize}
+ &
\adjustbox{valign=t, margin=1ex,
padding=1ex}{\includegraphics[height=1cm]{shots/vert_buf_update_errors.png}}
& \cellcolor{blond}{work in progress}\\
- \hline
+ \hline
\rowcolor{whitesmoke}
vk-vert-buf-reuse &
- Similar to the previous test, but the Vulkan vertex buffer is
- used in a Vulkan renderpass afterwards to make sure Vulkan can
- read back and reuse the vertex buffer.\vspace{0.3cm} &
+ \begin{itemize}
+ \vspace{-0.3cm}
+ \itemsep0cm
+ \item[\textbullet] \textbf{\color{coolblack}Vulkan:}
+ same as above
+ \item[\textbullet] \textbf{\color{coolblack}{OpenGL:}}
+ same as above minus the invalid overwrite test
+ \item[\textbullet] \textbf{\color{coolblack}Vulkan:}
+ reuses the VBO in a renderpass to draw the chess board
+ \item[\textbullet] \textbf{\color{coolblack}{Expectation:}}
+ chessboard on screen
+ \end{itemize}
+ &
\adjustbox{valign=t, margin=1ex,
padding=1ex}{\includegraphics[height=1cm]{shots/vert_buf_update_errors.png}}
&
\cellcolor{blond}{work in progress}\\
- \hline
+ \hline
\end{tabularx}
\end{table}
}
\begin{center}
\normalsize{\textbf{\color{coolblack}{Contributions to Piglit V }}}\\
\vspace{0.5cm}
- \scriptsize{Same as with mesa many people helped us with the work on the
+ \scriptsize{Many people helped us with the work on the
tests:}
\end{center}
\tiny{
\begin{table}[t]
\begin{tabularx}{\textwidth}{|l|X|}
- \hline
+ \hline
\rowcolor{paleaqua}
Contributors & Contributions \\
- \hline
- \hline
+ \hline
+ \hline
\rowcolor{platinum}
Eleni Maria Stea & tests, Vulkan framework code \\
\rowcolor{whitesmoke}
Juan A. Suárez Romero & contributions to the framework, and
vk-image-overwrite, testing \\
\rowcolor{platinum}
- Tapani Pälli (\textit{many thanks!}) & reviews, testing and patches
+ Tapani Pälli (\textit{\color{coolblack}{many thanks!}}) & reviews, testing and patches
for the framework \\
\rowcolor{whitesmoke}
Bas Nieuwenhuizen & framework patch to support dedicated memory \\
\rowcolor{platinum}
Topi Pohjolainen & we've used some old patches of him as an example
at the very beginning\\
- \hline
+ \hline
\end{tabularx}
\end{table}
}
\begin{block}{\begin{center}Conclusions from running the tests:\end{center}}
\begin{itemize}
\vspace{0.5cm}
- \item The feature seems to work well for the most common use cases in
- all mesa drivers mentioned before.\\
+ \item Most of the new Piglit tests are passing in the mesa drivers
+ mentioned before (iris, freedreno, radeonsi, i965).\\
\vspace{0.5cm}
- \item Depth and stencil buffer exchange is only supported on
- proprietary Nvidia drivers, unfortunately not on Mesa yet.\\
+ \item 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.\\
\vspace{0.5cm}
\item radeonsi needs some fixes to better support buffers and
optimal tiling (WIP).