Gwangyeong Mun - Tizen 3.0 's Window System Integration Layer of OpenGLES/EGL & Vulkan Driver (libtpl-egl, vulkan-wsi-tizen)
This talk introduces Tizen 3.0 's Window System Integration Layer of OpenGLES/EGL & Vulkan Driver (libtpl-egl, vulkan-wsi-tizen ) and it covers how a vendor implements their OpenGLES/EGL & Vulkan driver for tizen window system.
The libtpl-egl(Tizen Porting Layer for EGL) is an abstraction layer for the surface and buffer management on Tizen platform aimed to implement the EGL porting layer of the OpenGLES driver over the various display protocols.
The libtpl-egl provides the interfaces based of the object driven model. Every tpl-egl object can be represented as generic tpl_object_t which is reference-counted and provides common functions. Currently, two types of tpl-egl objects are provided: Display, Surface.
Display, like normal display, represents a display system which is usually used for the connection to the server. The Surface corresponds to a native surface like wl_surface. A surface might be configured to use N-buffers, usually double-buffered or triple-buffered. For these two objects, Wayland, GBM (Generic Buffer Management) and TBM (Tizen Buffer Manager) backend are defined, and they are corresponding to their own window system. So, vendors don’t need to care about the window system. Vendor driver's EGL porting layer just calls the frontend functions of the libtpl-egl to do what it is requested, and gives the result to GPU Vendor driver. The libtpl-egl does all the protocol dependent actions. Such protocol dependent part can be well-separated into
libtpl-egl's backends. Also, the libtpl-egl backend can be configured at runtime. Users can specify which type of the backend uses when initializing a display object.
The vulkan-wsi-tizen (Vulkan WSI for Tizen) is developed in order to support for the various vendor Vulkan ICDs.
The vulkan-wsi-tizen wrapes vendor's vulkan ICDs and provides the WSI(Window-System Interface) for the tizen. It acts like a complete ICD and exposes vk_icdGetInstanceProcAddr() which dispatches all required vulkan functions. (wsi functions and vendor ICD functions.) The vendor ICD does not need to concern the this loading mechanism. They can implement their ICD like a normal khronos-loader-loadable ICD. However, vendorICD should provides some functions to WSI in order to implement WSI functions.
The tizen WSI introcudes these extensions; vkCreateImageFromNativeBufferTIZEN, vkQueueSignalReleaseImageTIZEN and vkAcquireImageTIZEN which are used for creating a VkImage from Tizen Native Buffer and sync mechanisms for the WSI.