I.MX Graphics Users Guide Linux
Total Page:16
File Type:pdf, Size:1020Kb
NXP Semiconductors Document Number: IMXGRAPHICUG Rev. 0, 05/2018 i.MX Graphics User’s Guide Contents Chapter 1 Introduction ............................................................................................................................................. 6 Chapter 2 i.MX G2D API ............................................................................................................................................ 6 2.1 Overview ...................................................................................................................................................... 6 2.2 Enumerations and structures ....................................................................................................................... 6 2.3 G2D function descriptions .......................................................................................................................... 10 2.4 Support of new operating system in G2D .................................................................................................. 16 2.5 Sample code for G2D API usage ................................................................................................................. 16 2.6 Feature list on multiple platforms.............................................................................................................. 19 Chapter 3 i.MX EGL and OGL Extension Support .................................................................................................... 20 3.1 Introduction ............................................................................................................................................... 20 3.2 EGL extension support ............................................................................................................................... 20 3.3 OpenGL ES extension support .................................................................................................................... 23 3.4 Extension GL_VIV_direct_texture .............................................................................................................. 29 3.5 Extension GL_VIV_texture_border_clamp ................................................................................................. 32 Chapter 4 i.MX Framebuffer API ............................................................................................................................ 35 4.1 Overview .................................................................................................................................................... 35 4.2 API data types and environment variables ................................................................................................ 35 4.3 API description and syntax ......................................................................................................................... 37 Chapter 5 OpenCL ................................................................................................................................................... 44 5.1 Overview .................................................................................................................................................... 44 5.2 Vivante OpenCL implementation ............................................................................................................... 51 5.3 Optimization for OpenCL embedded profile .............................................................................................. 53 5.4 OpenCL Debug messages ........................................................................................................................... 56 Chapter 6 OpenVX Introduction ............................................................................................................................. 58 6.1 Overview .................................................................................................................................................... 58 6.2 Designing framework of OpenVX ............................................................................................................... 58 6.3 OpenVX extension implementation ........................................................................................................... 60 6.4 OpenCL functions compatible with Vivante vision..................................................................................... 63 Chapter 7 Vulkan .................................................................................................................................................... 66 7.1 OverView .................................................................................................................................................... 66 7.2 Vivante Extension Support for Vulkan ....................................................................................................... 66 Chapter 8 Multiple GPUs and Virtualization........................................................................................................... 68 8.1 Overview .................................................................................................................................................... 68 8.2 Multi-GPU configurations .......................................................................................................................... 68 8.3 GPU affinity configuration .......................................................................................................................... 68 i.MX Graphics User’s Guide, Rev. 0, 05/2018 2 NXP Semiconductors 8.4 OpenCL on multi-GPU device ..................................................................................................................... 68 8.5 GPU virtualization configuration ................................................................................................................ 69 Chapter 9 G2D compositor on Weston .................................................................................................................. 70 9.1 Overview .................................................................................................................................................... 70 9.2 Enabe G2D compositor .............................................................................................................................. 70 Chapter 10 XServer Video Driver ......................................................................................................................... 71 10.1 EXA driver ................................................................................................................................................... 71 10.2 XRandR ....................................................................................................................................................... 72 Chapter 11 Advanced GPU Configuration ............................................................................................................ 83 11.1 GPU Scaling Governor ................................................................................................................................ 83 11.2 GPU Device Cooling .................................................................................................................................... 83 Chapter 12 Vivante Software Tool Kit .................................................................................................................. 83 12.1 Vivante Tool Kit overview .......................................................................................................................... 83 12.2 vEmulator ................................................................................................................................................... 85 12.3 vShader ...................................................................................................................................................... 96 12.4 vCompiler ................................................................................................................................................. 104 12.5 vTexture ................................................................................................................................................... 108 12.6 vProfiler and vAnalyzer ............................................................................................................................ 112 12.7 Debug and performance counters ........................................................................................................... 126 Chapter 13 GPU Tools ........................................................................................................................................ 128 13.1 gpuinfo tool .............................................................................................................................................. 128 13.2 gmem_info tool ........................................................................................................................................ 130 13.3 Apitrace user guide .................................................................................................................................. 131 Chapter 14 GPU Memory Introduction .............................................................................................................. 136 14.1 GPU memory overview ............................................................................................................................ 136 14.2 GPU memory