Re: Vsync vs FPS Cap or Both?
Posted: 26 Apr 2018, 12:08
Do we know if this is in the works?Chief Blur Buster wrote:Ideally we need a future RTSS that dynamically changes the cap automatically to prevent framebuffer backpressure.
Who you gonna call? The Blur Busters! For Everything Better Than 60Hz™
https://forums.blurbusters.com/
Do we know if this is in the works?Chief Blur Buster wrote:Ideally we need a future RTSS that dynamically changes the cap automatically to prevent framebuffer backpressure.
No. It was suggested months ago. But I pinged the RTSS author again. I hope he adds this. It's very easy to implement in its purest, non-fancy form (just a fixed delay without calculating anything.)Litzner wrote:Do we know if this is in the works?Chief Blur Buster wrote:Ideally we need a future RTSS that dynamically changes the cap automatically to prevent framebuffer backpressure.
Thanks. You should link the original post that I made in this regards -- search for it and link to itRealNC wrote:No. It was suggested months ago. But I pinged the RTSS author again. I hope he adds this. It's very easy to implement in its purest, non-fancy form (just a fixed delay without calculating anything.)Litzner wrote:Do we know if this is in the works?Chief Blur Buster wrote:Ideally we need a future RTSS that dynamically changes the cap automatically to prevent framebuffer backpressure.
Your suggestion (and offer for a bounty) was a bit different and more involved in the implementation. I'm scared I'll piss him offChief Blur Buster wrote:Thanks. You should link the original post that I made in this regards -- search for it and link to it
Nope.petrakeas wrote:Is RTSS aware of when VSYNC occurs?
There's many injection methods, but at the base of them all it's about replacing specific function memory addresses with your own. A frame limiter and OSD injector for example needs to intercept the various API functions of DirectX, OpenGL and Vulkan that send frames to the driver to be displayed on the monitor. When the game tries to execute those functions, RTSS has "rewired" things in such a way, that the CPU jumps to the RTSS code. The RTSS code can then do its thing, and at the end jump to the actual original function the game tried to execute.How does it "inject" itself to the game to framerate limit it?
In the case of the frame limiter, RTSS will block execution for a while if the function call from the game took less time than the user-configured target frame time. For a 100FPS cap, that's 10ms. If the last function call from the game was 5ms ago, that means the current frame would 200FPS, so RTSS blocks for 5ms before returning from the function and giving control back to the game.Is it keeping the game in swap buffers call as long as it has to? Is it presenting the latest rendered buffer and then delays returning from the call or it is also delaying the presentation of the last rendered buffer for "better" timing?
RealNC is correct. There are APIs that exist.petrakeas wrote:How does it "inject" itself to the game to framerate limit it? Is it keeping the game in swap buffers call as long as it has to? Is it presenting the latest rendered buffer and then delays returning from the call or it is also delaying the presentation of the last rendered buffer for "better" timing?
In this example, RTSS will also delay the actual presentation of the buffer by 5 ms, so 5ms of input lag will be added. Ideally, we would want RTSS to present the buffer immediately and then block from returning for 5 ms?In the case of the frame limiter, RTSS will block execution for a while if the function call from the game took less time than the user-configured target frame time. For a 100FPS cap, that's 10ms. If the last function call from the game was 5ms ago, that means the current frame would 200FPS, so RTSS blocks for 5ms before returning from the function and giving control back to the game
I don't know. I guess this is not the case, since presenting immediately would violate the target frame time. If I set 100FPS as the cap, that means I want the frames to be spaced 10ms apart. If the limiter would present it immediately when it arrives only after 5ms, then it wouldn't be 10ms apart from the previous frame anymore. Frame times would become less accurate and more unpredictable. This is probably what happens with in-game limiters. They probably present first and block later. They give lower input lag, but they have jitter and are thus not suitable for the low latency vsync cap. (Note: emphasis on "probably." I haven't checked any in-game limiters out lately.)petrakeas wrote:In this example, RTSS will also delay the actual presentation of the buffer by 5 ms, so 5ms of input lag will be added. Ideally, we would want RTSS to present the buffer immediately and then block from returning for 5 ms?In the case of the frame limiter, RTSS will block execution for a while if the function call from the game took less time than the user-configured target frame time. For a 100FPS cap, that's 10ms. If the last function call from the game was 5ms ago, that means the current frame would 200FPS, so RTSS blocks for 5ms before returning from the function and giving control back to the game