Page 1 of 1

Untearable top strip [raster-based VSYNC OFF tearing test]

Posted: 12 Dec 2018, 04:31
by ad8e
I'm running some tearing tests, and I noticed an interesting behavior. My laptop has an untearable top strip, about 16px tall. The frame can switch before it or after it, but not inside it. Why is that? Every other strip seems tearable.

My specs: Lenovo Thinkpad T530, external VGA monitor and internal laptop monitor, Intel HD4000. Both monitors have negligible front/back porch.

.exe demo is attached. Drag-right-click left and right to change the period. Drag-right-click up and down to change the phase. Esc to quit. It's easiest to see if you let the tearline slowly travel upwards; it'll snag at the very top. If you want to change phase but not period, keep your mouse to one of the screen edges.

Source code is also inside. My build command was

Code: Select all

g++ top_sync_jitter.cpp -std=c++1z -lglfw3 -lgdi32 -lwinmm -static -ob.exe -ffunction-sections -fdata-sections -Wl,--gc-sections -Ofast -DNDEBUG -fno-exceptions -fno-rtti -s
using mingw-w64, although you'll need two other libraries if you want to build it (glad with OpenGL 3.3, and glfw 3).

Re: Untearable top strip

Posted: 12 Dec 2018, 18:36
by ad8e
Behavior was unraveled: the monitor flips frames only in specific quantums, and the size of each quantum is about a 8px line. The top quantum is 16px tall, a larger quantum than the rest. Using the demo, we can see that the tearline doesn't smoothly move by single pixels, but rather by groups of lines.

Re: Untearable top strip

Posted: 13 Dec 2018, 00:13
by RealNC
Aha! This probably means this particular monitor buffers 8 scanlines, except at the top where it buffers 16. Which sounds very good. I would have expected more buffering on most monitors.

Re: Untearable top strip [raster-based VSYNC OFF tearing tes

Posted: 13 Dec 2018, 01:13
by Chief Blur Buster
Raster-controlled tearlines! :D
ad8e wrote:I'm running some tearing tests, and I noticed an interesting behavior. My laptop has an untearable top strip, about 16px tall. The frame can switch before it or after it, but not inside it. Why is that? Every other strip seems tearable.
That's probably because that bloc is the background compositing. Often it causes unstable tearing, but on some systems, the compositing is such a fixed overhead that it's very stable.
RealNC wrote:Aha! This probably means this particular monitor buffers 8 scanlines, except at the top where it buffers 16. Which sounds very good. I would have expected more buffering on most monitors.
It may not be buffering, but a different behaviour like DisplayPort packetization.

I've seen 2-line, 4-line, and 8-line quantums before, though my 1080 Ti output single-scanlines during high-hz 1080p modes.