Bug 111401

Summary: Vulkan overlay layer - async compute not supported, making overlay disappear in Doom
Product: Mesa Reporter: tempel.julian
Component: OtherAssignee: mesa-dev
Status: RESOLVED MOVED QA Contact: mesa-dev
Severity: normal    
Priority: medium    
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description tempel.julian 2019-08-14 18:05:50 UTC
The Vulkan overlay layer doesn't work with async compute on GCN/RDNA and probably neither Nvidia Turing GPUs, it simply disappears.
To reproduce, start Doom on any Radeon (driver shouldn't matter) in Steam Play and set it to Vulkan with Ultra preset and 8xTSSAA: When in the actual game, the Mesa overlay will simply disappear. When changing anti aliasing to FXAA, async compute is turned off and the Mesa overlay gets visible again.

On windows, overlays like that of Steam (the overlay of the Linux version for some reason shares the traits of Mesa overlay) or RTSS disable presenting frames from a compute queue. This makes them work, but degrades performance substantially.

The windows open source tool OCAT supports an overlay for Vulkan that is compatible with async compute and doesn't degrade performance:
https://ocat.readthedocs.io/en/latest/index.html

Tested with mesa-git some weeks ago.
Comment 1 Lionel Landwerlin 2019-08-21 11:54:29 UTC
Thanks for the report.

Would you be able to test this MR : https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1730 ?

Thanks
Comment 2 tempel.julian 2019-08-21 12:37:22 UTC
Thank you for your efforts.
Unfortunately, the overlay still disappears with your patch applied.
Comment 3 tempel.julian 2019-08-21 12:42:20 UTC
I think I should have mentioned that I use the Mesa ACO fork.
Comment 4 Lionel Landwerlin 2019-08-21 12:47:01 UTC
(In reply to tempel.julian from comment #3)
> I think I should have mentioned that I use the Mesa ACO fork.

As far as I know the ACO work is mostly compiler related, so it shouldn't affect the overlay.

I honestly don't know what's going wrong there.
We properly insert a dependency to ensure the image isn't shown until the overlay is finished drawing.
From the driver's point of view the overlay should be just like any other application drawing.

Unless if there is an issue in the application that concurrently draws with the overlay, overriding it.
Have you tried to position the overlay in different corners of the window to see if it has any effect?

Does it disappear for good or is it showing once every other frame?
Comment 5 tempel.julian 2019-08-21 13:03:31 UTC
I've positioned it to bottom-right and it disappears as well. The game has its own performance overlay, but turning it on or off doesn't impact the Mesa OSD (at least not as far as I can tell, but I think it would be very uncommon if it did something weird in the background).
The Mesa OSD already disappears when the game's main menu got loaded. Then it's visible again when on a loading screen for a level, while it completely vanishes when the level starts. I think it never flashes even once while playing.

When turning off async compute by using FXAA (they didn't implement AC for that postprocessing queue), it's completely visible all the time.
Comment 6 GitLab Migration User 2019-09-18 20:19:37 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/946.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.