18a1362adSmayaA Vulkan layer to display information about the running application
28a1362adSmayausing an overlay.
38a1362adSmaya
48a1362adSmayaTo turn on the layer run :
58a1362adSmaya
68a1362adSmayaVK_INSTANCE_LAYERS=VK_LAYER_MESA_overlay /path/to/my_vulkan_app
78a1362adSmaya
88a1362adSmayaList the available statistics :
98a1362adSmaya
108a1362adSmayaVK_INSTANCE_LAYERS=VK_LAYER_MESA_overlay VK_LAYER_MESA_OVERLAY_CONFIG=help /path/to/my_vulkan_app
118a1362adSmaya
128a1362adSmayaTurn on some statistics :
138a1362adSmayaVK_INSTANCE_LAYERS=VK_LAYER_MESA_overlay VK_LAYER_MESA_OVERLAY_CONFIG=submit,draw,pipeline_graphics /path/to/my_vulkan_app
148a1362adSmaya
158a1362adSmayaPosition the layer :
168a1362adSmaya
178a1362adSmayaVK_INSTANCE_LAYERS=VK_LAYER_MESA_overlay VK_LAYER_MESA_OVERLAY_CONFIG=submit,draw,pipeline_graphics,position=top-right /path/to/my_vulkan_app
187ec681f3Smrg
197ec681f3SmrgDump statistics into a file:
207ec681f3Smrg
217ec681f3SmrgVK_INSTANCE_LAYERS=VK_LAYER_MESA_overlay VK_LAYER_MESA_OVERLAY_CONFIG=position=top-right,output_file=/tmp/output.txt /path/to/my_vulkan_app
227ec681f3Smrg
237ec681f3SmrgDump statistics into a file, controlling when such statistics will start
247ec681f3Smrgto be captured:
257ec681f3Smrg
267ec681f3SmrgVK_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
277ec681f3Smrg
287ec681f3SmrgThe above command will open a unix socket with abstract path
297ec681f3Smrg'mesa_overlay'.  Once a client connects to the socket, the overlay layer
307ec681f3Smrgwill immediately send the following commands to the client:
317ec681f3Smrg
327ec681f3Smrg:MesaOverlayControlVersion=1;
337ec681f3Smrg:DeviceName=<device name>;
347ec681f3Smrg:MesaVersion=<mesa version>;
357ec681f3Smrg
367ec681f3SmrgThe client connected to the overlay layer can enable statistics
377ec681f3Smrgcapturing by sending the command:
387ec681f3Smrg
397ec681f3Smrg:capture=1;
407ec681f3Smrg
417ec681f3SmrgAnd disable it by emitting
427ec681f3Smrg
437ec681f3Smrg:capture=0;
447ec681f3Smrg
457ec681f3SmrgBy default, capture is enabled when an output_file is specified, but it
467ec681f3Smrgwill be disabled by default when a control socket is in use. In the
477ec681f3Smrglatter case, it needs to be explicitly enabled through the sockets, by
487ec681f3Smrgusing the commands above.
497ec681f3Smrg
507ec681f3SmrgThe provided script overlay-control.py can be used to start/stop
517ec681f3Smrgcapture. The --path option can be used to specify the socket path. By
527ec681f3Smrgdefault, it will try to connect to a path named "mesa_overlay".
53