-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Window display change/regression in GUI mode with no-osc #3301
Comments
Yep, I can reproduce this. I think it's to do with ANGLE becoming the new default OpenGL backend. ANGLE doesn't currently receive any notification when the window is resized. Instead, it checks for changes in the window size in eglSwapBuffers after IDXGISwapChain::Present is called. This means that the size of the backbuffer will be wrong on the first call to eglSwapBuffers after the window is resized. mpv resizes the window on startup, so the backbuffer size will be wrong there too. You should find that this issue doesn't show up with the other OpenGL backends, so The reason why this is only reproducible with the OSC disabled is because the OSC seems to redraw the screen an extra time, so the backbuffer size will be correct. |
I'm not sure how this can be solved, but I reported it to the ANGLE project in http://anglebug.com/1438 |
Yes, you're right. Can confirm that, for example, adding I wasn't aware that Angle became the new default backend for OpenGL. But I see that there were some updates in the commit log, so I guess these enhancements earned Angle the promotion as new default ;-) Otherwise, according to the manual, |
A suggestion, for a possible workaround, maybe: When starting mpv in GUI mode as described above, always display some kind of splash screen, regardless of the OSC setting. Might turn out useful in the future if that is decoupled. Just something simple, like with OSC on, some text and maybe the mpv logo. |
This uses eglPostSubBufferNV to trigger ANGLE to check the window size and update the size of the swapchain to match, which is recommended here: https://groups.google.com/d/msg/angleproject/RvyVkjRCQGU/gfKfT64IAgAJ With the D3D11 backend, using eglPostSubBufferNV with a 0-sized update region will even skip the Present() call, meaning it won't block for a vsync period. Also, as far as I can tell, eglPostSubBufferNV will update the swapchain size even when the EGL display does not expose the EGL_NV_post_sub_buffer extension, so there is no need to check for it. Hopefully ANGLE will have a less hacky way of doing this in future. See the relevant ANGLE issue: http://anglebug.com/1438 Fixes mpv-player#3301
This uses eglPostSubBufferNV to trigger ANGLE to check the window size and update the size of the swapchain to match, which is recommended here: https://groups.google.com/d/msg/angleproject/RvyVkjRCQGU/gfKfT64IAgAJ With the D3D11 backend, using eglPostSubBufferNV with a 0-sized update region will even skip the Present() call, meaning it won't block for a vsync period. Also, as far as I can tell, eglPostSubBufferNV will update the swapchain size even when the EGL display does not expose the EGL_NV_post_sub_buffer extension, so there is no need to check for it. Hopefully ANGLE will have a less hacky way of doing this in future. See the relevant ANGLE issue: http://anglebug.com/1438 Fixes mpv-player#3301
Hopefully that won't be necessary. Even then, mpv could probably present a black frame twice instead of a splash screen. The above PR should fix this without an additional Present(). |
This uses eglPostSubBufferNV to trigger ANGLE to check the window size and update the size of the swapchain to match, which is recommended here: https://groups.google.com/d/msg/angleproject/RvyVkjRCQGU/gfKfT64IAgAJ With the D3D11 backend, using eglPostSubBufferNV with a 0-sized update region will even skip the Present() call, meaning it won't block for a vsync period. Also, as far as I can tell, eglPostSubBufferNV will update the swapchain size even when the EGL display does not expose the EGL_NV_post_sub_buffer extension, so there is no need to check for it. Hopefully ANGLE will have a less hacky way of doing this in future. See the relevant ANGLE issue: http://anglebug.com/1438 Fixes mpv-player#3301
This uses eglPostSubBufferNV to trigger ANGLE to check the window size and update the size of the swapchain to match, which is recommended here: https://groups.google.com/d/msg/angleproject/RvyVkjRCQGU/gfKfT64IAgAJ With the D3D11 backend, using eglPostSubBufferNV with a 0-sized update region will even skip the Present() call, meaning it won't block for a vsync period. Also, as far as I can tell, eglPostSubBufferNV will update the swapchain size even when the EGL display does not expose the EGL_NV_post_sub_buffer extension, so there is no need to check for it. Hopefully ANGLE will have a less hacky way of doing this in future. See the relevant ANGLE issue: http://anglebug.com/1438 Fixes mpv-player#3301
mpv version and platform affected
Windows 10 Pro x64:
mpv 'release' v0.18.0
mpv git-c57304a
(Tested on two machines)
Windows 10 Pro x32:
mpv 'release' v0.18.0
Reproduction steps
Put in
mpv.conf
:no-osc
(Can be completely empty otherwise)
Expected behavior
Earlier versions of mpv showed an window (same size, same position) as with OSC enabled, only the window content was empty, i.e. completely black. That is, no mpv logo and 'Drop files to play here'
Standard display, launched via shortcut, taskbar, etc. and without
no-osc
:(Yes, I'm aware the text looks not as usual, but this is an older screenshot with changed text setting in the config, i.e.
osd-color
.. etc.)With 'no-osc':
As stated, not working as before. Imagine the screenshot above but just black inside the window.
Actual behavior
no-osc
no-osc
andno-border
I think this should be labeled as ms-windows and probably as low priority as well..
The text was updated successfully, but these errors were encountered: