没有合适的资源?快使用搜索试试~ 我知道了~
首页IMX6 GPU开发参考文档
资源详情
资源评论
资源推荐
Freescale Semiconductor Document Number: IMX6GRAPHICUG
Rev. 0, 12/2015
© Freescale Semiconductor, Inc., 2015. All rights reserved.
i.MX 6 Graphics User’s Guide
i.MX 6 Graphics User’s Guide, Rev. 0, 12/2015
2 Freescale Semiconductor
Contents
Chapter 1 Introduction ............................................................................................................................................. 5
Chapter 2 i.MX 6 G2D API ......................................................................................................................................... 5
2.1 Overview ...................................................................................................................................................... 5
2.2 Enumerations and structures ....................................................................................................................... 5
2.3 G2D function descriptions ............................................................................................................................ 9
2.4 Sample code for G2D API usage ................................................................................................................. 15
Chapter 3 i.MX 6 EGL and OGL Extension Support ................................................................................................. 19
3.1 Introduction ............................................................................................................................................... 19
3.2 EGL extension support ............................................................................................................................... 19
3.3 OpenGL ES extension support .................................................................................................................... 21
3.4 Extension GL_VIV_direct_texture .............................................................................................................. 25
3.5 Extension GL_VIV_texture_border_clamp ................................................................................................. 28
Chapter 4 i.MX 6 Framebuffer API.......................................................................................................................... 30
4.1 Overview .................................................................................................................................................... 30
4.2 API data types and environment variables ................................................................................................ 30
4.3 API description and syntax ......................................................................................................................... 32
Chapter 5 OpenCL ................................................................................................................................................... 39
5.1 Overview .................................................................................................................................................... 39
5.2 Vivante OpenCL Implementation ............................................................................................................... 41
5.3 Optimization for OpenCL Embedded Profile .............................................................................................. 43
5.4 OpenCL Debug Messages ........................................................................................................................... 45
Chapter 6 Freescale XServer Video Driver .............................................................................................................. 47
6.1 EXA driver ................................................................................................................................................... 47
6.2 XRandR ....................................................................................................................................................... 48
Chapter 7 Vivante Software Tool Kit ...................................................................................................................... 59
7.1 Vivante Tool Kit overview .......................................................................................................................... 59
7.2 vEmulator ................................................................................................................................................... 60
7.3 vShader ...................................................................................................................................................... 71
7.4 vCompiler ................................................................................................................................................... 79
7.5 vTexture ..................................................................................................................................................... 83
7.6 vProfiler and vAnalyzer .............................................................................................................................. 87
7.7 vTracer ..................................................................................................................................................... 100
7.8 vPlayer ...................................................................................................................................................... 106
7.9 Debug and performance counters ........................................................................................................... 109
Chapter 8 Freescale GPU Tools ............................................................................................................................ 111
i.MX 6 Graphics User’s Guide, Rev. 0, 12/2015
3 Freescale Semiconductor
8.1 gpuinfo tool .............................................................................................................................................. 111
8.2 gmem_info tool ........................................................................................................................................ 113
8.3 Freescale apitrace user guide................................................................................................................... 114
Chapter 9 GPU Memory Introduction .................................................................................................................. 120
9.1 GPU memory overview ............................................................................................................................ 120
9.2 GPU memory pools .................................................................................................................................. 120
9.3 GPU memory allocators ........................................................................................................................... 120
9.4 GPU reserved memory ............................................................................................................................. 121
9.5 GPU memory base address ...................................................................................................................... 121
Chapter 10 Application Programming Recommendations ................................................................................. 123
10.1 Understand the system configuration and target application ................................................................. 123
10.2 Optimize off chip data transfer such as accessing off-chip DDR memory/mobile DDR memory ............ 123
10.3 Avoid random cache or memory accesses ............................................................................................... 123
10.4 Optimize your use of system memory ..................................................................................................... 123
10.5 Target a fixed frame rate that is visibly smooth....................................................................................... 123
10.6 Minimize GL state changes ...................................................................................................................... 124
10.7 Batch primitives to minimize the number of draw calls .......................................................................... 124
10.8 Perform calculations per vertex instead of per fragment/pixel ............................................................... 124
10.9 Enable early-Z, hierarchical-Z and back face culling ................................................................................. 124
10.10 Use branching carefully ....................................................................................................................... 125
10.11 Do not use static or stack data as vertex data - use VBOs instead ...................................................... 125
10.12 Use dynamic VBO if data is changing frame by frame ......................................................................... 125
10.13 Tessellate your data so that Hierarchical Z (HZ) can do its job ............................................................ 126
10.14 Use dynamic textures as a texture cache (texture atlas) ..................................................................... 126
10.15 If you use many small triangle strips, stitch them together ................................................................ 126
10.16 Specify EGL configuration attributes precisely .................................................................................... 126
10.17 Use aligned texture/render buffers ..................................................................................................... 126
10.18 Disable MSAA rendering unless high quality is needed ....................................................................... 127
10.19 Avoid partial clears .............................................................................................................................. 127
10.20 Avoid mask operations ........................................................................................................................ 127
10.21 Use MIPMAP textures .......................................................................................................................... 127
10.22 Use compressed textures if constricted by RAM/ROM budget ........................................................... 127
10.23 Draw objects from near to far if possible ............................................................................................ 127
10.24 Avoid indexed triangle strips. .............................................................................................................. 127
10.25 Vertex attribute stride should not be larger than 256 bytes ............................................................... 128
10.26 Avoid binding buffers to mixed index/vertex array ............................................................................. 128
i.MX 6 Graphics User’s Guide, Rev. 0, 12/2015
4 Freescale Semiconductor
10.27 Avoid using CPU to update texture/buffer contexts during render .................................................... 128
10.28 Avoid frequent context switching ........................................................................................................ 128
10.29 Optimize resources within a shader .................................................................................................... 128
10.30 Avoid using glScissor Clear for small regions ....................................................................................... 128
10.31 Use PRE to accelerate data transfer .................................................................................................... 128
Chapter 11 Demo Framework ............................................................................................................................ 129
11.1 Summaries................................................................................................................................................ 129
11.2 Introduction ............................................................................................................................................. 129
11.3 Design overview ....................................................................................................................................... 130
11.4 High level overview .................................................................................................................................. 130
11.5 Demo application details ......................................................................................................................... 131
11.6 Helper Class Overview .............................................................................................................................. 135
11.7 Android SDK+NDK on Windows OS build guide ....................................................................................... 140
11.8 Ubuntu build guide .................................................................................................................................. 141
11.9 Windows OS build guide .......................................................................................................................... 143
11.10 Yocto build guide ................................................................................................................................. 145
11.11 FslContentSync.py notes ...................................................................................................................... 149
11.12 Roadmap – Upcoming features ........................................................................................................... 149
11.13 Known limitations ................................................................................................................................ 150
i.MX 6 Graphics User’s Guide, Rev. 0, 12/2015
5 Freescale Semiconductor
Chapter 1 Introduction
The purpose of this document is to provide information on graphic APIs and driver support. Each chapter describes
a specific set of APIs or driver integration as well as specific hardware acceleration customization. The target
audiences for this document are developers writing graphics applications or video drivers.
Chapter 2 i.MX 6 G2D API
2.1 Overview
The G2D API (Application Programming Interface) is designed to be easy to understand and to use the 2D BLT
function. It allows the user to implement the customized applications with simple interfaces. It is hardware and
platform independent for i.MX 6 2D Graphics.
G2D API supports the following features but is not limited to these:
Simple BLT operation from source to destination
Alpha blending for source and destination with Porter-Duff rules
High performance memory copy from source to destination
Up-scaling and down-scaling from source to destination
90/180/270 degree rotation from source to destination
Horizontal and vertical flip from source to destination
Enhanced visual quality with dither for pixel precision-loss
High performance memory clear for destination
Pixel-level cropping for source surface
Global alpha blending for source only
Asynchronous mode and sync
Contiguous memory allocator
Support VG engine
The G2D API document includes a detailed interface description and sample code for reference.
The API is designed with C-Style coding and can be used in both C and C++ applications.
G2D API supports the following features but is not limited to these:
Multi source blit
2.2 Enumerations and structures
This chapter describes all enumeration and structure definitions in G2D.
2.2.1 g2d_format enumeration
This enumeration describes the pixel format for source and destination.
Table 1 g2d_format enumeration
Name
Numeric
Description
G2D_RGB565
0
RGB565 pixel format
G2D_RGBA8888
1
32bit-RGBA pixel format
G2D_RGBX8888
2
32bit-RGBX without alpha blending
G2D_BGRA8888
3
32bit-BGRA pixel format
G2D_BGRX8888
4
32bit-BGRX without alpha blending
剩余150页未读,继续阅读
Yue_岳
- 粉丝: 0
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- ExcelVBA中的Range和Cells用法说明.pdf
- 基于单片机的电梯控制模型设计.doc
- 主成分分析和因子分析.pptx
- 共享笔记服务系统论文.doc
- 基于数据治理体系的数据中台实践分享.pptx
- 变压器的铭牌和额定值.pptx
- 计算机网络课程设计报告--用winsock设计Ping应用程序.doc
- 高电压技术课件:第03章 液体和固体介质的电气特性.pdf
- Oracle商务智能精华介绍.pptx
- 基于单片机的输液滴速控制系统设计文档.doc
- dw考试题 5套.pdf
- 学生档案管理系统详细设计说明书.doc
- 操作系统PPT课件.pptx
- 智慧路边停车管理系统方案.pptx
- 【企业内控系列】企业内部控制之人力资源管理控制(17页).doc
- 温度传感器分类与特点.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0