X-Git-Url: http://git.mutantstargoat.com?a=blobdiff_plain;f=codecamp.tex;h=a5367beb0dc9fa63cc8e463abe0c2951eb548692;hb=52295cb3cb5950b7903b176fdcddd5469c649b47;hp=74eb42292733f788761da3a5374c005eb4492f86;hpb=b34cb4a20be9ec8749319d929e22d1cb739e9c3c;p=webkit_codecamp diff --git a/codecamp.tex b/codecamp.tex index 74eb422..a5367be 100644 --- a/codecamp.tex +++ b/codecamp.tex @@ -808,7 +808,7 @@ program} modes. \item \href{https://www.khronos.org/registry/OpenGL/extensions/OES/OES\_EGL\_image\_external.txt}{OES\_EGL\_image\_external}: \\ This extension provides a mechanism for creating EGLImage texture targets - from EGLImages. + from EGLImages. \end{itemize} \end{center} \end{block} @@ -819,18 +819,106 @@ program} \begin{frame} \frametitle{Example:} + \setbeamercolor{block body}{bg=white}{\scriptsize} + \setbeamertemplate{itemize/enumerate body begin}{\tiny} + + \begin{block}{\scriptsize{I've written an example:}} + \begin{center} + \begin{itemize} + \item First using EGL!\\ + Blog post: \url{https://eleni.mutantstargoat.com/hikiko/egl-dma-1/} \\ + Code: \url{https://gistof.com/dma-egl-version} + \item Then using a native EGL context and a context from ANGLE!\\ + Blog post: \url{https://eleni.mutantstargoat.com/hikiko/angle-dma/}\\ + Code: \url{https://gistof.com/dmaangleeglversion} + \end{itemize} + \end{center} + \end{block} + \vspace{-0.3cm} + \begin{block}{\scriptsize{Snippet from the exporter:}} + \vspace{-0.1cm} + \tiny{ + \begin{table}[t] + \centering + \begin{tabular}{l} + {\color{coolblack}Exporting a dma buffer from a texture + \texttt{texA}:}\\ + \begin{adjustbox}{max width=\textwidth} + \adjustbox{valign=t}{\includegraphics[height=4cm]{data/dma_export_and_struct.png}} + \end{adjustbox}\\ + \end{tabular} + \end{table} + } + \end{block} \end{frame} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{frame} - \frametitle{Example program} + \frametitle{Example continued} + \setbeamercolor{block body}{bg=white}{\scriptsize} + \setbeamertemplate{itemize/enumerate body begin}{\tiny} - Code: - Blog post: + \begin{block}{\scriptsize{Snippets from the importer:}} + \vspace{-0.1cm} + \tiny{ + \begin{table}[t] + \centering + \begin{tabular}{l} + {\color{coolblack}Creating an EGLImage from the dma buffer using + the exported fd and the exported modifiers:}\\ + \\ + \begin{adjustbox}{max width=\textwidth} + \adjustbox{valign=t}{\includegraphics[height=3.5cm]{data/dma_import.png}} + \end{adjustbox}\\ +\\ +\\ + {\color{coolblack}Creating a texture using that external + EGLImage:}\\ + \\ + \begin{adjustbox}{max width=\textwidth} + \adjustbox{valign=t}{\includegraphics[height=2cm]{data/dma_targetteture2does.png}} + \end{adjustbox}\\ + \end{tabular} + \end{table} + } + \end{block} \end{frame} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{frame} + \frametitle{Test program} + + \begin{block}{\scriptsize{An exporter-importer that uses ANGLE and native + EGL}} + \setbeamertemplate{itemize/enumerate body begin}{\scriptsize} + \begin{itemize} + \itemsep0.3cm + \itemsep0.2cm + \item First context is EGL/OpenGL like the one in main graphics + pipeline. + \item Second is ANGLE with EGL/GLESv2 backend like the one in + WebGL2. + \item EGL/OpenGL context creates an empty texture and exports the dma\_buf + fd and all other information about the buffer. + \item ANGLE context creates another empty texture using the same + dma\_buf and the import mechanism. + \item ANGLE context fills the emty ANGLE texture. + \item EGL/OpenGL context displays the previously empty OpenGL/EGL + texture. + \item EGL/OpenGL texture contains what ANGLE texture had. + \item \textbf{We shared the ANGLE data without copying them!} + \end{itemize} + + \end{block} + \vspace{0.2cm} + \scriptsize{ + \begin{center} + \textbf{\color{coolblack}Check the blog posts for more details!} + \end{center} + } +\end{frame} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -869,7 +957,6 @@ program} } \end{block} - \vspace{0.3cm} \end{frame}