Shader Analysis#
PVRTune GUI can load the shader analysis XML files that are optionally produced by the GLES, Vulkan and OpenCL client drivers in the DDK. The online compilation shader statistics and disassembly data collected from this file complements the shader information collected from the HWPerf client stream and is displayed in PVRTune GUI’s Properties docking window when selecting certain tasks that have shaders associated with them such as Geometry, Compute or 3D HW tasks.
Generate Shader Analysis XML file#
DDK#
The DDK does not produce shader analysis files by default, in order to get them you must build the drivers with certain flags and also make use of app hints:
Vulkan driver:
ZEUS_SHADER_ANALYSIS=1
must be set when compiling the driver and theEnableShaderAnalysis=1
app hint must be set at runtime.GLES driver: when building a debug driver the shader analysis feature is compiled in by default, but it can also be switched on in release builds by setting
PERFDATA=1
when compiling, in addition theDumpShaderAnalysis=default
app hint must be set at runtime.OpenCL driver:
OCL_SHADER_ANALYSIS=1
must be set when compiling the driver and theDumpShaderAnalysis=1
app hint must be set at runtime.
DDK support:
GLES:
MAIN@5899115
/ REL1.15Vulkan:
MAIN@5904460
/ REL1.15OpenCL:
MAIN@5975905
/ REL1.16
PVRPerfServer option#
PVRPerfServer will need the relevant Client stream data to be enabled, via its command-line or PVRTune’s GUI:
GLES:
./PVRPerfServerComplete --ClientAPIOpenGLES=1
Vulkan
./PVRPerfServerComplete --ClientAPIVulkan=1
OpenCL:
./PVRPerfServerComplete --ClientAPIOpenCL=1
Load Shader Analysis file#
Load a .PVRTune file (e.g. via menu File → Open…), then load the matching XML or TXT file (via menu File → Load Shader Analysis…).
GLES Example#
When the GLES client stream is enabled, and a Renderer, Tiler or Client driver draw call (e.g. Draw Arrays) task is selected, then in the Properties docking window the Shader source can be seen, as well as a “Compiler Stats” section in the tree containing statistics about the shader source.
When the Shader Analysis file is also loaded, then an additional “Shader Analysis Stats” section of the Properties tree appears (and “Compiler Stats” is renamed to “Offline Compiler Stats”).
Compiler statistics |
Shader analysis |
---|---|