Configuration Items of the Graphics Acceleration Layer
The graphics acceleration layer supports two configurable functions: GPU mock and shader cache. This section describes the configuration items and rules of the two functions, and provides configuration examples for reference.
- GPU mock: emulates the GPU vendor, GPU model, OpenGL ES version, GL_MAX capability value, and OpenGL ES extension.
- Shader cache: pre-builds shader binaries and shares cache across multiple cloud phones to cut shader compilation and linking time, thereby reducing stuttering of large OpenGL ES applications.
You can configure the functions in the kbox_render_accelerating_configuration.xml file.
Configuration Items
Category |
Element |
Sub-element |
Property |
Value Range |
Description |
|---|---|---|---|---|---|
General settings |
Application |
- |
name |
system |
Indicates general system settings. |
- |
isEnable |
|
Specifies whether to enable the graphics acceleration layer for the application. |
||
feature |
name |
kbox.render.accelerating.gpuMock |
Specifies a graphics acceleration layer function. |
||
isEnable |
|
Specifies whether to enable this function for the application. |
|||
Application settings |
Application |
- |
name |
process_name |
Specifies the process name of the application. |
- |
isEnable |
|
Specifies whether to enable the graphics acceleration layer for the application. |
||
feature |
name |
|
Specifies a graphics acceleration layer function. The parameters vary according to the value of name. For details, see Table 2. |
||
isEnable |
|
Specifies whether to enable this function for the application. |
Value of name |
Sub-element |
Internal Parameter |
Description |
Mandatory/Optional |
|---|---|---|---|---|
kbox.render.accelerating.shaderCache |
GL_SHADER_CACHE |
SHADER_CACHE_MODE |
Specifies the read/write mode for the application enabled with the shader cache function to access the cache directory. The value can be any of the following: 0: no read or write permission on files in the cache directory 1: read-only 2: read and write |
Optional |
SHADER_CACHE_DIR_SIZE |
Specifies the cache directory size for the application. The value can be 64, 128, 256, 512, or 1024, in MB. |
Optional |
||
kbox.render.accelerating.gpuMock |
GL_RENDERER_MOCK |
GL_RENDERER |
Mocks the GPU model. |
Optional |
GL_VENDOR |
Mocks the GPU vendor. |
Optional |
||
GL_VERSION |
Mocks the OpenGL ES version. |
Optional |
||
GL_EXTENSION_MOCK |
- |
Mocks the enabling status of the OpenGL ES extension.
|
Optional |
|
GL_MAX_VALUE_MOCK |
- |
Mocks a GL_MAX capability value of OpenGL ES.
|
Optional |
Configuration Rules
- Both general system settings and application-specific settings are supported. The application name of general system settings is fixed to system. Application-specific settings can overwrite general system settings. Only the GPU mock function is supported in general system settings.
- GPU mock serves as the fundamental function of other graphics acceleration layer functions. Enabling the shader cache function for an application will automatically enable GPU mock as well.
Configuration Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | <!-- Configuration Example --> <!-- General system settings --> <Application name="system" isEnable="false"> <feature name="kbox.render.accelerating.gpuMock" isEnable="false"> <GL_RENDERER_MOCK> <param name="GL_RENDERER" value="Mali_G76"/> <param name="GL_VENDOR" value="Huawei"/> <param name="GL_VERSION" value="OpenGL ES 3.2 Mesa 22.1.7"/> </GL_RENDERER_MOCK> </feature> </Application> <!-- Application-specific settings --> <Application name="process_name" isEnable="false"> <feature name="kbox.render.accelerating.shaderCache" isEnable="false"> <GL_SHADER_CACHE> <param name="SHADER_CACHE_MODE" value="0"/> <param name="SHADER_CACHE_DIR_SIZE" value="200"/> </GL_SHADER_CACHE> </feature> <feature name="kbox.render.accelerating.gpuMock" isEnable="false"> <GL_RENDERER_MOCK> <param name="GL_RENDERER" value="Mali_G76"/> <param name="GL_VENDOR" value="Huawei"/> <param name="GL_VERSION" value="OpenGL ES 3.2 Mesa 22.1.7"/> </GL_RENDERER_MOCK> <GL_EXTENSION_MOCK> <param name="GL_EXT_blend_minmax" value="1"/> </GL_EXTENSION_MOCK> <GL_MAX_VALUE_MOCK> <param name="GL_MAX_VERTEX_ATTRIBS" value="16"/> </GL_MAX_VALUE_MOCK> </feature> </Application> |