I wanted to find slow pieces of code in our Anv driver using our drm-shim stub. The last bit of code still talking to the compositor was the WSI swapchain code and failing because none of the submissions are taking place (because of the stub). This change introduces a new variable MESA_VK_WSI_HEADLESS_SWAPCHAIN which when set turns every swapchain creation into a headless swapchain. This swapchain does not present anything, allowing the application to spin as many frames as possible. Thus helping to identify slow spots in command buffer building path. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6156>