We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3221 - Windows: SDL_WINDOW_FULLSCREEN_DESKTOP + OpenGL broken for non-native desktop resolutions
Summary: Windows: SDL_WINDOW_FULLSCREEN_DESKTOP + OpenGL broken for non-native desktop...
Status: RESOLVED ABANDONED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.1
Hardware: x86_64 Other
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-04 00:06 UTC by Eric Wasylishen
Modified: 2018-08-06 21:20 UTC (History)
1 user (show)

See Also:


Attachments
Build of testgl2.exe from cbc9323b7167 (326.39 KB, application/x-zip-compressed)
2017-08-13 00:11 UTC, Eric Wasylishen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Wasylishen 2016-01-04 00:06:31 UTC
OS: Windows 10 version 1511
SDL2 version: d91a2c45825e (Jan 3, 2016) 
Nvidia driver: 353.62

Steps to reproduce:
- Set your Windows desktop resolution to a non-native resolution for your LCD panel. Tested with a MacBook Pro (native 2880x1800, set to 1920x1200), and a BenQ LCD (native 1920x1080, set to 1680x1050)
- Launch the testgl2 SDL sample
- Press ALT+Enter to enter fullscreen desktop mode

Expected:
- Spinning cube appears in fullscreen

Actual:
- The spinning cube is visible but the screen flickers solid black.


Workarounds:
- The bug doesn't happen with samples that use the renderer api like testdraw2
- The bug doesn't happen if I switch Windows to use the monitor's native resolution first.
Comment 1 Eric Wasylishen 2017-07-14 20:37:18 UTC
Still reproduces on current SDL HG,
Windows 10 version 1703 build 15063.447
Comment 2 Eric Wasylishen 2017-07-21 18:09:47 UTC
It seems to be specific to the nVidia OpenGL driver.

If I extract the opengl32.dll and other .dll's from this software GL renderer in the same directory as testgl2, the bug is no longer reproducible:
https://github.com/pal1000/mesa-dist-win/releases/tag/17.1.5.401-1
Comment 3 Sam Lantinga 2017-08-12 21:48:47 UTC
I don't think we can fix this if it's really a bug in the NVIDIA driver. Given that it's specific to non-native LCD resolutions it sounds like that is the case.

Can you try with the latest NVIDIA driver? If you can still reproduce it, can you attach a full test case that I can pass on to NVIDIA's driver team?

Thanks!
Comment 4 Eric Wasylishen 2017-08-13 00:11:31 UTC
Created attachment 2830 [details]
Build of testgl2.exe from cbc9323b7167

Yeah - it's got to be some kind of driver bug.  I reproduced on 384.94 (latest stable driver for my GT 650m) as well 385.12 (latest beta).

The weird thing is if you set the resolution in the NVIDIA Control Panel, the bug doesn't happen, it's only when the non-native resolution was set in the Windows display settings.


For a test case I just attached testgl2.exe compiled from this revision (from today): https://hg.libsdl.org/SDL/rev/cbc9323b7167

the steps to reproduce are:
- Windows 10 Home, version 10.0.15063 Build 15063
- GT 650m 1024MB
- NVIDIA driver 384.94 or 385.12
- the laptop is a macbook pro retina, the native res is 2880x1800. I can also reproduce it with an external monitor 1920x1080 connected over displayport.

1. Right-click on the Windows desktop and choose "display settings"
2. Choose a non-native resolution (e.g. choose 1920x1080 for the 2880x1800 lcd), and 100% scaling.
3. Run testgl2.exe, press alt+enter. Expected: the spinning cube fills the screen, observed: a black screen.

Setting the resolution in step 2 via NVIDIA Control Panel will cause the bug to no longer reproduce, i.e. step 3 works as expected.
Comment 5 Ryan C. Gordon 2018-08-06 21:20:18 UTC
Hello, and sorry if you're getting dozens of copies of this message by email.

We are closing out bugs that appear to be abandoned in some form. This can happen for lots of reasons: we couldn't reproduce it, conversation faded out, the bug was noted as fixed in a comment but we forgot to mark it resolved, the report is good but the fix is impractical, we fixed it a long time ago without realizing there was an associated report, etc.

Individually, any of these bugs might have a better resolution (such as WONTFIX or WORKSFORME or INVALID) but we've added a new resolution of ABANDONED to make this easily searchable and make it clear that it's not necessarily unreasonable to revive a given bug report.

So if this bug is still a going concern and you feel it should still be open: please feel free to reopen it! But unless you respond, we'd like to consider these bugs closed, as many of them are several years old and overwhelming our ability to prioritize recent issues.

(please note that hundred of bug reports were sorted through here, so we apologize for any human error. Just reopen the bug in that case!)

Thanks,
--ryan.