• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1A Vulkan layer to display information about the running application
2using an overlay.
3
4To turn on the layer run :
5
6VK_INSTANCE_LAYERS=VK_LAYER_MESA_overlay /path/to/my_vulkan_app
7
8List the available statistics :
9
10VK_INSTANCE_LAYERS=VK_LAYER_MESA_overlay VK_LAYER_MESA_OVERLAY_CONFIG=help /path/to/my_vulkan_app
11
12Turn on some statistics :
13VK_INSTANCE_LAYERS=VK_LAYER_MESA_overlay VK_LAYER_MESA_OVERLAY_CONFIG=submit,draw,pipeline_graphics /path/to/my_vulkan_app
14
15Position the layer :
16
17VK_INSTANCE_LAYERS=VK_LAYER_MESA_overlay VK_LAYER_MESA_OVERLAY_CONFIG=submit,draw,pipeline_graphics,position=top-right /path/to/my_vulkan_app
18
19Dump statistics into a file:
20
21VK_INSTANCE_LAYERS=VK_LAYER_MESA_overlay VK_LAYER_MESA_OVERLAY_CONFIG=position=top-right,output_file=/tmp/output.txt /path/to/my_vulkan_app
22
23Dump statistics into a file, controlling when such statistics will start
24to be captured:
25
26VK_INSTANCE_LAYERS=VK_LAYER_MESA_overlay VK_LAYER_MESA_OVERLAY_CONFIG=position=top-right,output_file=/tmp/output.txt,control=mesa_overlay /path/to/my_vulkan_app
27
28The above command will open a unix socket with abstract path
29'mesa_overlay'.  Once a client connects to the socket, the overlay layer
30will immediately send the following commands to the client:
31
32:MesaOverlayControlVersion=1;
33:DeviceName=<device name>;
34:MesaVersion=<mesa version>;
35
36The client connected to the overlay layer can enable statistics
37capturing by sending the command:
38
39:capture=1;
40
41And disable it by emitting
42
43:capture=0;
44
45By default, capture is enabled when an output_file is specified, but it
46will be disabled by default when a control socket is in use. In the
47latter case, it needs to be explicitly enabled through the sockets, by
48using the commands above.
49
50The provided script overlay-control.py can be used to start/stop
51capture. The --path option can be used to specify the socket path. By
52default, it will try to connect to a path named "mesa_overlay".
53