Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
README | D | 12-May-2024 | 1.9 KiB | 53 | 33 | |
TODO | D | 12-May-2024 | 105 | 4 | 3 | |
VkLayer_MESA_overlay.json | D | 12-May-2024 | 300 | 12 | 11 | |
mesa-overlay-control.py | D | 12-May-2024 | 5.7 KiB | 204 | 150 | |
meson.build | D | 12-May-2024 | 2.1 KiB | 59 | 50 | |
overlay.cpp | D | 12-May-2024 | 108 KiB | 2,674 | 2,147 | |
overlay.frag | D | 12-May-2024 | 248 | 15 | 11 | |
overlay.vert | D | 12-May-2024 | 447 | 26 | 21 | |
overlay_params.c | D | 12-May-2024 | 5.3 KiB | 197 | 144 | |
overlay_params.h | D | 12-May-2024 | 4.3 KiB | 115 | 81 |
README
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