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
Runtime bug: vsync is messed up if game resolution doesn't match the desktop resolution that dxx-rebirth was launched at. #670
Comments
I cannot reproduce this here. The game looks fine with vsync enabled, even after changing the display resolution. No visual artifacts appear. Please describe exactly how to reproduce this:
|
Full screen is what I've been trying it with. I don't see the issue happening in windowed mode. This occurs whenever the d2x-rebirth resolution doesn't match whatever the desktop is set to. If I set d2x-rebirth back to whatever the desktop resolution was the problem goes away.
You can see the line by rotating the ship around in a circle like the ship was going around a pole that goes from it's top to bottom. (can be done by holding down the left key, or something like that) Look for a horizontal line somewhere around 1/4 to 1/5 down from the top of the display. [If whatever this is, isn't called a vsync issue, let me know what it's called, and I'll correct myself] Game resolution can be changed by GAME MENU > (F2) OPTIONS... > GRAPHICS... > SCREEN RESOLUTION... > mouse click on a resolution and press the enter key.
[not sure how to best say this] For full screen as long as the desktop's resolution and dxx-rebirth's resolution match, there isn't the vsync issue. In case it matters, I'm using KDE and COMPIZ. |
I retried this, and I still don't see it.
I also tried:
Does the issue occur if you disable desktop compositing? |
I guess I'll call it a horizontal line issue.
Just tired it without Compiz with just Plasma, as well as a plain xterm xsession, and they all result with this issue, with and without optirun.
That sounds about like what I did. Also whenever dxx-rebirth's resolution is set back to the desktop's resolution, the line doesn't show up. I just noticed that the line only shows up when moving, if stationary I don't see it. |
If you run the game in windowed mode, with a window the size of your screen, does the line appear? This mode does not take control of your resolution, and does not set the full screen flag on the SDL window. If yes, what happens if you run in windowed mode with a smaller window, so that some of your desktop is visible? If you move the window such that its top left corner is not the top left of your display, does the line relocate with the window, draw on your desktop, or draw only within the window, but clipped as if its origin were still top left? Has this always happened, or is it a regression? If you capture a screenshot while the line is visible, is the line in the screenshot? I expect it will be. What does the line look like? Is it very narrow, or broad and obvious even from elsewhere in the room? Since I cannot reproduce this issue, my ability to debug it is limited. I have no theories as to what part of the Rebirth code, if any, is responsible for this. The general graphics code has not been substantially changed in a very long time, so I would expect other users to have reported this if it occurs on typical systems. |
When tried to take screenshots when this what happening, the game briefly froze without the error showing, and the screenshots it took didn't show the error. Tried running Next I tried using |
Nope, bug only occurs in fullscreen modes that don't match desktop resolution.
I never really tried this out with other versions, so I don't know.
See other post for attempts to get a screenshot of it notes. It looks like the diagonal line is per pixel, and the distance between horizontal lines are several pixels. Also, Bug also doesn't show up when a menu is displayed. |
Tried playing again this time 960x540, and this time the diagonal part was not there, and the bug was just a horizontal line all the way across the screen. On another resolution it was a little horizontal line a -45° diagonal then a horizontal line the rest of the way. |
I see the graphical anomaly in your webcam image. I have no guesses as to its cause, but find it interesting that it does not occur when using windowed mode. Note that when using SDL1, with Do you also see this problem when using SDL2? Its full screen mode is implemented differently. It is unlikely that I can do anything to fix this:
|
I guess one of us(or both?) could fill in bug report(s) with supporting libraries. I don't know much about them to know what/how they do whatever it is they do, or whatever they are supposed to do is. (Didn't mean to annoy you on anything)
Compile with this? Tried this, can't reproduce the error, not because this issue is gone, but because it no longer changes the full screen resolution. For example: have desktop at 3840x2160, and set game to 800x600. Windowed mode will be 800x600, but full screen still will be 3840x2160, or 3840x2160 with a smaller window the size of 800x600. p.s. The bold markup for this makes it look like filtering out of a curse word, **it :) |
This issue seems to also be present on the Raspberry Pi. I'm running Raspberry Pi 4 on Pi OS 64-bit with kernel 6.1.7 and Mesa 22.2.5. Using a 2560x1440 monitor, any in-game resolution other than 2560x1440 results in very visible tearing. Obviously, 2560x1440 leads to low framerate even on a Pi 4, so as it stands there's unfortunately no way of running dxx-rebirth tear free on the Pi. This issue is perhaps most easily noticed in 640x480, where the tearline consistently ends up near the top of the display and stays there. |
Debian Stable, Debian GNU/Linux 11 (bullseye)
dxx-rebirth_20220929-src compiled
Intel CPU
If d2x-rebirth is run at a resolution that it wasn't started at, vsync will be messed up.
e.g.
If the desktop is 3840x2160 when d2x-rebirth is started and d2x-rebirth is set to 3840x2160, vsync will work fine, but at other resolutions vsnyc will be messed up and a horizontal line will appear on screen. If d2x-rebirth is changed to 3200x1800 vsync won't work properly unless game is exited and restarted again when desktop is 3200x1800.
(note: haven't tested d1x-rebirth with this)
The text was updated successfully, but these errors were encountered: