Special K can drastically reduce latency

Everything about latency. Tips, testing methods, mouse lag, display lag, game engine lag, network lag, whole input lag chain, VSYNC OFF vs VSYNC ON, and more! Input Lag Articles on Blur Busters.
User avatar
Chief Blur Buster
Site Admin
Posts: 8655
Joined: 05 Dec 2013, 15:44
Location: Toronto / Hamilton, Ontario, Canada
Contact:

Re: Special K can drastically reduce latency

Post by Chief Blur Buster » 08 Oct 2020, 13:26

Unwinder wrote:
08 Oct 2020, 12:53
Chief Blur Buster wrote:
08 Oct 2020, 12:28
However, if you're hooking Present() and doing an inputdelay before the real Present(), there will be latency.
That's the only case in context of this thread, Marc. Any third party limiter (and even NV's own framerate limiter) is technically a Present() hook from application's point of view with delay added either before (in case of SpecialK or RTSS working in SSYNC mode) or after (in case of NV driver limiter or RTSS working in regular limiter mode) the real Present() call.
Yes, I am aware, and also aware there are potentially multiple hooks possible.

And here are lots of latency metrics, Some not always recorded statistically:
- latency from Present() behaviours (such as blocking)
- latency from frame queue
- latency from differences in display sync technology settings
- latency averages
- latency consistency
- etc

So as you said, it helps to define the latency metric. The lag total can drop even if one increases.
Head of Blur Busters - BlurBusters.com | TestUFO.com | Follow @BlurBusters on Twitter

       To support Blur Busters:
       • Official List of Best Gaming Monitors
       • List of G-SYNC Monitors
       • List of FreeSync Monitors
       • List of Ultrawide Monitors

andrelip
Posts: 80
Joined: 21 Mar 2014, 17:50

Re: Special K can drastically reduce latency

Post by andrelip » 08 Oct 2020, 18:50

Chief Blur Buster wrote:
02 Oct 2020, 11:21
jorimt wrote:
01 Oct 2020, 07:56
An update, as promised; I'm on the list for the next shipment.
Me too.

Also, I also have an internal BlurBusters-developed LDAT-like tool (that works on all GPUs) that I am considering commercializing, but right now it's mainly exclusively used for my contracting services and Blur Busters Approved. Trying Kickstarters and hardware sales is too risky during COVID at the moment. However, I'm open to commercialzing at some point in the future, as I have features LDAT cannot do.

Also, NVIDIA agreed that LDAT and other lag test tools should have consistent industry standardized results.

Improves trust in lag tests.
You can use those functions as a breakpoint in IDA and hook the higher level function in the game itself. It is not a generic approach tho.

-----

The Unwinter approach of hooking to make the interval from the beginning of the CPU processing constant is useful to make things smoother in these three scenarios:

a) The CPU render time is short
b) The CPU processing have low jitter
C) The game logic fetches the timestamp at the begging of the game loop.

If none of those conditions happens, it only makes the frame delivery constant, not it's content.

I still don't get how the SpecialK can reduce latency against an unlimited framerate. The only scenario that cames to my mind is when some frames wait in the flip queue due to a high percentage of frames where GPU time is longer than the CPU time.

Kaldaien
Posts: 9
Joined: 22 Jan 2020, 21:27

Re: Special K can drastically reduce latency

Post by Kaldaien » 08 Oct 2020, 22:17

andrelip wrote:
08 Oct 2020, 18:50
I still don't get how the SpecialK can reduce latency against an unlimited framerate.
It's important to note that SK is doing more than limiting framerate, it also is setting the swapchain up to bypass undesirable side-effects of DWM composition.

Very few engines create their swapchain with the correct conditions to actually achieve "unlimited framerate," and are double-buffering the application's present queue on top of the DWM's already double-buffered queue.

Extremely valuable reading discussion on Swap Chains:

https://developer.nvidia.com/dx12-dos-and-donts

There's performance being lost in pretty much all windowed applications because a developer has not absorbed that information. It's a shame NVIDIA buried that in a page titled "DX12 ..." since it applies to all graphics APIs layered on top of DXGI.

User avatar
Chief Blur Buster
Site Admin
Posts: 8655
Joined: 05 Dec 2013, 15:44
Location: Toronto / Hamilton, Ontario, Canada
Contact:

Re: Special K can drastically reduce latency

Post by Chief Blur Buster » 08 Oct 2020, 23:08

Yes, it's important to note that Present() is daisychainable. Hook upon hook upon hook upon hook. One utility may need a hook do do an overlay menu, another utility may need a hook to do its own syncing algorithm / framerate capping, etc. And it can be a "lie" to the software -- VSYNC ON being made VSYNC OFF, and vice-versa.

So when a game presents a frame, it's handed off to another middleman (hook) before it finally hits the OS/drivers. The hook can clone a sync technology or override many things, with attendant side effects.

Metaphorically one hook may potentially do an equivalent of a 3-frame-depth VSYNC ON implementation, even if the drivers has a maximum queue of 1 or is actually VSYNC OFF. And some games do that internally (things like frame queues in the software before the drivers).
Head of Blur Busters - BlurBusters.com | TestUFO.com | Follow @BlurBusters on Twitter

       To support Blur Busters:
       • Official List of Best Gaming Monitors
       • List of G-SYNC Monitors
       • List of FreeSync Monitors
       • List of Ultrawide Monitors

Kaldaien
Posts: 9
Joined: 22 Jan 2020, 21:27

Re: Special K can drastically reduce latency

Post by Kaldaien » 09 Oct 2020, 01:46

It's extremely handy to have multiple Present hooks :)

https://imgur.com/a/z9Vh82G

Various third-party overlays would be nearly invisible in HDR games without tricking them into rendering in a specific order and doing color correction myself.

Multi-plane overlays were designed to solve this problem (compositing in different colorspaces). However, despite being implemented in hardware, every time I activate an overlay that uses the feature, it introduces 1 frame of latency. That little blip in the frame pacing histogram is caused by the Xbox Game Bar. I never would have imagined this, and it's a good thing the Xbox Game Bar isn't designed to be on-screen constantly :P

User avatar
BTRY B 529th FA BN
Posts: 199
Joined: 18 Dec 2013, 13:28

Re: Special K can drastically reduce latency

Post by BTRY B 529th FA BN » 13 Oct 2020, 20:34

What is this 'Logon' thing? Does some kind of account need to be created to use Special K? Wasn't Special K a name of a drug too? wtf, lol

User avatar
BTRY B 529th FA BN
Posts: 199
Joined: 18 Dec 2013, 13:28

Re: Special K can drastically reduce latency

Post by BTRY B 529th FA BN » 15 Oct 2020, 17:47

So again, do i need an account for specialk? I don't get the logon thing...

User avatar
RealNC
Site Admin
Posts: 3103
Joined: 24 Dec 2013, 18:32
Contact:

Re: Special K can drastically reduce latency

Post by RealNC » 16 Oct 2020, 07:36

BTRY B 529th FA BN wrote:
15 Oct 2020, 17:47
So again, do i need an account for specialk? I don't get the logon thing...
I assume you need an account if you want to post on their forum. But the download link at the top should work even without an account.
SteamGitHubStack OverflowTwitter
The views and opinions expressed in my posts are my own and do not necessarily reflect the official policy or position of Blur Busters.

User avatar
BTRY B 529th FA BN
Posts: 199
Joined: 18 Dec 2013, 13:28

Re: Special K can drastically reduce latency

Post by BTRY B 529th FA BN » 16 Oct 2020, 13:01

RealNC wrote:
16 Oct 2020, 07:36
BTRY B 529th FA BN wrote:
15 Oct 2020, 17:47
So again, do i need an account for specialk? I don't get the logon thing...
I assume you need an account if you want to post on their forum. But the download link at the top should work even without an account.
I've downloaded the file already I just don't know if in order to use special K I need to make an account. It would be odd if an account was required.

Kaldaien
Posts: 9
Joined: 22 Jan 2020, 21:27

Re: Special K can drastically reduce latency

Post by Kaldaien » 16 Oct 2020, 13:41

BTRY B 529th FA BN wrote:
13 Oct 2020, 20:34
What is this 'Logon' thing? Does some kind of account need to be created to use Special K? Wasn't Special K a name of a drug too? wtf, lol
Huh? The only 'Logon' thing in my software is an option to start the Global Injection service when you start Windows.

There are multiple ways to inject Special K, it can behave like ReShade where you have to waste your own time putting a DLL in a game's directory and remembering to update that DLL or it can behave like RTSS where it's casually injected into software as you launch new apps. The second method is more convenient, and it gets even more convenient if you allow it to start with Windows.

And, yeah... Special K is a drug you inject that makes you sleepy / see colors -- name's very fitting when you consider its HDR and frame pacing features.

Post Reply