From abb858f7630f18bb796bc5d01d292110e614d0f7 Mon Sep 17 00:00:00 2001 From: Eleni Maria Stea Date: Mon, 14 Sep 2020 16:01:49 +0300 Subject: [PATCH] the one sent --- estea-xdc2020.tex | 214 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 138 insertions(+), 76 deletions(-) diff --git a/estea-xdc2020.tex b/estea-xdc2020.tex index dd62c1c..f90dd39 100644 --- a/estea-xdc2020.tex +++ b/estea-xdc2020.tex @@ -157,11 +157,11 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\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}} @@ -173,25 +173,26 @@ % \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} resources (like 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} @@ -215,30 +216,23 @@ \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 semaphore from POSIX file descriptor external handles - (\textbf{Linux only!}) \end{itemize} \end{block} \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 enables an OpenGL application to: - \small{ - \begin{itemize} - \setbeamertemplate{itemize/enumerate subbody begin}{\normalsize} - - \item[--] create OpenGL objects, textures buffers and semaphores from - imported Vulkan memory - \item[--] synchronize the rendering using the GL semaphores - \end{itemize} - } + \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} @@ -265,11 +259,12 @@ } \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 + 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. @@ -365,6 +360,7 @@ \tiny{ \begin{center}\textbf{Reusing color images:}\end{center} + \vspace{-0.3cm} \begin{table}[t] \begin{tabularx}{\textwidth}{|l|X|c|l|} \hline @@ -375,25 +371,51 @@ \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 \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} & + \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 \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. & + \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}\\ @@ -423,28 +445,35 @@ \hline \hline \rowcolor{platinum} - vk-depth-display & On the Vulkan side we draw a quad at a - specific depth to fill the z buffer with a recognizable pattern. - Then we use the Vulkan z buffer from OpenGL, where we clear the - framebuffer to green and render a - blue fullscreen quad positioned on the z-axis further away than - the depth of the original quad. If the z buffer has been imported - correctly the blue quad should be partially obscured due to the - depth test failing in the middle. - \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 \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}\\ @@ -466,8 +495,8 @@ \tiny{ \begin{center}\textbf{Reusing a pixel buffer:}\end{center} - \begin{table}[t] - \begin{tabularx}{\textwidth}{|l|X|l|l|} + \begin{table}[tc] + \begin{tabularx}{\textwidth}{|l|X|c|l|} \hline \rowcolor{paleaqua} Test name & Description @@ -476,22 +505,34 @@ \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}\\ @@ -522,21 +563,41 @@ \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} & + \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 \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}} & @@ -554,7 +615,7 @@ \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} @@ -599,11 +660,12 @@ \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 use cases tested 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 driver, 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). -- 1.7.10.4