3 ms·
I have horrible news to tell you about compositors: they already do use your GPU, even if you're watching a 4K video on the side. Even when requesting a full sc
by ohgodplsno 4y ago
I have horrible news to tell you about compositors: they already do use your GPU, even if you're watching a 4K video on the side. Even when requesting a full screen swapchain to avoid having to deal with the compositor, modern OSes will force you to go through that compositor and lie about it being fullscreen.
Additionally, using your GPU doesn't mean locking your GPU on that task. Your 4K video most likely isn't taking up 100% of GPU time, nor 100% of the nearby onboard memory. Everyone already gets a share of that time.
- avereveard 4y agoCompositor and ui framework that interact with them know that 120fps is not the target but that frame render time is, and know not to have active rendering contexts for static resources. Chasing 120fps rendering here is the problem.
- rafram 4y ago> Even when requesting a full screen swapchain to avoid having to deal with the compositor, modern OSes will force you to go through that compositor and lie about it being fullscreen. I’m honestly thankful for this bit of lying. Windows 8 and below had horrible, horrible issues with fullscreen programs, especially games - they’d change your screen resolution and thus move and resize all your other windows, they’d freeze for ten seconds when you tried to alt-tab out, and they’d frequently just crash when you switched back to them. Those problems are essentially nonexistent nowadays, and it’s worth the small performance cost that comes from going through the compositor.
- ohgodplsno 4y agoI know that in Windows 10+ and on UWP apps, requesting a fullscreen swapchain straight up crashes and tells you "nope, you're going to go through the compositor". But yes, alt-tabbing Source games was an exercise in patience.
- rafram 4y agoIs that disabled for programs targeting older OS versions? Or are you saying that the new behavior is only for UWP apps? Because that sounds like it would break a lot of old code.
- ohgodplsno 4y agoSorry, hadn't seen that response: yes, it's only when you opt in to UWP that it causes crashes. However, even if you didn't, Windows lies to you. If you ask for FSE (Full Screen Exclusive), it'll say alright buddy, and give you a Full screen that goes through DWM. I believe they have an article on that somewhere on the direct X blog called full screen optimizations, or something along those lines, that explains it.