RealNC wrote:It doesn't matter. Negative numbers are easier to use. If you don't care, don't use them.
Yes, they both behave the same.
RealNC wrote:Chief Blur Buster wrote:since lag can be lowered from using late-VBI framebuffer flips rather than early-VBI framebuffer flips.
So, will it be better using something like -1 for VSYNC OFF?
1 scanline is not enough headroom. The GPU needs a few scanline to finally sync. If the GPU needs 20 scanlines to sync, at 1080p you should use 1060 so that the sync happens near the last visible scanline.[/quote]
Correct, bigger headroom is better. The scanline index in RTSS and the actual tearline location, are usually offset.
It's tighter on faster systems at lower Hz, and can sometimes be exact. However, on slower systems and to allow performance overhead (to allow tearline to jitter downwards away from its prescribed index), you want the tearline to be further upwards (earlier in VBI if VSYNC OFF, or higher above bottom edge if using FastSync/Enhanced Sync) so that timing errors or long frametimes (0.1% frametimes especially) delay a frame a bit. You need to try to squeeze the whole tearline-vibration amplitude into the VBI. A bigger VBI can hide a erratically-vibrating tearline better, so the use of a slightly larger Vertical Total can help Scanline Sync a bit.
RealNC wrote:
There is no "above the edge".
<TECHNICAL>
This requires a complex reply.
(The diagrams are useful for other readers to understand RTSS Scanline Sync, so this post adds to discussion)
Actually, Einstein says it is all relative. See photo of old analog VSYNC below. Mathematically, a tearline is simultaneously above and below the refresh cycle when it's in the VBI. Technically, the Vertical Back Porch is above the top edge and the Vertical Front Porch is below the bottom edge, in display engineering!
While the VBI (Vertical Blanking Interval) consists of grand total (Front Porch + Sync + Back Porch), technically, the Front Porch is analog overscan above the top edge and the Back Porch is analog overscan below the bottom edge, while the Sync signal triggers an electron gun movement back to the top edge.
And if you've lived in the 1970s or earlier, a misadjusted VHOLD knob on an old TV allowed you to see the VBI as active scanlines. In fact, if you jacked brightness WAY up on these old televisions then intentionally misadjusted the VHOLD analog knob, the Front/Back porches were often a very dark grey (7.5 IRE, standard analog black level), while Sync was black (0 IRE, below analog black level) so the VBI looked like three-layer ice-cream sandwich if you brightened things to a bleach-out extent. But normally, the whole shebang is completely black.
The refresh cycles and the VBI are just simply endless loop of scanlines continually transmitted out of the GPU output, just as display signals always has been for nearly 100 years (at the image delivery layer).
The above is VSYNC ON. The below is VSYNC OFF.
The name of game of the brand new RTSS Scanline Sync is to aim the tearlines into the VBI -- that metaphorical black "spacer" between refresh cycles. The timing of frame-presentation API is when the tearline occurs, and the game of RTSS Scanline Sync is to time frame presenting in the VBI between refresh cycles.
Although it was possible to make the VBI visible in the analog era -- Now, in the digital era, the VBI is just dummy blank offscreen pixel rows in the signal that are simply delay padding (to give electronincs time to initialize a new visible row of pixels onscreen, or to initialize the start of a new refresh cycle; some newer displays only require literally 1 pixel of sync in nearly nonexistent blanking intervals). What this means is that the topology is identical on a 1930s TV signal versus 2020s DisplayPort signal (at least at the image delivery layer in terms of pixel order, sync order, endless-loop-of-scanlines topology), blanking interval, not the newly digital/micropacketization layers right below it).
(Curious about Horizontal stuff too? Yes. HBI - Horizontal Blanking Interval consisting of Horizontal Front Porch, Sync, and Back Porch also exists -- the horizontal sync -- and sometimes becomes visible to human eyes during ghost signals when 2 analog TV signals are overlapping each other -- and shows up as vertical bars between left/right edges of the ghost signal overlapping the real signal. However, HBI is literally microseconds, while VBI is closer to milliseconds, and so HBI knowledge is not as useful since it literally just literally a quick comma-separator between pixel rows nowadays. However, some people reduce the HBI to gain extra bandwidth headroom to increase the VBI. Reduced Horizontal Totals is good for creating Large Vertical Totals, since trading HBI pixels for more VBI pixels can keep you under the Pixel Clock / Dot Clock maximum bandwidth budget.)
In the digital era, the components of the blanking intervals are just delays. Such as between pixel rows (HBI), or between refresh cycles (VBI), but technically, refresh cycles are like endless series of scanlines (= digital pixel rows) that alternate between active scanlines and VBI scanlines and the topology of a display signal means a VBI is between the previous refresh cycle and the next refresh cycle, so technically, topologically mapped out on a time-basis, the VBI is also simultaneously before and after a refresh cycle, and if we're thinking geometically, a metaphorical tearline in VBI can be above the edge. So, it's legitimate thinking if we're mapping tearlines geometrically.
Whatever the display does internally doesn't matter (there's no concept of above/below, it's just dummy delay loops or wait-for-initialization triggers). But geometrically, when mapping out a display signal.... Above/below both simultaneously exists, full stop.
So, Chief Blur Buster deem it "Yes, there's a such a thing as geometrically thinking that tearlines are above the top edge of the screen" -- that is permitted & legitimate thinking around here, if one wishes to do so for simplicity's sake, since the signal structure is simply an endless orthographical loop of scanlines including VBI scanlines (dummy black scanlines) and active visible scanlines (rows of pixels).
That's why negative indexes exist, it is geometrically thought as "above top edge".
And beyond-bottom-of-screen indexes exist, it is geometrically thought as "below bottom edge". Both answers are definitely correct, because it is simultaneously "below bottom edge of previous refresh cycle, and above top edge of next refresh cycle" -- referring to exactly the same "figurative-tearline-in-VBI" -- and thusly, are both legitimate answers because as Einstein says, it is all relative.
Both large positive indexes and small negative indexes are identical, but they can diverge if your VBI sizes change (Vertical Total tweaks) or resolution changes.
</TECHNICAL>